aboutsummaryrefslogtreecommitdiffstats
path: root/main/nettle/APKBUILD
blob: 7dee89e0250a19e35df1ab9785e84cbec6a491d9 (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
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=nettle
pkgver=3.7
pkgrel=0
pkgdesc="A low-level cryptographic library"
url="https://www.lysator.liu.se/~nisse/nettle/"
arch="all"
license="LGPL-2.0-or-later"
depends_dev="gmp-dev"
makedepends="$depends_dev m4"
subpackages="$pkgname-static $pkgname-dev $pkgname-utils"
source="https://ftp.gnu.org/gnu/nettle/nettle-$pkgver.tar.gz
	fix-pcc.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libdir=/usr/lib \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-fat \
		--enable-shared \
		--disable-openssl \
		--enable-static
	make
	# strip comments in fields from .pc as it confuses pkgconf
	sed -i -e 's/ \#.*//' ./*.pc
}

check() {
	make -C examples  # required for rsa-encrypt
	make check
}

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

utils() {
	pkgdesc="Utils for nettle"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="be32eff0ea3c83abb8b6670d049a8ce21ea9c7cac3e1a5d41ae003d5160e2683572c7dd8930b869ac1db0b89f9423605e0a8ec0cff074c63e2a60c71996ef66c  nettle-3.7.tar.gz
5dc732fec72e7c9b08b46215454398e514cd24c508ae6cacbf63f0dac2c692e872bf85617886ddc83ae6f07f4e52569ee678ac4864da56dfb5692800583bc6d8  fix-pcc.patch"