summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJason Nader2020-04-19 15:11:05 +0900
committerJason Nader2020-04-19 15:11:05 +0900
commitfb9f063a3e7e2d48c2f98c0b3701d675c5c9844f (patch)
tree9704e2da226a12764b7bf5f5de4ecb310913f1d2 /PKGBUILD
downloadaur-swaywsr-git.tar.gz
First commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD28
1 files changed, 28 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..08d7825c834
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+pkgname=swaywsr-git
+pkgver=1.0.0.r7.g7f022ce
+pkgrel=1
+pkgdesc='sway workspace renamer'
+arch=('x86_64')
+url='https://github.com/pedroscaff/swaywsr'
+license=('MIT')
+makedepends=('git' 'rust')
+provides=("${pkgname%-*}")
+conflicts=("${pkgname%-*}")
+source=("${pkgname%-*}::git+$url")
+sha1sums=('SKIP')
+
+pkgver() {
+ cd "${pkgname%-*}"
+ echo $(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).r$(git rev-list --count HEAD).g$(git describe --always)
+}
+
+build() {
+ cd "${pkgname%-*}"
+ cargo build --release
+}
+
+package() {
+ cd "${pkgname%-*}"
+ install -Dm755 "target/release/${pkgname%-*}" "$pkgdir/usr/bin/${pkgname%-*}"
+ install -Dm644 assets/example_config.toml -t "$pkgdir/usr/share/doc/${pkgname%-*}/examples/example_config.toml"
+}