aboutsummaryrefslogtreecommitdiffstats
path: root/main/p11-kit/APKBUILD
blob: 8578bd6652880cb4d43026995f0d623100b961b7 (plain)
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
65
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=p11-kit
pkgver=0.23.16.1
pkgrel=0
pkgdesc="Library for loading and sharing PKCS#11 modules"
url="https://p11-glue.freedesktop.org/"
arch="all"
license="BSD"
makedepends="libtasn1-dev libffi-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-trust $pkgname-server"
source="https://github.com/p11-glue/p11-kit/releases/download/$pkgver/p11-kit-$pkgver.tar.gz"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--sysconfdir=/etc \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-trust-paths=/etc/ssl/certs/ca-certificates.crt
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	mv "${pkgdir}"/etc/pkcs11/pkcs11.conf.example "$pkgdir"/usr/share/doc/$pkgname/
}

trust() {
	pkgdesc="System trust module from $pkgname"
	mkdir -p "$subpkgdir"/usr/share/p11-kit/modules \
		"$subpkgdir"/usr/libexec/p11-kit \
		"$subpkgdir"/usr/lib/pkcs11 \
		"$subpkgdir"/usr/bin

	mv "$pkgdir"/usr/libexec/p11-kit/trust-extract-compat \
		"$subpkgdir"/usr/libexec/p11-kit/
	mv "$pkgdir"/usr/share/p11-kit/modules/p11-kit-trust.module \
		"$subpkgdir"/usr/share/p11-kit/modules/
	mv "$pkgdir"/usr/lib/pkcs11/p11-kit-trust.so \
		"$subpkgdir"/usr/lib/pkcs11/
	mv "$pkgdir"/usr/bin/trust "$subpkgdir"/usr/bin/
}

server() {
	pkgdesc="Server and client commands for $pkgname"
	mkdir -p "$subpkgdir"/usr/lib/pkcs11 \
		"$subpkgdir"/usr/libexec/p11-kit \
		"$subpkgdir"/etc/init.d
	mv "$pkgdir"/usr/lib/pkcs11/p11-kit-client.so \
		"$subpkgdir"/usr/lib/pkcs11
	mv "$pkgdir"/usr/libexec/p11-kit/p11-kit-server \
		"$subpkgdir"/usr/libexec/p11-kit
}

sha512sums="7d0bbd793b43dba081054b4d022a8dbd1d477a3bd6aced72a641087023cf020f1d898899a08e737880e6c810f924814c62497c5ecb19f8322cde42667426a9a7  p11-kit-0.23.16.1.tar.gz"