aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorDennis Przytarski <dennis@przytarski.com>2015-07-20 07:56:06 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2015-07-20 08:04:24 +0000
commit6ea7e80c22ba9311574b16c0d0c241ba6ecd021b (patch)
tree5332de25ff8f5ee8c36c2e67ea8586e410ee1c68 /testing
parent4d86f7372e34e808ed50a88c142b1bae515cf3ad (diff)
downloadaports-6ea7e80c22ba9311574b16c0d0c241ba6ecd021b.tar.bz2
aports-6ea7e80c22ba9311574b16c0d0c241ba6ecd021b.tar.xz
testing/rng-tools: new aport
a random number generator daemon http://sourceforge.net/projects/gkernel/
Diffstat (limited to 'testing')
-rw-r--r--testing/rng-tools/APKBUILD58
-rw-r--r--testing/rng-tools/rngd.confd4
-rw-r--r--testing/rng-tools/rngd.initd26
3 files changed, 88 insertions, 0 deletions
diff --git a/testing/rng-tools/APKBUILD b/testing/rng-tools/APKBUILD
new file mode 100644
index 0000000000..8747e23104
--- /dev/null
+++ b/testing/rng-tools/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Dennis Przytarski <dennis@przytarski.com>
+# Maintainer:
+pkgname=rng-tools
+pkgver=5
+pkgrel=0
+pkgdesc="a random number generator daemon"
+url="http://sourceforge.net/projects/gkernel/"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev="argp-standalone linux-headers"
+makedepends="$depends_dev"
+install=
+subpackages=
+source="http://downloads.sourceforge.net/project/gkernel/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
+ rngd.confd
+ rngd.initd
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ export LIBS="-largp"
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/rng-tools \
+ --sysconfdir=/etc \
+ --disable-silent-rules
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="${pkgdir}" install || return 1
+
+ install -m644 -D "${srcdir}/rngd.confd" "${pkgdir}/etc/conf.d/rngd" || return 1
+ install -m755 -D "${srcdir}/rngd.initd" "${pkgdir}/etc/init.d/rngd" || return 1
+}
+
+md5sums="6726cdc6fae1f5122463f24ae980dd68 rng-tools-5.tar.gz
+6f883db10f299d0640e0b3c5fa6e6175 rngd.confd
+afe366ae9d230898abf7984e4fd6686a rngd.initd"
+sha256sums="60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e rng-tools-5.tar.gz
+5cd5751f8b849b3df9c8d5203e137123ef4603eb882f02603c83a61c5365f237 rngd.confd
+3bf0a290067f4e02aa1b655ecd609ab21ff4bea28aab77659c4926a26029ec28 rngd.initd"
+sha512sums="58047c37cad4f5f1210b696e4dba122878f78e57d05d9cb822f79234240ecce31efd2d39061fea1eb5b2e81d48d8c3bf6b92d06451f1ce5d5db7117704e89c50 rng-tools-5.tar.gz
+2823cdb88cd45652d7d5097cdb239b404d7754930995f957dc2653c03762952cefc7c804f3dabfe8a4836bd098a4265cff67cff351b22cccf94d70efad293e2b rngd.confd
+833612de0fb3f3f4a43a1d570660bd95a544983f1fe6e4a7b34e2a039729512dd76077e1a2469552830b98a869e47f4c8685fc55219beaca267993d8f0bdd2b9 rngd.initd"
diff --git a/testing/rng-tools/rngd.confd b/testing/rng-tools/rngd.confd
new file mode 100644
index 0000000000..8650720521
--- /dev/null
+++ b/testing/rng-tools/rngd.confd
@@ -0,0 +1,4 @@
+command=/usr/sbin/rngd
+command_args="--no-drng=1 --no-tpm=1"
+pidfile=/var/run/rngd.pid
+
diff --git a/testing/rng-tools/rngd.initd b/testing/rng-tools/rngd.initd
new file mode 100644
index 0000000000..5ec04239a2
--- /dev/null
+++ b/testing/rng-tools/rngd.initd
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+
+name=rngd
+daemon=/usr/sbin/$name
+
+depend() {
+ need localmount
+ after urandom
+ provide entropy
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start \
+ --pidfile $pidfile --exec $command -- $command_args
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ if [ -f $pidfile ]; then
+ start-stop-daemon --stop --pidfile $pidfile
+ fi
+ ewend $?
+}
+