aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcr/APKBUILD
blob: 1c6de148830be14a5858f68b0ac4abaaedfd2de1 (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
66
67
68
69
70
71
72
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gcr
pkgver=3.34.0
pkgrel=0
pkgdesc="A library for bits of crypto UI and parsing"
url="https://wiki.gnome.org/Projects/CryptoGlue"
arch="all"
license="LGPL-2.0-or-later"
makedepends="glib-dev gtk+3.0-dev libgcrypt-dev p11-kit-dev
	gobject-introspection-dev libxslt vala"
checkdepends="python3"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-base"
source="https://download.gnome.org/sources/gcr/${pkgver%.*}/gcr-$pkgver.tar.xz
	remove-failing-test.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-introspection \
		--enable-vala
	make
}

check() {
	# only run tests that does not require gnupg to avoid circular dependency:
	#  gcr -> gnupg -> pinentry -> gcr
	make check TESTS="
		test-asn1 test-asn1x test-dn
		test-decimal test-hex test-hkdf
		test-oid test-secmem test-padding
		test-symkey test-armor test-openssl
		test-dh
		test-gck-attributes test-gck-module
		test-gck-slot test-gck-session
		test-gck-object test-gck-crypto
		test-gck-uri test-gck-enumerator
		test-gck-modules
		test-secret-exchange test-simple-certificate
		test-certificate test-certificate-chain
		test-subject-public-key test-fingerprint
		test-pkcs11-certificate test-openpgp
		test-openssh test-secure-memory
		test-trust test-parser
		test-memory-icon test-gnupg-key
		test-gnupg-process
		test-ssh-askpass
	"
}

package() {
	make DESTDIR="$pkgdir" install
}

base() {
	depends=""
	pkgdesc="$pkgdesc (base libraries)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libgck-1.so.* \
		"$pkgdir"/usr/lib/libgcr-base-3.so.* \
		"$subpkgdir"/usr/lib
}

sha512sums="9314b531ed46a42b2c8c1531c7d95003db04f2c8065e46f4e6a84ec26400ce6302ea71c4db42a8c7b98884a0b84d75a0ca65d988aa0fe6de6d897d772b070093  gcr-3.34.0.tar.xz
1e2d8641a3ccc9989704c901ea636c2a6e3c8cd0bc86193bf9c178f7edbddda7158846cb07099ef4098c774a0bcb7a45ddbbd093ce7b5355cca2f7ac3a2d6130  remove-failing-test.patch"