diff --git a/bind-adblock/PKGBUILD b/bind-adblock/PKGBUILD index 9c88bd3..c9e1f9f 100644 --- a/bind-adblock/PKGBUILD +++ b/bind-adblock/PKGBUILD @@ -1,56 +1,53 @@ # Maintainer: George Rawlinson + pkgname=bind-adblock -pkgver=2009021459 +pkgver=1 pkgrel=1 -pkgdesc="Fetch various blocklists and generate a BIND RPZ zonefile" +pkgdesc='Fetch various blocklists and generate a BIND RPZ zonefile' arch=('any') -url="https://github.com/Trellmor/bind-adblock" +url='https://github.com/Trellmor/bind-adblock' license=('MIT') -depends=('bind>=9.8') -makedepends=(python-requests python-dnspython) +depends=('bind') +makedepends=( + 'git' + 'python-requests' + 'python-dnspython' + 'python-yaml' + 'python-validators' +) backup=('var/named/adblock.rpz') -install=$pkgname.install -# Commit IDs of latest Git commit -_long=7bc3d5b3cd87eb5af11e1b531842eef550df23a7 -_short="${_long:0:6}" -source=("$_short-update-zonefile.py::https://raw.githubusercontent.com/Trellmor/bind-adblock/$_long/update-zonefile.py" - "$_short-LICENSE::https://raw.githubusercontent.com/Trellmor/bind-adblock/$_long/LICENSE" - "$_short-blocklist.txt::https://raw.githubusercontent.com/Trellmor/bind-adblock/$_long/blocklist.txt") -sha512sums=('a83a727021abae5a2b28843d3111177b2e4ef025db462710012cd642b0c445e449b359a3082bb09c925e9f73ca0535ef739bdd1464783aa433b923aeeb6bd53c' - '19c76446db8f97aece5045aeb0e0303d152522383d1d543bb42fcc37dd8d50013030946293047b115f2c3ee0d238f8b1ec6b6dd1b5327d2ff95dded5edd83787' - 'c7a4b2254d9ac5888a7f02649fa97c1f0540bfcd968366f3a64d8a575576d715a05128fc7d8aa6015ec0e1cbf973c1019f9af76b0fb668478efd9806803f2d2f') +install="$pkgname.install" +_commit='c621ce83e89dea5d7c1a19d0d802d6406d406ca5' +source=("$pkgname::git+$url#commit=$_commit") +b2sums=('SKIP') pkgver() { - date +%y%m%d%H%M -} - -prepare() { - mkdir -p "$pkgname" - cp "$_short-update-zonefile.py" "$pkgname/update-zonefile.py" - cp "$_short-blocklist.txt" "$pkgname/blocklist.txt" + date +%y%m%d%H%M } _zonefile=adblock.rpz _origin=adblock.rpz build() { - cd "$pkgname" - # instead of packaging the script, build zonefile & update regularly - python update-zonefile.py \ - --no-bind \ - "$_zonefile-$pkgver" \ - "$_origin" + cd "$pkgname" + # instead of packaging the script, build zonefile & update regularly + python update-zonefile.py \ + --no-bind \ + "$_zonefile-$pkgver" \ + "$_origin" - sed -i "1 s/ 1 / ${pkgver} /" "$_zonefile-$pkgver" + sed -i "1 s/ 1 / ${pkgver} /" "$_zonefile-$pkgver" } package() { - # ensure directory permissions follow upstream (770) - install -dm770 "$pkgdir/var/named" + cd "$pkgname" - # package zonefile - install -Dm644 "$srcdir/$pkgname/$_zonefile-$pkgver" "$pkgdir/var/named/$_zonefile" + # ensure directory permissions follow upstream (770) + install -vdm770 "$pkgdir/var/named" - # package license - install -Dm644 "$srcdir/$_short-LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + # zonefile + install -vDm644 "$_zonefile-$pkgver" "$pkgdir/var/named/$_zonefile" + + # license + install -vDm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" }