summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Lloyd2017-04-03 14:35:20 -0700
committerGavin Lloyd2017-04-03 14:35:20 -0700
commitae837d472b4d7718052a782f2059a5acb44bb23f (patch)
tree87a04ace86ed70d83d8b0a1625f1af872921ad81
downloadaur-ae837d472b4d7718052a782f2059a5acb44bb23f.tar.gz
Init commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD36
-rw-r--r--bit-babbler.install15
-rw-r--r--seedd.service8
4 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ed1f9816a95
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+# Generated by mksrcinfo v8
+# Mon Apr 3 21:33:57 UTC 2017
+pkgbase = bit-babbler
+ pkgdesc = BitBabbler hardware TRNG and kernel entropy source support
+ pkgver = 0.6
+ pkgrel = 1
+ url = http://www.bitbabbler.org
+ install = bit-babbler.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = libusb>=1.0
+ optdepends = munin: monitoring support
+ source = http://www.bitbabbler.org/downloads/bit-babbler_0.6.tar.gz
+ source = http://www.bitbabbler.org/downloads/bit-babbler_0.6.tar.gz.asc
+ source = seedd.service
+ sha256sums = 2187f3c783019084b66290e1b5447959418d4859dd3d3897a3b797c04db9e5e0
+ sha256sums = SKIP
+ sha256sums = c5dbc6f87530c9dee67e7a9df73bffd9b425a3cf03c6a82081f9b7b4f55f59b1
+
+pkgname = bit-babbler
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..dd82ce0c2cd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Gavin Lloyd <gavinhungry@gmail.com>
+
+pkgname=bit-babbler
+pkgver=0.6
+pkgrel=1
+pkgdesc='BitBabbler hardware TRNG and kernel entropy source support'
+arch=('i686' 'x86_64')
+license=('GPL2')
+url='http://www.bitbabbler.org'
+depends=('libusb>=1.0')
+optdepends=('munin: monitoring support')
+source=("${url}/downloads/${pkgname}_${pkgver}.tar.gz"
+ "${url}/downloads/${pkgname}_${pkgver}.tar.gz.asc"
+ "seedd.service")
+install="${pkgname}.install"
+sha256sums=('2187f3c783019084b66290e1b5447959418d4859dd3d3897a3b797c04db9e5e0'
+ 'SKIP'
+ 'c5dbc6f87530c9dee67e7a9df73bffd9b425a3cf03c6a82081f9b7b4f55f59b1')
+validpgpkeys=('8EAF735424339DDDFE835628125831AE66E70556') # BitBabbler Support <support@bitbabbler.org>
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make install DESTDIR="${pkgdir}"
+
+ install -Dm644 debian/bit-babbler-sysctl.conf "${pkgdir}/etc/sysctl.d/bit-babbler-sysctl.conf"
+ install -Dm644 debian/bit-babbler.udev "${pkgdir}/etc/udev/rules.d/bit-babbler.rules"
+ install -Dm644 "${srcdir}/seedd.service" "${pkgdir}/usr/lib/systemd/system/seedd.service"
+}
diff --git a/bit-babbler.install b/bit-babbler.install
new file mode 100644
index 00000000000..093ae45cdef
--- /dev/null
+++ b/bit-babbler.install
@@ -0,0 +1,15 @@
+post_install() {
+ post_upgrade
+ echo 'To use device as a normal user, add user to bit-babbler group'
+
+}
+
+post_upgrade() {
+ getent group bit-babbler &> /dev/null || groupadd bit-babbler &> /dev/null
+ sysctl -q --load /etc/sysctl.d/bit-babbler-sysctl.conf
+ udevadm control --reload-rules
+}
+
+post_remove() {
+ udevadm control --reload-rules
+}
diff --git a/seedd.service b/seedd.service
new file mode 100644
index 00000000000..2ab85d1aae7
--- /dev/null
+++ b/seedd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=BitBabbler entropy source daemon
+
+[Service]
+ExecStart=/usr/bin/seedd -k --socket-group adm
+
+[Install]
+WantedBy=multi-user.target