summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Feletto2022-08-18 12:14:51 +0200
committerAndrea Feletto2022-08-18 12:14:51 +0200
commitf4d887fd8eb9f0d039e31cac0c9533e4df0b7424 (patch)
treeb7186018867901be2f56b30195c63a7aa5ac8459
parent343a821ec8df501d6e09ba29e317dd774ec3e3d1 (diff)
downloadaur-f4d887fd8eb9f0d039e31cac0c9533e4df0b7424.tar.gz
use version from build.zig and use upstream desktop entry
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD17
-rw-r--r--river.desktop5
3 files changed, 10 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5379a17f30c1..7cf75737b677 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = river-noxwayland-git
pkgdesc = A dynamic tiling wayland compositor.
- pkgver = 0.1.0.r107.gbc610c8
+ pkgver = 0.2.0_dev.r115.g844ffce
pkgrel = 1
url = https://github.com/riverwm/river
arch = x86_64
@@ -28,12 +28,10 @@ pkgbase = river-noxwayland-git
source = git+https://github.com/ifreund/zig-wayland.git
source = git+https://github.com/swaywm/zig-wlroots.git
source = git+https://github.com/ifreund/zig-xkbcommon.git
- source = river.desktop
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = 6ccc55e95666904cbdeeeeed841a16f728cbae2609646130a4c53785e588e4b0
pkgname = river-noxwayland-git
diff --git a/PKGBUILD b/PKGBUILD
index f8e066f671bd..a06481b73bcc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=river-noxwayland-git
_pkgname=river
-pkgver=0.1.0.r107.gbc610c8
+pkgver=0.2.0_dev.r115.g844ffce
pkgrel=1
pkgdesc='A dynamic tiling wayland compositor.'
arch=('x86_64')
@@ -27,7 +27,6 @@ source=(
'git+https://github.com/ifreund/zig-wayland.git'
'git+https://github.com/swaywm/zig-wlroots.git'
'git+https://github.com/ifreund/zig-xkbcommon.git'
- 'river.desktop'
)
sha256sums=(
'SKIP'
@@ -35,7 +34,6 @@ sha256sums=(
'SKIP'
'SKIP'
'SKIP'
- '6ccc55e95666904cbdeeeeed841a16f728cbae2609646130a4c53785e588e4b0'
)
prepare() {
@@ -48,18 +46,21 @@ prepare() {
}
pkgver() {
+ local version commit_count commit_hash
+
cd "$srcdir/$_pkgname"
- git describe --long | sed 's/^v//;s/-/.r/;s/-/./'
+ version=$(sed -n 's/^const version = "\(.*\)";/\1/p' build.zig | tr '-' '_')
+ commit_count=$(git describe --long | cut -d- -f2)
+ commit_hash=$(git describe --long | cut -d- -f3)
+ printf '%s.r%s.%s\n' "$version" "$commit_count" "${commit_hash}"
}
package() {
cd "$srcdir/$_pkgname"
- DESTDIR="$pkgdir" zig build --prefix '/usr'
+ DESTDIR="$pkgdir" zig build --prefix '/usr' -Drelease-safe
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$_pkgname"
install -Dm644 README.md -t "$pkgdir/usr/share/doc/$_pkgname"
+ install -Dm644 contrib/river.desktop -t "$pkgdir/usr/share/wayland-sessions"
install -d "$pkgdir/usr/share/$_pkgname"
cp -fR example "$pkgdir/usr/share/$_pkgname"
-
- cd "$srcdir"
- install -Dm644 river.desktop -t "$pkgdir/usr/share/wayland-sessions"
}
diff --git a/river.desktop b/river.desktop
deleted file mode 100644
index 0e006ba48701..000000000000
--- a/river.desktop
+++ /dev/null
@@ -1,5 +0,0 @@
-[Desktop Entry]
-Name=river
-Comment=A dynamic tiling Wayland compositor
-Exec=river
-Type=Application \ No newline at end of file