wok-next view polkit/receipt @ rev 20467

Up cookutils (1034), TiMidity++, alpine, caps, alsaequal
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Mar 08 01:13:43 2018 +0200 (2018-03-08)
parents d3adbeea3a9f
children 4c1ed6983d05
line source
1 # SliTaz package receipt v2.
3 PACKAGE="polkit"
4 VERSION="0.113"
5 CATEGORY="base-system"
6 SHORT_DESC="Authorization manager"
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="LGPL2"
9 WEB_SITE="https://www.freedesktop.org/wiki/Software/polkit/"
10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/postlfs/polkit.html"
11 CROSS="error: cannot check for file existence when cross compiling"
13 TARBALL="$PACKAGE-$VERSION.tar.gz"
14 WGET_URL="http://www.freedesktop.org/software/polkit/releases/$TARBALL"
16 JS='js185'
17 BUILD_DEPENDS="glib-dev $JS-dev expat-dev intltool pam-dev \
18 gobject-introspection-dev gtk-doc"
19 SPLIT="polkit polkit-dev polkit-pam:pam polkit-pam-dev:pam"
21 compile_rules() {
22 if ! grep -q polkitd "/etc/passwd"; then
23 addgroup -g 27 polkitd
24 adduser -g "PolicyKit Daemon Owner" -h /etc/polkit-1 -u 27 \
25 -G polkitd -s /bin/false -D polkitd
26 fi
28 case "$SET" in
29 '') SET_ARGS='--with-authfw=shadow';;
30 pam) SET_ARGS='--with-authfw=pam';;
31 esac
33 ./configure \
34 --sysconfdir=/etc \
35 --localstatedir=/var \
36 --enable-libsystemd-login=no \
37 $SET_ARGS \
38 $CONFIGURE_ARGS &&
39 make && make install || return 1
41 case "$SET" in
42 pam) install -Dm644 $stuff/polkit-1 $install/etc/pam.d/polkit-1;;
43 esac
45 # for access file in web interface, will be changed back in post-install to 700
46 chmod 755 "$install/etc/polkit-1/rules.d/"
48 cp $stuff/*.rules $install/etc/polkit-1/rules.d/
49 }
51 genpkg_rules() {
52 case $PACKAGE in
53 polkit)
54 copy @std
55 DEPENDS="expat glib $JS"
56 ;;
57 polkit-dev)
58 copy @dev
59 DEPENDS="polkit expat-dev glib-dev $JS-dev"
60 ;;
62 polkit-pam)
63 copy @std
64 CAT="base-system|using PAM"
65 DEPENDS="expat glib $JS pam"
66 PROVIDE="polkit:pam"
67 ;;
68 polkit-pam-dev)
69 copy @dev
70 CAT="development|development files, using PAM"
71 DEPENDS="polkit expat-dev glib-dev $JS-dev pam-dev"
72 PROVIDE="polkit-dev:pam"
73 ;;
74 esac
75 }
77 post_install_polkit() {
78 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd &&
79 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
80 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
82 mkdir -p "$1/var"
84 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
85 chmod 4755 "$1/usr/bin/pkexec"
87 chmod 700 "$1/etc/polkit-1/rules.d/"
88 chown 27:27 "$1/etc/polkit-1/rules.d/"
90 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
91 }
93 post_install_polkit_pam() {
94 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd &&
95 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
96 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
98 mkdir -p "$1/var"
100 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
101 chmod 4755 "$1/usr/bin/pkexec"
103 chmod 700 "$1/etc/polkit-1/rules.d/"
104 chown 27:27 "$1/etc/polkit-1/rules.d/"
106 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
107 }