summaryrefslogtreecommitdiff
path: root/user/xmlsec/APKBUILD
blob: 5c71b8f19212cc61093cdd87e2866a46f6092e30 (plain) (blame)
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
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=xmlsec
pkgver=1.2.29
_pkgname="$pkgname${pkgver%%.*}"
pkgrel=0
pkgdesc="C-based XML signature and encryption syntax and processing library"
url="https://www.aleksey.com/xmlsec/"
arch="all"
license="MIT"
depends=""
checkdepends="nss-tools"
makedepends="libtool libxml2-dev libxslt-dev openssl-dev
	gnutls-dev libgcrypt-dev nss-dev"
subpackages="$pkgname-dev $pkgname-doc
	$pkgname-gcrypt $pkgname-gnutls $pkgname-nss"
source="http://www.aleksey.com/xmlsec/download/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static \
		--enable-pkgconfig \
		--with-openssl \
		--with-gnutls \
		--with-gcrypt \
		--with-default-crypto='openssl'
	make
}

check() {
	make -k check
}

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

	install -m755 -d "$pkgdir/usr/share/licenses/$pkgname"
	install -m644 'COPYING' "$pkgdir/usr/share/licenses/$pkgname/"
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/xmlsec1Conf.sh "$subpkgdir"/usr/lib
}

gcrypt() {
	pkgdesc="xmlsec gcrypt plugin"
	install_if="$pkgname=$pkgver-r$pkgrel gcrypt"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/libxmlsec1-gcrypt.so* "$subpkgdir"/usr/lib/
}

gnutls() {
	pkgdesc="xmlsec gnutls plugin"
	install_if="$pkgname=$pkgver-r$pkgrel gnutls"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/libxmlsec1-gnutls.so* "$subpkgdir"/usr/lib/
}

nss() {
	pkgdesc="xmlsec NSS plugin"
	install_if="$pkgname=$pkgver-r$pkgrel nss"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/libxmlsec1-nss.so* "$subpkgdir"/usr/lib/
}

sha512sums="07c3012179da4392f0a9d41a51ed51d692ca8b491310488b955d5fef0637f104d3f82374754b0ef175fadc663a8ca8c996178198c5dd77b3a8b34393d1482e4d  xmlsec1-1.2.29.tar.gz"