APKBUILD 1.29 KB
Newer Older
1 2 3
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
4
pkgname=nettle
J0WI's avatar
J0WI committed
5 6
pkgver=3.5.1
pkgrel=0
7
pkgdesc="A low-level cryptographic library"
J0WI's avatar
J0WI committed
8
url="https://www.lysator.liu.se/~nisse/nettle/"
9
arch="all"
10
license="LGPL-2.0-or-later"
Jakub Jirutka's avatar
Jakub Jirutka committed
11 12
depends_dev="gmp-dev"
makedepends="$depends_dev m4"
13
subpackages="$pkgname-dev $pkgname-utils"
J0WI's avatar
J0WI committed
14
source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
Jakub Jirutka's avatar
Jakub Jirutka committed
15
builddir="$srcdir/$pkgname-$pkgver"
16 17 18

build() {
	./configure \
19 20
		--build=$CBUILD \
		--host=$CHOST \
21 22
		--prefix=/usr \
		--sysconfdir=/etc \
23
		--libdir=/usr/lib \
24 25 26
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
J0WI's avatar
J0WI committed
27
		--enable-fat \
28
		--enable-shared \
Robert Y's avatar
Robert Y committed
29
		--disable-openssl \
J0WI's avatar
J0WI committed
30
		--disable-static
31
	make
Natanael Copa's avatar
Natanael Copa committed
32
	# strip comments in fields from .pc as it confuses pkgconf
33 34 35 36 37 38
	sed -i -e 's/ \#.*//' *.pc
}

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

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

45 46 47 48 49 50
utils() {
	pkgdesc="Utils for nettle"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

J0WI's avatar
J0WI committed
51
sha512sums="f738121b9091cbe79435fb5d46b45cf6f10912320c233829356908127bab1cac6946ca56e022a832380c44f2c10f21d2feef64cb0f4f41e3da4a681dc0131784  nettle-3.5.1.tar.gz"