summaryrefslogtreecommitdiffstats
path: root/main/p11-kit/APKBUILD
blob: 8087dab514851ce6be6581993d7b39d89d83e60b (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
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=p11-kit
pkgver=0.18.4
pkgrel=0
pkgdesc="Library for loading and sharing PKCS#11 modules"
url="http://p11-glue.freedesktop.org/"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="libtasn1-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-trust"
source="http://p11-glue.freedesktop.org/releases/$pkgname-$pkgver.tar.gz"
_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

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 \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/*.la \
		"$pkgdir"/usr/lib/pkcs11/*.la
}

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

	mv "$pkgdir"/usr/lib/p11-kit/p11-kit-extract-trust \
		"$subpkgdir"/usr/lib/p11-kit/ || return 1
	mv "$pkgdir"/usr/share/p11-kit/modules/p11-kit-trust.module \
		"$subpkgdir"/usr/share/p11-kit/modules/ || return 1
	mv "$pkgdir"/usr/lib/pkcs11/p11-kit-trust.so \
		"$subpkgdir"/usr/lib/pkcs11/ || return 1
}

md5sums="9535c4e5b9c2ef5f5cd0755115ba098b  p11-kit-0.18.4.tar.gz"
sha256sums="df5424ec39e17c2b3b98819bf772626e9b8c73871a8b82e54151f6297d8575fd  p11-kit-0.18.4.tar.gz"
sha512sums="8d3fde08560e627d1762ce65cdab50eedca6f83154c1419b0823c9134dd02eb5036d6a60347b6fd073fcd97b3c4a9b68b2f6a31fb25ee3765205c7d3d9b3f257  p11-kit-0.18.4.tar.gz"