aboutsummaryrefslogtreecommitdiffstats
path: root/main/polkit/APKBUILD
blob: 468ed6db712f370c660b46667ceac13ffccf450f (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
76
77
78
79
80
# Contributor: Carlo Landmeter
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=polkit
pkgver=0.115
pkgrel=2
pkgdesc="Application development toolkit for controlling system-wide privileges"
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 linux-pam-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://www.freedesktop.org/software/polkit/releases/polkit-$pkgver.tar.gz
	CVE-2018-19788.patch
	make-innetgr-optional.patch
	mozjs60-1.patch
	mozjs60-2.patch
	alpine-pam.patch
"
install="polkit.pre-install polkit.pre-upgrade"
pkgusers="polkitd"
pkggroups="polkitd"

builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	default_prepare
	autoreconf -fi
}

build() {
	cd "$builddir"
	./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 \
		--disable-libsystemd-login

	make
}

check() {
	cd "$builddir"
	make check
}

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

	# Required to run the polkitd daemon as non-root
	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
}

sha512sums="1153011fa93145b2c184e6b3446d3ca21b38918641aeccd8fac3985ac3e30ec6bc75be6973985fde90f2a24236592f1595be259155061c2d33358dd17c4ee4fc  polkit-0.115.tar.gz
5b951d7532b0ad51214cf63814cb863fe83ebc57722245cef3f5f003bba368ffd18fab03b9f23bbef8ed30972ad32f074d25491c3fe338389e02e279b4ced62c  CVE-2018-19788.patch
1e679eda2cacb25ad0d7409ab7c5811697519e46d3873a86a9ff2d8d3d3664e63c925ab13e5faf643031ea27e8e35730556121c96e06acd28c5f690848a8ce00  make-innetgr-optional.patch
8d71494ddfc3f8d24b6c7dbab2b0440d9ab9df49d9e095c90f3802054bf858f4c81c644d1ab64872a6ea61ae70c58a181e47123a4c50bd8a339b27a23bfffaaa  mozjs60-1.patch
d7dc9fc3189a0897e8f484f7dfcee3722f75694401f7a01cac3eb1f0f6cb639081136e86e4bf467c908f77c847d4ddf310817c722fd21a73662ca6b908ce8d53  mozjs60-2.patch
077a3e10ada918e6f9879ce50bba9145229bd92d3f13d4c6454147eb051086afbcf8d0a683a5ebe583ba00f956db011aa1afd3d9e99d7693e288737191468b8f  alpine-pam.patch"