summaryrefslogtreecommitdiff
path: root/repo/polkit/polkit.xibuild
blob: eb236bca28124c6246a57ceed1da7427f976052a (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
#!/bin/sh

MAKEDEPS="git gobject-introspection meson libxslt patch elogind gtk-doc autoconf-archive"
DEPS="expat glib js78 pam"

PKG_VER=0.120
SOURCE=https://www.freedesktop.org/software/polkit/releases/polkit-$PKG_VER.tar.gz

DESC="Application development toolkit for controlling system-wide privileges"

ADDITIONAL="
    files/polkit-1
    patches/CVE-2021-4034.patch
    patches/make-innetgr-optional.patch
"

prepare () {
    apply_patches

    autoreconf -fi
}

build () {
    mkdir build &&
    cd    build &&

    ../configure \
		--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
}

package () {
    make DESTDIR=$PKG_DEST install &&
        cd .. &&
        install -m644 polkit-1 $PKG_DEST/etc/pam.d/polkit-1 
}

postinstall() {
    /usr/sbin/groupadd -fg 27 polkitd &&
    /usr/sbin/useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
            -g polkitd -s /bin/false polkitd
    true
}