summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDasith Gunawardhana2021-05-12 21:14:34 -0700
committerDasith Gunawardhana2021-05-12 21:14:34 -0700
commit5066777678e7eeff6c6323de9df6dfbd61c983b4 (patch)
treef881b4de17e18280e1921337f01ee64f8478ed4a
parentf8c59cefd3df8824c38f0161cda339b77f26804e (diff)
downloadaur-5066777678e7eeff6c6323de9df6dfbd61c983b4.tar.gz
add git to makedepends; install license and docs; improve pkgver
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD22
2 files changed, 14 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9379078fe591..42cab9680367 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index c24638673cc3..dad7c899f331 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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}"
}