summaryrefslogtreecommitdiff
path: root/social/haveged
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /social/haveged
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'social/haveged')
-rw-r--r--social/haveged/PKGBUILD28
-rw-r--r--social/haveged/haveged44
2 files changed, 72 insertions, 0 deletions
diff --git a/social/haveged/PKGBUILD b/social/haveged/PKGBUILD
new file mode 100644
index 000000000..804a22199
--- /dev/null
+++ b/social/haveged/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: pootzko <pootzko@gmail.com>
+# Contributor: kfgz <kfgz@interia.pl>
+
+pkgname=haveged
+pkgver=1.0
+pkgrel=1
+pkgdesc="A simple entropy daemon."
+arch=('i686' 'x86_64')
+url="http://www.issihosts.com/haveged"
+license="GPL"
+depends=()
+source=(${url}/${pkgname}-${pkgver}.tar.gz
+ haveged)
+md5sums=('72df03658cafac35e087fb75f6d4100d'
+ '264b725be5271288b40f363d7cfc6b68')
+
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
+ make DESTDIR=${pkgdir} install
+ rm -rf ${pkgdir}/etc/init.d
+ cd ${srcdir}
+ install -D -m755 haveged ${pkgdir}/etc/rc.d/haveged
+}
+
+
diff --git a/social/haveged/haveged b/social/haveged/haveged
new file mode 100644
index 000000000..c0e13b40d
--- /dev/null
+++ b/social/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