wok-next view polkit/receipt @ rev 20554
Fix build brasero, clutter-gtk, freetype-infinality, gnome-commander
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Apr 06 16:49:09 2018 +0300 (2018-04-06) |
parents | 4c1ed6983d05 |
children | 10df65db91ad |
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 --enable-libsystemd-login=no \
35 $SET_ARGS \
36 $CONFIGURE_ARGS &&
37 make && make install || return 1
39 case "$SET" in
40 pam) install -Dm644 $stuff/polkit-1 $install/etc/pam.d/polkit-1;;
41 esac
43 # for access file in web interface, will be changed back in post-install to 700
44 chmod 755 "$install/etc/polkit-1/rules.d/"
46 cp $stuff/*.rules $install/etc/polkit-1/rules.d/
47 }
49 genpkg_rules() {
50 case $PACKAGE in
51 polkit)
52 copy @std
53 DEPENDS="expat glib $JS"
54 ;;
55 polkit-dev)
56 copy @dev
57 DEPENDS="polkit expat-dev glib-dev $JS-dev"
58 ;;
60 polkit-pam)
61 copy @std
62 CAT="base-system|using PAM"
63 DEPENDS="expat glib $JS pam"
64 PROVIDE="polkit:pam"
65 ;;
66 polkit-pam-dev)
67 copy @dev
68 CAT="development|development files, using PAM"
69 DEPENDS="polkit expat-dev glib-dev $JS-dev pam-dev"
70 PROVIDE="polkit-dev:pam"
71 ;;
72 esac
73 }
75 post_install_polkit() {
76 if ! grep -q polkitd "$1/etc/group"; then
77 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd
78 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
79 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
80 fi
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_remove_polkit() {
94 chroot "$1/" deluser polkitd
95 chroot "$1/" delgroup polkitd
96 }
98 post_install_polkit_pam() {
99 if ! grep -q polkitd "$1/etc/group"; then
100 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd
101 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
102 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
103 fi
105 mkdir -p "$1/var"
107 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
108 chmod 4755 "$1/usr/bin/pkexec"
110 chmod 700 "$1/etc/polkit-1/rules.d/"
111 chown 27:27 "$1/etc/polkit-1/rules.d/"
113 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
114 }
116 post_remove_polkit_pam() {
117 chroot "$1/" deluser polkitd
118 chroot "$1/" delgroup polkitd
119 }