summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreyXor2023-12-29 23:52:47 +0100
committerGreyXor2023-12-29 23:52:47 +0100
commit7246e462dfd20ee931bf40cf5ca8cd5f9ce777dc (patch)
tree548e618b456eeb7fd17c4140e6cfc5a7e8d9e25b
parent614edd953db03c5387932bda3bfd3a42cff2dcae (diff)
downloadaur-7246e462dfd20ee931bf40cf5ca8cd5f9ce777dc.tar.gz
refactor: namcap linting
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD61
3 files changed, 43 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c6ce5d897dbf..8a6556775490 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,25 @@
pkgbase = swaylock-git
- pkgdesc = Screen locker for Wayland
- pkgver = v1.7.2.r2.gac3b49b
+ pkgdesc = Screen locker for Wayland (git development version)
+ pkgver = r317.91bb968
pkgrel = 1
url = https://github.com/swaywm/swaylock
- arch = i686
arch = x86_64
- arch = armv6h
- arch = armv7h
license = MIT
- makedepends = meson
makedepends = git
+ makedepends = meson
makedepends = scdoc
makedepends = wayland-protocols
- depends = wayland
- depends = libxkbcommon
- depends = pam
depends = cairo
depends = gdk-pixbuf2
+ depends = glib2
+ depends = glibc
+ depends = pam
+ depends = wayland
+ depends = libxkbcommon
provides = swaylock
conflicts = swaylock
- source = swaylock::git+https://github.com/swaywm/swaylock
- sha1sums = SKIP
+ backup = etc/pam.d/swaylock
+ source = swaylock-git::git+https://github.com/swaywm/swaylock.git
+ b2sums = SKIP
pkgname = swaylock-git
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index e4f9ba3007cf..000000000000
--- a/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*
-!.SRCINFO
-!PKGBUILD
-!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
index fcfa9fd2a4b3..b21118bd170c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,46 @@
-# Maintainer: Primalmotion <primalmotion@pm.me>
+# Maintainer: GreyXor <greyxor@protonmail.com>
+# Contributor: Primalmotion <primalmotion@pm.me>
# Contributor: gilbus <aur@tinkershell.eu>
+
pkgname=swaylock-git
-pkgver=v1.7.2.r2.gac3b49b
+pkgver=r317.91bb968
pkgrel=1
-pkgdesc='Screen locker for Wayland '
+pkgdesc='Screen locker for Wayland (git development version)'
url='https://github.com/swaywm/swaylock'
license=('MIT')
-provides=('swaylock')
-conflicts=('swaylock')
-arch=('i686' 'x86_64' 'armv6h' 'armv7h')
-depends=('wayland' 'libxkbcommon' 'pam' 'cairo' 'gdk-pixbuf2')
-makedepends=('meson' 'git' 'scdoc' 'wayland-protocols')
-source=("${pkgname%-git}::git+$url")
-sha1sums=('SKIP')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+arch=('x86_64')
+depends=(
+ "cairo"
+ "gdk-pixbuf2"
+ "glib2"
+ "glibc"
+ "pam"
+ "wayland"
+ "libxkbcommon"
+)
+makedepends=(
+ "git"
+ "meson"
+ "scdoc"
+ "wayland-protocols"
+)
+backup=('etc/pam.d/swaylock')
+source=("${pkgname}::git+https://github.com/swaywm/swaylock.git")
+b2sums=('SKIP')
pkgver() {
- cd "${pkgname%-git}"
- ( set -o pipefail
- git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- )
-}
-
-prepare() {
- cd "${pkgname%-git}"
- # Fix ticket FS#31544, sed line taken from gentoo
- sed -i -e 's:login:system-auth:' "pam/swaylock"
+ # 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)"
}
build() {
- mkdir -p build
- # makepkg is unable to strip the binary, so we tell meson to do it.
- arch-meson build "${pkgname%-git}" -Dwerror=false --strip
- ninja -C build
+ arch-meson build "${pkgname}"
+ meson compile -C build
}
package() {
- DESTDIR="$pkgdir" ninja -C build install
- install -Dm644 "${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ meson install -C build --destdir "$pkgdir"
+ install -Dm644 "${pkgname}/LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}
-
-# vim: ts=2 sw=2 et