summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreyXor2023-12-30 16:55:25 +0100
committerGreyXor2023-12-30 16:55:25 +0100
commit09b49edd5b2e0da104c023499e136f5d63a4d2a9 (patch)
tree23bd29fe2599236e0d462cd3ae2ca1a7761cd7cd
parentaf9380f53b82422617f11b1b5f3e020b51db88a0 (diff)
downloadaur-swaybg-git.tar.gz
refactor: new pkgver format
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD47
2 files changed, 25 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index af9741350bf7..dcfca0002fca 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = swaybg-git
pkgdesc = Wallpaper tool for Wayland compositors (git development version)
- pkgver = r130.eabc06e
+ pkgver = 1.2.0.r4.geabc06e
pkgrel = 1
url = https://github.com/swaywm/swaybg
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 76d0730d7348..5823f6951623 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,44 @@
# Maintainer: GreyXor <greyxor@protonmail.com>
# Contributor: Taran Lynn <taranlynn0gmail.com>
-
pkgname=swaybg-git
-pkgver=r130.eabc06e
+pkgver=1.2.0.r4.geabc06e
pkgrel=1
-license=("MIT")
pkgdesc="Wallpaper tool for Wayland compositors (git development version)"
-makedepends=(
- 'meson'
- "git"
- "scdoc"
- "wayland-protocols"
-)
-depends=(
- "cairo"
- "gdk-pixbuf2"
- "glib2"
- "glibc"
- "wayland"
-)
arch=('x86_64')
url="https://github.com/swaywm/swaybg"
+license=("MIT")
+depends=(
+"cairo"
+"gdk-pixbuf2"
+"glib2"
+"glibc"
+"wayland"
+)
+makedepends=(
+'meson'
+"git"
+"scdoc"
+"wayland-protocols"
+)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
-source=("${pkgname}::git+https://github.com/swaywm/swaybg.git")
+source=("${pkgname}::git+${url}.git")
b2sums=('SKIP')
pkgver() {
- # Calculate the version dynamically using git information
- printf "r%s.%s" "$(git -C "$srcdir/${pkgname}" rev-list --count HEAD)" "$(git -C "$srcdir/${pkgname}" rev-parse --short HEAD)"
+ cd "$pkgname"
+
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- arch-meson build "${pkgname}"
- meson compile -C build
+ arch-meson "$pkgname" build
+ meson compile -C build
}
package() {
- meson install -C build --destdir "$pkgdir"
+ meson install -C build --destdir "$pkgdir"
- install -Dm644 "${pkgname}/LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 "${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 "${pkgname}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}