aboutsummaryrefslogtreecommitdiffstats
path: root/testing/haveged
diff options
context:
space:
mode:
authorDanilo Godec <danilo.godec@agenda.si>2011-08-23 13:16:04 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-23 12:27:59 +0000
commit74c5bedf5008b93ccd50312d4a25b7f0b86d0e0b (patch)
treeed013dc9a1deeff0c11f3e1ec94aab1455b01087 /testing/haveged
parent53f5db04542cb6f8816a68ab6595720a12a01305 (diff)
downloadaports-74c5bedf5008b93ccd50312d4a25b7f0b86d0e0b.tar.bz2
aports-74c5bedf5008b93ccd50312d4a25b7f0b86d0e0b.tar.xz
haveged - new aport. haveged is a daemon that feeds the /dev/random pool on Linux.
Diffstat (limited to 'testing/haveged')
-rw-r--r--testing/haveged/APKBUILD50
-rw-r--r--testing/haveged/haveged.confd5
-rw-r--r--testing/haveged/haveged.initd18
3 files changed, 73 insertions, 0 deletions
diff --git a/testing/haveged/APKBUILD b/testing/haveged/APKBUILD
new file mode 100644
index 0000000000..7ddc258bd3
--- /dev/null
+++ b/testing/haveged/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer:
+pkgname=haveged
+pkgver=1.2
+pkgrel=0
+pkgdesc="haveged is a daemon that feeds the /dev/random pool on Linux"
+url="http://freshmeat.net/projects/haveged"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="saveas-http://freshmeat.net/urls/d3425b56b35b00df22090e077d802c1c/$pkgname-$pkgver.tar.gz haveged.initd haveged.confd"
+
+_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"
+ ./configure --prefix /usr --sysconfdir /etc
+ make || return 1
+ make check || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+ install -Dm644 AUTHORS "$pkgdir"/usr/share/doc/$pkgname/AUTHORS
+ install -Dm644 ChangeLog "$pkgdir"/usr/share/doc/$pkgname/ChangeLog
+ install -Dm644 INSTALL "$pkgdir"/usr/share/doc/$pkgname/INSTALL
+ install -Dm644 NEWS "$pkgdir"/usr/share/doc/$pkgname/NEWS
+ install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
+ install -Dm755 "$srcdir"/haveged.initd "$pkgdir"/etc/init.d/haveged
+ install -Dm644 "$srcdir"/haveged.confd "$pkgdir"/etc/conf.d/haveged
+}
+
+md5sums="dc961f36c065239f2ddeeb840ddf9ec0 haveged-1.2.tar.gz
+0718d29f820b878a311e939b3682935c haveged.initd
+242300ea7948a16018d1b0f77fb5ec96 haveged.confd"
diff --git a/testing/haveged/haveged.confd b/testing/haveged/haveged.confd
new file mode 100644
index 0000000000..9ee6c61776
--- /dev/null
+++ b/testing/haveged/haveged.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/haveged
+
+# Any extra options you want to pass to haveged
+# on start-up should be put here.
+HAVEGED_OPTS=""
diff --git a/testing/haveged/haveged.initd b/testing/haveged/haveged.initd
new file mode 100644
index 0000000000..d8b2fadbf9
--- /dev/null
+++ b/testing/haveged/haveged.initd
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting haveged"
+ start-stop-daemon --start --quiet --exec /usr/sbin/haveged -- ${HAVEGED_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping haveged"
+ start-stop-daemon --stop --quiet --pidfile /var/run/haveged.pid
+ result=$?
+ eend $result
+}