PKGBUILD: Get version of package from git tag

pull/23/head
nxshock 3 years ago
parent 9ec24496f6
commit b815bc2cd0

@ -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-<version>-1-x86_64.pkg.tar.xz
```

@ -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"

Loading…
Cancel
Save