diff options
author | Shulhan | 2024-03-27 01:04:53 +0700 |
---|---|---|
committer | Shulhan | 2024-03-27 01:04:53 +0700 |
commit | 4247f506c4affedb589d257749e1fdffa73cfbba (patch) | |
tree | 6655ae96b996e44eaf5ea731b1fd6185a9dfbc38 | |
parent | dc0733fe25e6b2bdb47951c77036f0ea53bc262e (diff) | |
download | aur-4247f506c4affedb589d257749e1fdffa73cfbba.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.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 12 |
3 files changed, 9 insertions, 7 deletions
@@ -1,6 +1,6 @@ pkgbase = rescached-git pkgdesc = Resolver/DNS cache daemon - pkgver = 4.4.2.r5.g842206e + pkgver = 4.4.2.r9.gd35cf24 pkgrel = 1 url = https://git.sr.ht/~shulhan/rescached install = rescached.install diff --git a/.gitignore b/.gitignore index 8f959dc77c27..feb2a8f86310 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,6 @@ *.zst /libvos/ /pkg/ -/rescached-git-remote/ +/rescached-local/ /rescached-git/ /src/ @@ -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 \ |