diff options
author | Stephen Gregoratto | 2020-01-10 13:39:06 +1100 |
---|---|---|
committer | Stephen Gregoratto | 2020-01-10 13:45:21 +1100 |
commit | 2e6b2234a2c6cc56c560da588d4892d7dc55c044 (patch) | |
tree | 31413d8fb19558c95ccaca64423f6e1286b7071f | |
parent | 20bc9bcadcaed3210e03a985ddafd89d80419cbb (diff) | |
download | aur-2e6b2234a2c6cc56c560da588d4892d7dc55c044.tar.gz |
update pkgbuild, fix file location errors
The pam configuration was unified for all supported OSs, and renamed to
`pam/swaylock`. This commit also has a number of other fixes:
- Adjust the pkgver method to use best practices
- Remove pango dependancy, move gdk-pixbuf2 as a runtime dep.
- Simplify meson/ninja commands.
- Various stylistic changes.
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 58 |
3 files changed, 40 insertions, 42 deletions
@@ -1,10 +1,12 @@ pkgbase = swaylock-git pkgdesc = Screen locker for Wayland - pkgver = r187.4e72a36 + pkgver = 1.4.r15.gdee0021 pkgrel = 1 - url = https://swaywm.org + url = https://github.com/swaywm/swaylock arch = i686 arch = x86_64 + arch = armv6h + arch = armv7h license = MIT makedepends = meson makedepends = git @@ -12,15 +14,12 @@ pkgbase = swaylock-git makedepends = wayland-protocols depends = wayland depends = libxkbcommon - depends = pango - depends = cairo depends = pam - optdepends = gdk-pixbuf2: For background images other than PNG + depends = cairo + depends = gdk-pixbuf2 provides = swaylock conflicts = swaylock - options = debug - options = !strip - source = swaylock::git+https://github.com/swaywm/swaylock.git + source = swaylock::git+https://github.com/swaywm/swaylock sha1sums = SKIP pkgname = swaylock-git diff --git a/.gitignore b/.gitignore index 532304017a00..e4f9ba3007cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -swaylock*.tar* -src/ -pkg/ -swaylock/ -swaylock-git* +* +!.SRCINFO +!PKGBUILD +!.gitignore @@ -1,43 +1,43 @@ -# Maintainer: gilbus <aur(AT)tinkershell.eu> +# Maintainer: Stephen Gregoratto <dev@sgregoratto.me> +# Contributor: gilbus <aur@tinkershell.eu> pkgname=swaylock-git -_pkgname=swaylock -pkgver=r187.4e72a36 +pkgver=1.4.r15.gdee0021 pkgrel=1 -license=("MIT") -pkgdesc="Screen locker for Wayland " -makedepends=("meson" "git" "scdoc" "wayland-protocols") -depends=( - "wayland" "libxkbcommon" "pango" "cairo" "pam" -) -optdepends=( - "gdk-pixbuf2: For background images other than PNG" -) -arch=("i686" "x86_64") -url="https://swaywm.org" -source=("${pkgname%-*}::git+https://github.com/swaywm/swaylock.git") -sha1sums=("SKIP") -provides=("swaylock") -conflicts=("swaylock") -options=(debug !strip) +pkgdesc='Screen locker for Wayland ' +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') pkgver() { - cd "${srcdir}/${_pkgname}" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + 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 "${srcdir}/${_pkgname}" - # Fix ticket FS#31544, sed line taken from gentoo - sed -i -e 's:login:system-auth:' pam/swaylock.linux - meson -Dwerror=false --prefix /usr "$srcdir/build" + cd "${pkgname%-git}" + # Fix ticket FS#31544, sed line taken from gentoo + sed -i -e 's:login:system-auth:' "pam/swaylock" } build() { - cd "${srcdir}/${_pkgname}" - ninja -C "$srcdir/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 } package() { - cd "${srcdir}/${_pkgname}" - DESTDIR="$pkgdir/" ninja -C "$srcdir/build" install + DESTDIR="$pkgdir" ninja -C build install + install -Dm644 "${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } + +# vim: ts=2 sw=2 et |