From b815bc2cd0867fdfbb91f584499accffbaca40ae Mon Sep 17 00:00:00 2001 From: nxshock Date: Sun, 4 Apr 2021 18:14:08 +0500 Subject: [PATCH] PKGBUILD: Get version of package from git tag --- README.md | 5 +++-- contrib/PKGBUILD | 14 ++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 44041e5..3ca2fd3 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,10 @@ Create and install package with this commands: ```sh # make package -curl -L -O https://raw.githubusercontent.com/Revertron/Alfis/master/contrib/PKGBUILD +git clone https://github.com/Revertron/Alfis.git +cd Alfis/contrib makepkg # install package (from root) -pacman -U alfis-0.3.12-1-x86_64.pkg.tar.xz +pacman -U alfis--1-x86_64.pkg.tar.xz ``` diff --git a/contrib/PKGBUILD b/contrib/PKGBUILD index f7280b2..a5eb7fc 100644 --- a/contrib/PKGBUILD +++ b/contrib/PKGBUILD @@ -1,27 +1,25 @@ pkgname=alfis -pkgver=0.3.12 +pkgver=$(sh ./semver/version.sh --bare) pkgrel=1 pkgdesc="Alternative Free Identity System" arch=('x86_64' 'aarch64') license=('AGPL3') url='https://github.com/Revertron/Alfis' -depends=('webkit2gtk' 'gtk3' 'atk' 'pango') -makedepends=('cargo' 'rust') +depends=('webkit2gtk' 'gtk3') +makedepends=('cargo' 'rust' 'atk' 'pango') backup=("etc/$pkgname.conf") -source=('git+https://github.com/Revertron/Alfis.git') -sha256sums=('SKIP') build() { - cd "$srcdir/Alfis" + cd "$startdir/.." cargo build --release --all-features --target-dir=target } package() { - cd "$srcdir/Alfis" + cd "$startdir/.." install -Dm 755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname" - + install -Dm 644 "contrib/systemd/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" install -Dm 644 "contrib/systemd/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" install -Dm 644 "contrib/systemd/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"