wok-next view polkit/receipt @ rev 21722

efivar: typo in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 01 10:31:46 2020 +0000 (2020-09-01)
parents 0f2575775b2d
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="polkit"
4 VERSION="0.116"
5 CATEGORY="base-system"
6 SHORT_DESC="Authorization manager"
7 MAINTAINER="maintainer@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"
14 TARBALL_SHA1="ef855c2d04184dceb38e0940dc7bec9cc3da415c"
16 JS='js185'
17 BUILD_DEPENDS="expat-dev glib-dev gobject-introspection-dev gtk-doc
18 intltool $JS-dev pam-dev"
19 SPLIT="$PACKAGE-dev $PACKAGE-pam:pam $PACKAGE-pam-dev:pam"
21 COPY_pam="@std"
22 COPY_pam_dev="@dev"
24 DEPENDS_std="expat glib $JS"
25 DEPENDS_dev="$PACKAGE expat-dev glib-dev $JS-dev"
26 DEPENDS_pam="expat glib $JS pam"
27 DEPENDS_pam_dev="$PACKAGE expat-dev glib-dev $JS-dev pam-dev"
29 CAT_pam="base-system|using PAM"
30 CAT_pam_dev="development|development files, using PAM"
32 PROVIDE_pam="$PACKAGE:pam"
33 PROVIDE_pam_dev="$PACKAGE-dev:pam"
35 compile_rules()
36 {
37 if ! grep -q polkitd "/etc/passwd"
38 then
39 addgroup -g 27 polkitd
40 adduser -g "PolicyKit Daemon Owner" -h /etc/polkit-1 -u 27 \
41 -G polkitd -s /bin/false -D polkitd
42 fi
44 case "$SET" in
45 '') SET_ARGS='--with-authfw=shadow';;
46 pam) SET_ARGS='--with-authfw=pam';;
47 esac
49 ./configure \
50 --disable-static \
51 --enable-libsystemd-login=no \
52 --enable-libelogind=no \
53 $SET_ARGS \
54 $CONFIGURE_ARGS &&
55 fix libtool &&
56 make &&
57 make install || return 1
59 case "$SET" in
60 pam)
61 install -Dm644 $stuff/polkit-1 $install/etc/pam.d/polkit-1;;
62 esac
64 # for access file in web interface, will be changed back in post-install to 700
65 chmod 755 "$install/etc/polkit-1/rules.d/"
67 cp $stuff/*.rules $install/etc/polkit-1/rules.d/
68 }
70 post_install_polkit()
71 {
72 if ! grep -q polkitd "$1/etc/group"
73 then
74 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd
75 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
76 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
77 fi
79 mkdir -p "$1/var"
81 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
82 chmod 4755 "$1/usr/bin/pkexec"
84 chmod 700 "$1/etc/polkit-1/rules.d/"
85 chown 27:27 "$1/etc/polkit-1/rules.d/"
87 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
88 }
90 post_remove_polkit()
91 {
92 chroot "$1/" deluser polkitd
93 chroot "$1/" delgroup polkitd
94 }
96 post_install_polkit_pam()
97 {
98 if ! grep -q polkitd "$1/etc/group"
99 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 {
118 chroot "$1/" deluser polkitd
119 chroot "$1/" delgroup polkitd
120 }