diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 26 insertions, 12 deletions
@@ -1,37 +1,48 @@ # Maintainer: shulhan <ms@kilabit.info> pkgname=rescached-git -pkgver=3.0.2.r0.g5c3f180 +pkgver=4.4.2.r9.gd35cf24 pkgrel=1 pkgdesc="Resolver/DNS cache daemon" arch=('i686' 'x86_64' 'armv7h') -url="https://github.com/shuLhan/rescached-go" -license=('custom:BSD') +url="https://git.sr.ht/~shulhan/rescached" +license=('GPL-3.0-or-later') depends=('bash') provides=('rescached') +makedepends=('git' 'go>=1.20') -makedepends=('git' 'go>=1.13') +_sourcedir=$pkgname source=( - "$pkgname::git+https://github.com/shuLhan/rescached-go.git" + "$pkgname::git+https://git.sr.ht/~shulhan/rescached" ) +## For testing on local. +#_sourcedir=rescached-local +#source=( +# "$_sourcedir::git+file:///home/ms/go/src/git.sr.ht/~shulhan/rescached#branch=dev" +#) + sha1sums=( 'SKIP' ) backup=( + 'etc/rescached/block.d/.pgl.yoyo.org' + 'etc/rescached/block.d/.someonewhocares.org' + 'etc/rescached/block.d/.winhelp2002.mvps.org' 'etc/rescached/rescached.cfg' - 'etc/rescached/hosts.d/hosts.block' - 'etc/rescached/localhost.cert.pem' - 'etc/rescached/localhost.key.pem' + 'etc/rescached/localhost.pem' + 'etc/rescached/localhost.pem.key' ) +install=rescached.install + pkgver() { - cd "$pkgname" + cd "$_sourcedir" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { - cd "$pkgname" + cd "$_sourcedir" echo ">>" echo ">> cleaning ..." echo ">>" @@ -40,11 +51,14 @@ build() { echo ">> make ..." echo ">>" unset GOROOT + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" make || return 1 } package() { - cd "$pkgname" + cd "$_sourcedir" make PREFIX="$pkgdir" install - install -Dm644 $srcdir/$pkgname/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -rf ${pkgdir}/usr/share/rescached/ + install -Dm644 $srcdir/$pkgname/COPYING \ + "${pkgdir}/usr/share/licenses/rescached/COPYING" } |