diff options
author | Dasith Gunawardhana | 2021-05-12 21:14:34 -0700 |
---|---|---|
committer | Dasith Gunawardhana | 2021-05-12 21:14:34 -0700 |
commit | 5066777678e7eeff6c6323de9df6dfbd61c983b4 (patch) | |
tree | f881b4de17e18280e1921337f01ee64f8478ed4a | |
parent | f8c59cefd3df8824c38f0161cda339b77f26804e (diff) | |
download | aur-5066777678e7eeff6c6323de9df6dfbd61c983b4.tar.gz |
add git to makedepends; install license and docs; improve pkgver
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 22 |
2 files changed, 14 insertions, 11 deletions
@@ -1,10 +1,11 @@ pkgbase = waylock-git pkgdesc = Waylock is a simple screenlocker for wayland compositors. - pkgver = 0.3.3.105.g2391ef6 + pkgver = 0.3.3.r2.gd4f4308 pkgrel = 1 url = https://github.com/ifreund/waylock arch = x86_64 license = MIT + makedepends = git makedepends = rust depends = pam provides = waylock @@ -1,34 +1,36 @@ _pkgname=waylock pkgname=${_pkgname}-git -pkgver=0.3.3.105.g2391ef6 +pkgver=0.3.3.r2.gd4f4308 pkgrel=1 arch=('x86_64') url="https://github.com/ifreund/waylock" pkgdesc="Waylock is a simple screenlocker for wayland compositors." license=('MIT') depends=('pam') -makedepends=('rust') +makedepends=('git' 'rust') provides=('waylock') conflicts=('waylock') source=("git+https://github.com/ifreund/waylock.git") sha256sums=('SKIP') pkgver() { - cd $_pkgname - echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" + cd "$_pkgname" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { - cd "$_pkgname" - cargo build --release --locked --all-features --target-dir=target + cd "$_pkgname" + cargo build --release --locked --all-features --target-dir=target } check(){ - cd "$_pkgname" - cargo test --release --locked --target-dir=target + cd "$_pkgname" + cargo test --release --locked --target-dir=target } package() { - cd "$_pkgname" - install -Dm 755 target/release/${_pkgname} -t "${pkgdir}/usr/bin" + cd "$_pkgname" + install -Dm 755 target/release/${_pkgname} -t "${pkgdir}/usr/bin" + install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}" + install -vDm 644 {README.md,waylock.toml} -t "${pkgdir}/usr/share/doc/${_pkgname}" } |