aboutsummaryrefslogtreecommitdiffstats
path: root/community/polkit-elogind/APKBUILD
blob: d4638931c9e110e458c48a1984efb1099dbd0b99 (plain)
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
76
77
78
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=polkit-elogind
pkgver=0.116
pkgrel=1
pkgdesc="Application development toolkit for controlling system-wide privileges (elogind variant)"
url="https://www.freedesktop.org/wiki/Software/polkit/"
arch="all"
license="GPL-2.0-or-later"
options="suid !check"
depends_dev="dbus-glib-dev"
makedepends="$depends_dev expat-dev glib-dev gtk-doc gobject-introspection-dev
	intltool autoconf automake libtool bash mozjs60-dev elogind-dev linux-pam-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://www.freedesktop.org/software/polkit/releases/polkit-$pkgver.tar.gz
	make-innetgr-optional.patch
	alpine-polkit.pam"
install="polkit-elogind.pre-install"
pkgusers="polkitd"
pkggroups="polkitd"
provides="polkit"

builddir="$srcdir/polkit-$pkgver"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--libexecdir=/usr/lib/polkit-1 \
		--localstatedir=/var \
		--disable-static \
		--enable-introspection \
		--with-authfw=pam \
		--with-os-type=alpine \
		--disable-gtk-doc \
		--disable-gtk-doc-html \
		--disable-gtk-doc-pdf \
		--disable-libelogind \
		--disable-systemd \
		--enable-libsystemd-login

	make
}

check() {
	make check
}

package() {
	# Set SHELL as a workaround for #10081
	make SHELL=/bin/bash DESTDIR="$pkgdir" install

	# Use our own polkit rules, upstream may change them
	install -m644 "$srcdir"/alpine-polkit.pam "$pkgdir"/etc/pam.d/polkit-1

	# See polkit's configure script which tells us what permissions to set
	chown -R polkitd:polkitd "$pkgdir"/etc/polkit-1/rules.d "$pkgdir"/usr/share/polkit-1/rules.d
	chmod -R 700 "$pkgdir"/etc/polkit-1/rules.d "$pkgdir"/usr/share/polkit-1/rules.d
	chmod 4755 "$pkgdir"/usr/lib/polkit-1/polkit-agent-helper-1
	chmod 4755 "$pkgdir"/usr/bin/pkexec
}

dev() {
	provides="polkit-dev"
	default_dev
}

sha512sums="b66b01cc2bb4349de70147f41f161f0f6f41e7230b581dfb054058b48969ec57041ab05b51787c749ccfc36aa5f317952d7e7ba337b4f6f6c0a923ed5866c2d5  polkit-0.116.tar.gz
05a4fa21a42237a68d40f581d70a84937ba94f703e5342f37a59cca171ed5446acf7ae83fd5b05a3a92600ad38ad74d0c735a20f1b932750f91c0988ba900f60  make-innetgr-optional.patch
f5102dc00d390b3a3c957b62e1712db778c7ffb7378f3d8e816c0757c11a308c5d5303e42595b0d6add9839247c773880cd34e56afacc89eb6efaadf9aae7826  alpine-polkit.pam"