wok-next view polkit/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | f48456621a9d |
children | 0f2575775b2d |
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="devel@slitaz.org"
8 LICENSE="LGPL2"
9 WEB_SITE="https://www.freedesktop.org/wiki/Software/polkit/"
10 LFS="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/polkit.html"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="http://www.freedesktop.org/software/polkit/releases/$TARBALL"
15 JS='js185'
16 BUILD_DEPENDS="glib-dev $JS-dev expat-dev intltool pam-dev \
17 gobject-introspection-dev gtk-doc"
18 SPLIT="$PACKAGE-dev $PACKAGE-pam:pam $PACKAGE-pam-dev:pam"
20 compile_rules() {
21 if ! grep -q polkitd "/etc/passwd"; then
22 addgroup -g 27 polkitd
23 adduser -g "PolicyKit Daemon Owner" -h /etc/polkit-1 -u 27 \
24 -G polkitd -s /bin/false -D polkitd
25 fi
27 case "$SET" in
28 '') SET_ARGS='--with-authfw=shadow';;
29 pam) SET_ARGS='--with-authfw=pam';;
30 esac
32 ./configure \
33 --enable-libsystemd-login=no \
34 $SET_ARGS \
35 $CONFIGURE_ARGS &&
36 fix libtool &&
37 make &&
38 make install || return 1
40 case "$SET" in
41 pam) install -Dm644 $stuff/polkit-1 $install/etc/pam.d/polkit-1;;
42 esac
44 # for access file in web interface, will be changed back in post-install to 700
45 chmod 755 "$install/etc/polkit-1/rules.d/"
47 cp $stuff/*.rules $install/etc/polkit-1/rules.d/
48 }
50 genpkg_rules() {
51 case $PACKAGE in
52 polkit)
53 copy @std
54 DEPENDS="expat glib $JS"
55 ;;
56 polkit-dev)
57 copy @dev
58 DEPENDS="polkit expat-dev glib-dev $JS-dev"
59 ;;
61 polkit-pam)
62 copy @std
63 CAT="base-system|using PAM"
64 DEPENDS="expat glib $JS pam"
65 PROVIDE="polkit:pam"
66 ;;
67 polkit-pam-dev)
68 copy @dev
69 CAT="development|development files, using PAM"
70 DEPENDS="polkit expat-dev glib-dev $JS-dev pam-dev"
71 PROVIDE="polkit-dev:pam"
72 ;;
73 esac
74 }
76 post_install_polkit() {
77 if ! grep -q polkitd "$1/etc/group"; then
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
81 fi
83 mkdir -p "$1/var"
85 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
86 chmod 4755 "$1/usr/bin/pkexec"
88 chmod 700 "$1/etc/polkit-1/rules.d/"
89 chown 27:27 "$1/etc/polkit-1/rules.d/"
91 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
92 }
94 post_remove_polkit() {
95 chroot "$1/" deluser polkitd
96 chroot "$1/" delgroup polkitd
97 }
99 post_install_polkit_pam() {
100 if ! grep -q polkitd "$1/etc/group"; then
101 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd
102 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
103 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
104 fi
106 mkdir -p "$1/var"
108 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
109 chmod 4755 "$1/usr/bin/pkexec"
111 chmod 700 "$1/etc/polkit-1/rules.d/"
112 chown 27:27 "$1/etc/polkit-1/rules.d/"
114 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
115 }
117 post_remove_polkit_pam() {
118 chroot "$1/" deluser polkitd
119 chroot "$1/" delgroup polkitd
120 }