diff options
author | max.bra | 2017-05-07 17:23:13 +0200 |
---|---|---|
committer | max.bra | 2017-05-07 17:23:13 +0200 |
commit | fd6d4e45d551b068598d9e276f531e0038466181 (patch) | |
tree | 249831e821179ba031518f8b9dfb55a8a1e05d3c | |
download | aur-fd6d4e45d551b068598d9e276f531e0038466181.tar.gz |
v. 2.6.2
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | pi-hole-ftl.install | 14 | ||||
-rw-r--r-- | pi-hole-ftl.service | 10 | ||||
-rw-r--r-- | pi-hole-ftl.sysuser | 1 | ||||
-rw-r--r-- | pi-hole-ftl.tmpfile | 5 |
6 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e9e4f72343c3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = pi-hole-ftl + pkgdesc = The Pi-hole FTL engine + pkgver = 2.6.2 + pkgrel = 1 + url = https://github.com/pi-hole/FTL + install = pi-hole-ftl.install + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + license = EUPL-1.1 + makedepends = git + source = git+https://github.com/pi-hole/FTL.git + source = pi-hole-ftl.tmpfile + source = pi-hole-ftl.service + source = pi-hole-ftl.sysuser + md5sums = SKIP + md5sums = 4618b78f9d52c9101636735c064acce1 + md5sums = b1cffd783b0301656355f3c0987b45d3 + md5sums = 68e78907dc2a0c89421d02377e76d353 + +pkgname = pi-hole-ftl + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..54b043303bd0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: max.bra <max dot bra at alice dot it> + +pkgname=pi-hole-ftl +_pkgname=FTL +pkgver=2.6.2 +pkgrel=1 +arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h') +pkgdesc="The Pi-hole FTL engine" +url="https://github.com/pi-hole/FTL" +license=('EUPL-1.1') +depends=() +makedepends=('git') +install=$pkgname.install +source=("git+https://github.com/pi-hole/FTL.git" + "$pkgname.tmpfile" + "$pkgname.service" + "$pkgname.sysuser") +md5sums=('SKIP' + '4618b78f9d52c9101636735c064acce1' + 'b1cffd783b0301656355f3c0987b45d3' + '68e78907dc2a0c89421d02377e76d353') + +prepare() { + _ssc="/tmp/sedcontrol" + + # setting up logs paths + sed -i "s|/var/log/pihole-FTL.log|/run/log/pihole-ftl/pihole-FTL.log|w $_ssc" "$srcdir"/$_pkgname/structs.c + if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up logs paths 1" && return 1 ; fi + sed -i "s|/var/run/pihole-FTL|/run/log/pihole-ftl/pihole-FTL|w $_ssc" "$srcdir"/$_pkgname/structs.c + if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up logs paths 2" && return 1 ; fi + sed -i "s|/var/log/pihole.log|/run/log/pihole/pihole.log|w $_ssc" "$srcdir"/$_pkgname/structs.c + if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up logs paths 3" && return 1 ; fi +} + +build() { + cd $_pkgname + make +} + +package() { + cd "$srcdir" + install -Dm755 "$_pkgname"/pihole-FTL "${pkgdir}"/usr/bin/pihole-FTL || return 1 + + install -Dm644 "$pkgname.tmpfile" "$pkgdir"/etc/tmpfiles.d/$pkgname.conf || return 1 + + install -Dm644 "$pkgname.sysuser" "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf + + install -Dm644 "$pkgname.service" "$pkgdir"/usr/lib/systemd/system/$pkgname.service || return 1 + install -dm755 "$pkgdir/usr/lib/systemd/system/multi-user.target.wants" + ln -s ../$pkgname.service "$pkgdir/usr/lib/systemd/system/multi-user.target.wants/$pkgname.service" +} diff --git a/pi-hole-ftl.install b/pi-hole-ftl.install new file mode 100644 index 000000000000..7ded1572756f --- /dev/null +++ b/pi-hole-ftl.install @@ -0,0 +1,14 @@ +post_install() { + systemd-tmpfiles --create pi-hole-ftl.conf + + systemctl daemon-reload > /dev/null + systemctl is-active pi-hole-ftl.service 2>&1 >/dev/null || systemctl start pi-hole-ftl.service +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + userdel -f pihole +} diff --git a/pi-hole-ftl.service b/pi-hole-ftl.service new file mode 100644 index 000000000000..52b379192ea2 --- /dev/null +++ b/pi-hole-ftl.service @@ -0,0 +1,10 @@ +[Unit] +Description=Pi-hole FTL engine + +[Service] +User=pihole +Group=pihole +ExecStart=/usr/bin/pihole-FTL + +[Install] +WantedBy=multi-user.target diff --git a/pi-hole-ftl.sysuser b/pi-hole-ftl.sysuser new file mode 100644 index 000000000000..12add1fcd4fc --- /dev/null +++ b/pi-hole-ftl.sysuser @@ -0,0 +1 @@ +u pihole - "pihole daemon" / diff --git a/pi-hole-ftl.tmpfile b/pi-hole-ftl.tmpfile new file mode 100644 index 000000000000..d2e70752c225 --- /dev/null +++ b/pi-hole-ftl.tmpfile @@ -0,0 +1,5 @@ +d /run/log/pihole-ftl 0755 pihole pihole - - +f /run/log/pihole-ftl/pihole-FTL.log 0644 pihole pihole - - +f /run/log/pihole-ftl/pihole-FTL.pid 0644 pihole pihole - - +f /run/log/pihole-ftl/pihole-FTL.port 0644 pihole pihole - - + |