summaryrefslogtreecommitdiff
path: root/community/haveged
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-22 23:15:13 +0000
committerroot <root@rshg054.dnsready.net>2012-01-22 23:15:13 +0000
commit164067832916c8e59219e1b0f30d7d04618a536e (patch)
tree5ec718dc77dfccfcdb1409707658bef3fb421ac4 /community/haveged
parenta1922d0ec660fdc1892f2783515f781c090df0a9 (diff)
Sun Jan 22 23:15:13 UTC 2012
Diffstat (limited to 'community/haveged')
-rw-r--r--community/haveged/PKGBUILD31
-rw-r--r--community/haveged/haveged44
2 files changed, 75 insertions, 0 deletions
diff --git a/community/haveged/PKGBUILD b/community/haveged/PKGBUILD
new file mode 100644
index 000000000..e3a60bdb9
--- /dev/null
+++ b/community/haveged/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Bartłomiej Piotrowski <barthalion@gmail.com>
+# Contributor: kfgz <kfgz at interia dot pl>
+# Contributor: pootzko <pootzko at gmail dot com>
+
+pkgname=haveged
+pkgver=1.3a
+pkgrel=1
+pkgdesc="A simple entropy daemon."
+arch=('i686' 'x86_64')
+url="http://www.issihosts.com/haveged"
+license=('GPL')
+depends=('bash')
+source=(${url}/${pkgname}-${pkgver}.tar.gz
+ haveged)
+md5sums=('dad8b95c6eafcec7eb42eb8454e60a0d'
+ '264b725be5271288b40f363d7cfc6b68')
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver/a/}
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/${pkgname}-${pkgver/a/}
+ make DESTDIR="${pkgdir}" install
+ rm -rf "${pkgdir}"/etc/init.d
+
+ cd "${srcdir}"
+ install -D -m755 haveged "${pkgdir}"/etc/rc.d/haveged
+}
diff --git a/community/haveged/haveged b/community/haveged/haveged
new file mode 100644
index 000000000..c0e13b40d
--- /dev/null
+++ b/community/haveged/haveged
@@ -0,0 +1,44 @@
+#!/bin/bash
+##
+# chkconfig: 2345 75 25
+# description: havege entropy daemon
+#
+# source function library
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+RETVAL=0
+prog="haveged"
+
+case "$1" in
+start)
+ stat_busy $"Starting $prog"
+ /usr/sbin/$prog -w 1024 -v 1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon $prog
+ stat_done
+ fi
+ ;;
+
+stop)
+ stat_busy $"Stopping $prog"
+ kill `cat /var/run/$prog.pid`
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon $prog
+ stat_done
+ rm -f /var/lock/$prog
+ fi
+ ;;
+
+restart)
+ $0 stop
+ $0 start
+ ;;
+
+*)
+ echo "usage: $prog [start|stop|restart]"
+esac