aboutsummaryrefslogtreecommitdiffstats
path: root/community/swaylock/APKBUILD
blob: 12c9a98171df5f9388ecdeb4031598fe14f202ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
# Contributor: Drew DeVault <sir@cmpwn.com>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=swaylock
pkgver=1.5
pkgrel=8
pkgdesc="Screen locker for Wayland"
url="https://swaywm.org"
arch="all"
license="MIT"
options="!check" # no test suite
makedepends="cairo-dev
	gdk-pixbuf-dev
	libxkbcommon-dev
	linux-pam-dev
	meson
	ninja
	scdoc
	wayland-dev
	wayland-protocols
	"
provider_priority=100  # highest (other provider is swaylock-effects)
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="
	$pkgname-dbg
	$pkgname-doc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/swaywm/swaylock/archive/$pkgver.tar.gz
	$pkgname-call-fclose-vice-free.patch::https://github.com/swaywm/swaylock/commit/366db56553ee02334871756ab19c72d2171ad364.patch
	$pkgname-fix-potential-use-after-free.patch::https://github.com/swaywm/swaylock/commit/235b925df7e1bb82d98f1ac8c02e8f85d0a54ee9.patch
	ungit-version.patch
	fix-version.patch
	"

prepare() {
	default_prepare
	sed -i 's/login/base-auth/g' \
		pam/swaylock

	cat <<-__EOF__ >> pam/swaylock

	# Unlock GNOME Keyring if available
	-auth       optional     pam_gnome_keyring.so
	-session    optional     pam_gnome_keyring.so auto_start

	# Unlock KWallet if available
	-auth    optional        pam_kwallet.so
	-auth    optional        pam_kwallet5.so
	-session optional        pam_kwallet.so auto_start
	-session optional        pam_kwallet5.so auto_start
	__EOF__

}

build() {
	abuild-meson . output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	mv "$pkgdir"/usr/share/fish/vendor_completions.d "$pkgdir"/usr/share/fish/completions
}

sha512sums="
16dd9b912ca702849290cf18d91ffbd64a70118cc284982a84b567c4974fd4590b12707c0aae1fcda7ccd1caa7880f342c633b9345bd795c36702916696d1f67  swaylock-1.5.tar.gz
c306fa82587a82e698ddc5046ad74e95acff1064b488ec6cd3449a16ca0c879fdf990d940cdbb6ab48cedad3bb28a9a9cf34d75733ed66fe07f2c03eb4e2e0c6  swaylock-call-fclose-vice-free.patch
fdf99132c12af93c9545344b5b892ba7b1491cd021d565aeb4b02a13f01433c71abd5df442e193497f8fd4c3a2aa97e6e2fed9feb265367d5aed68b1746585fa  swaylock-fix-potential-use-after-free.patch
9919bb17e2cf2c8dc4fbac3ba91434f775574caca345026bd8f56e6e9caeff85fa5ad86a9485b103da9be7e393734c37c20c32141cd42cc7f479273ca2147f6b  ungit-version.patch
3e9316339d6a255662ed7b59e8405885e25bddf95f064f8a0042baaec661affe6588c59cd6d0e0ab44a06bc322b910c61aed86c13189874b98cc978ec446993f  fix-version.patch
"