aboutsummaryrefslogtreecommitdiffstats
path: root/main/rng-tools/APKBUILD
blob: b2e0c36088cdb418616c1e99b177731b928a259a (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
# Contributor: Dennis Przytarski <dennis@przytarski.com>
# Maintainer: ScrumpyJack <scrumypjack@st.ilet.to>
pkgname=rng-tools
pkgver=6.9
pkgrel=0
pkgdesc="A random number generator daemon"
url="https://github.com/nhorman/rng-tools"
arch="all"
license="GPL-2.0-or-later"
makedepends="argp-standalone autoconf automake linux-headers libtool sysfsutils-dev"
subpackages="$pkgname-doc $pkgname-openrc"
source="rng-tools-$pkgver.tar.gz::https://github.com/nhorman/rng-tools/archive/v$pkgver.tar.gz
	fix-textrels-on-PIC-x86.patch
	rngd.confd
	rngd.initd
	"

# power DARN support requires libgcrypt
case "$CARCH" in
	ppc64le) makedepends="$makedepends libgcrypt-dev";;
	*) _flags="--without-libgcrypt";;
esac

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	export LIBS="-largp"

	# NOTE: nistbeacon depends on libxml2 and libcurl, so it would
	# significantly increase rng-tools' total size.
	# Likewise for libgcrypt.
	./configure \
		--prefix=/usr \
		--libexecdir=/usr/lib/rng-tools \
		--sysconfdir=/etc \
		--disable-silent-rules \
		--without-nistbeacon \
		--without-pkcs11 \
		$_flags
	make
}

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

	install -m 644 -D "$srcdir"/rngd.confd "$pkgdir"/etc/conf.d/rngd
	install -m 755 -D "$srcdir"/rngd.initd "$pkgdir"/etc/init.d/rngd
}

sha512sums="08d0b19c309331fd2a2cfb5523a980d5ab1a2e727d06e2b3ecc8851aa94b6fffe9021714f33b5bd1eeb8e6a1d28ab865845520d8e4c96ab3f63019718c08ae7b  rng-tools-6.9.tar.gz
241b56146ec8e55572711b7aa36fa2afbe7a9527d25f03098f35f4c52a9049933d9bc2a82b0e2e0dbc836409d7f650f3a88ef546d6c5a687f7be8fbe4a013b7e  fix-textrels-on-PIC-x86.patch
363b5aa431a0da37fc9eb8c93cffed0b75f43064530318fb41c774acd8aab8a1e109cf6c294b77fa6b8f97aa355b2849f56e83d8b06bcd9e0e9f3aa4f3ba49ac  rngd.confd
86a6a7446eda64c075e468bc304008314b710629e06146582c5ce3fcc307a6b4baf5f8e8a47b72f1bab0bb608d76f953f2712cddd35809abcb02b8320c682535  rngd.initd"