summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorShulhan2024-03-27 01:04:53 +0700
committerShulhan2024-03-27 01:04:53 +0700
commit4247f506c4affedb589d257749e1fdffa73cfbba (patch)
tree6655ae96b996e44eaf5ea731b1fd6185a9dfbc38 /PKGBUILD
parentdc0733fe25e6b2bdb47951c77036f0ea53bc262e (diff)
downloadaur-rescached-git.tar.gz
all: update PKGBUILD for working with local repository
Instead of using the same variable "$pkgname", create new variable "$_sourcedir" that changes based on the type of repository.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD12
1 files changed, 7 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6b917043739b..9a25fd1426ed 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: shulhan <ms@kilabit.info>
pkgname=rescached-git
-pkgver=4.4.2.r5.g842206e
+pkgver=4.4.2.r9.gd35cf24
pkgrel=1
pkgdesc="Resolver/DNS cache daemon"
arch=('i686' 'x86_64' 'armv7h')
@@ -11,12 +11,14 @@ depends=('bash')
provides=('rescached')
makedepends=('git' 'go>=1.20')
+_sourcedir=$pkgname
source=(
"$pkgname::git+https://git.sr.ht/~shulhan/rescached"
)
## For testing on local.
+#_sourcedir=rescached-local
#source=(
-# "$pkgname::git+file:///.."
+# "$_sourcedir::git+file:///home/ms/go/src/git.sr.ht/~shulhan/rescached#branch=dev"
#)
sha1sums=(
@@ -35,12 +37,12 @@ backup=(
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 ">>"
@@ -54,7 +56,7 @@ build() {
}
package() {
- cd "$pkgname"
+ cd "$_sourcedir"
make PREFIX="$pkgdir" install
rm -rf ${pkgdir}/usr/share/rescached/
install -Dm644 $srcdir/$pkgname/COPYING \