forked from cossacklabs/themis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD.MSYS2
64 lines (53 loc) · 1.83 KB
/
PKGBUILD.MSYS2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Themis build script for pacman in MSYS2 environment
#
# Maintainer: Cossack Labs Limited <[email protected]>
pkgname=('themis' 'themis-devel')
pkgbase=themis
pkgver=0.13.0
pkgrel=1
pkgdesc="Data security library for network communication and data storage"
url="https://www.cossacklabs.com/themis/"
license=('Apache')
changelog=CHANGELOG.md
arch=('x86_64' 'i686')
depends=('libopenssl>=1.1.1')
makedepends=('tar' 'gcc' 'make' 'openssl-devel>=1.1.1')
source=("https://github.com/cossacklabs/themis/archive/$pkgver.tar.gz")
sha256sums=('4dbe8faff569b8992ee091a207367604db468648503e5e6679a4c89e0918d525')
sha1sums=('21372309e4e3d714bd637bce1e931e9be39a765f')
md5sums=('623383678c6e73651a31b38cadcab441')
# TODO: verify package signature
# Unfortunately, bsdtar cannot handle symlinks on MSYS2 [1] so we have to use
# regular tar for source code extraction, and make sure that files are removed
# before extracting them.
#
# [1]: https://github.com/msys2/MSYS2-packages/issues/140
noextract=("$pkgver.tar.gz")
prepare() {
tar --unlink-first --recursive-unlink -xf "$pkgver.tar.gz"
}
build() {
cd "$pkgbase-$pkgver"
make PREFIX=/usr
}
check() {
cd "$pkgname-$pkgver"
# Skip NIST STS tests which take long time and are prone to spurious
# failures in virtualized environments.
make -k test NO_NIST_STS=1
}
# Themis does not provide separate installation targets. It's easier to just
# install everything and then remove unnecessary files for package splitting.
package_themis() {
cd "$pkgbase-$pkgver"
make install PREFIX=/usr DESTDIR="$pkgdir/"
rm -rf "$pkgdir/usr/include"
rm -rf "$pkgdir/usr/lib"
}
package_themis-devel() {
pkgdesc="Themis header files and development libraries"
depends=("themis=$pkgver")
cd "$pkgbase-$pkgver"
make install PREFIX=/usr DESTDIR="$pkgdir/"
rm -rf "$pkgdir/usr/bin"
}