summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD28
2 files changed, 44 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..120a9429569
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = swaywsr-git
+ pkgdesc = sway workspace renamer
+ pkgver = 1.0.0.r7.g7f022ce
+ pkgrel = 1
+ url = https://github.com/pedroscaff/swaywsr
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = rust
+ provides = swaywsr
+ conflicts = swaywsr
+ source = swaywsr::git+https://github.com/pedroscaff/swaywsr
+ sha1sums = SKIP
+
+pkgname = swaywsr-git
+
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"
+}