diff options
author | GreyXor | 2023-12-30 16:52:42 +0100 |
---|---|---|
committer | GreyXor | 2023-12-30 16:52:42 +0100 |
commit | d3610cab434b9165e8bfe760e0371afb537e7908 (patch) | |
tree | eaf367d991cd38aac640a1e98126804aa3d025d4 | |
parent | 7246e462dfd20ee931bf40cf5ca8cd5f9ce777dc (diff) | |
download | aur-d3610cab434b9165e8bfe760e0371afb537e7908.tar.gz |
refactor: new pkgver format
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 49 |
2 files changed, 26 insertions, 26 deletions
@@ -1,6 +1,6 @@ pkgbase = swaylock-git pkgdesc = Screen locker for Wayland (git development version) - pkgver = r317.91bb968 + pkgver = 1.7.2.r18.g91bb968 pkgrel = 1 url = https://github.com/swaywm/swaylock arch = x86_64 @@ -18,7 +18,6 @@ pkgbase = swaylock-git depends = libxkbcommon provides = swaylock conflicts = swaylock - backup = etc/pam.d/swaylock source = swaylock-git::git+https://github.com/swaywm/swaylock.git b2sums = SKIP @@ -1,46 +1,47 @@ # Maintainer: GreyXor <greyxor@protonmail.com> # Contributor: Primalmotion <primalmotion@pm.me> # Contributor: gilbus <aur@tinkershell.eu> - pkgname=swaylock-git -pkgver=r317.91bb968 +pkgver=1.7.2.r18.g91bb968 pkgrel=1 pkgdesc='Screen locker for Wayland (git development version)' -url='https://github.com/swaywm/swaylock' -license=('MIT') -provides=("${pkgname%-git}") -conflicts=("${pkgname%-git}") arch=('x86_64') +url="https://github.com/swaywm/swaylock" +license=("MIT") depends=( - "cairo" - "gdk-pixbuf2" - "glib2" - "glibc" - "pam" - "wayland" - "libxkbcommon" +"cairo" +"gdk-pixbuf2" +"glib2" +"glibc" +"pam" +"wayland" +"libxkbcommon" ) makedepends=( - "git" - "meson" - "scdoc" - "wayland-protocols" +"git" +"meson" +"scdoc" +"wayland-protocols" ) -backup=('etc/pam.d/swaylock') -source=("${pkgname}::git+https://github.com/swaywm/swaylock.git") +provides=("${pkgname%-git}") +conflicts=("${pkgname%-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" - 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" } |