wok-next view polkit/receipt @ rev 21103
emacs: depends on emacs-common
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Jan 03 11:21:15 2019 +0200 (2019-01-03) |
parents | d5aab818505e |
children | 539fca156613 |
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"
14 TARBALL_SHA1="ef855c2d04184dceb38e0940dc7bec9cc3da415c"
16 JS='js185'
17 BUILD_DEPENDS="glib-dev $JS-dev expat-dev intltool pam-dev \
18 gobject-introspection-dev gtk-doc"
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 if ! grep -q polkitd "/etc/passwd"; then
37 addgroup -g 27 polkitd
38 adduser -g "PolicyKit Daemon Owner" -h /etc/polkit-1 -u 27 \
39 -G polkitd -s /bin/false -D polkitd
40 fi
42 case "$SET" in
43 '') SET_ARGS='--with-authfw=shadow';;
44 pam) SET_ARGS='--with-authfw=pam';;
45 esac
47 ./configure \
48 --disable-static \
49 --enable-libsystemd-login=no \
50 --enable-libelogind=no \
51 $SET_ARGS \
52 $CONFIGURE_ARGS &&
53 fix libtool &&
54 make &&
55 make install || return 1
57 case "$SET" in
58 pam) install -Dm644 $stuff/polkit-1 $install/etc/pam.d/polkit-1;;
59 esac
61 # for access file in web interface, will be changed back in post-install to 700
62 chmod 755 "$install/etc/polkit-1/rules.d/"
64 cp $stuff/*.rules $install/etc/polkit-1/rules.d/
65 }
67 post_install_polkit() {
68 if ! grep -q polkitd "$1/etc/group"; then
69 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd
70 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
71 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
72 fi
74 mkdir -p "$1/var"
76 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
77 chmod 4755 "$1/usr/bin/pkexec"
79 chmod 700 "$1/etc/polkit-1/rules.d/"
80 chown 27:27 "$1/etc/polkit-1/rules.d/"
82 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
83 }
85 post_remove_polkit() {
86 chroot "$1/" deluser polkitd
87 chroot "$1/" delgroup polkitd
88 }
90 post_install_polkit_pam() {
91 if ! grep -q polkitd "$1/etc/group"; then
92 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd
93 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
94 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
95 fi
97 mkdir -p "$1/var"
99 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
100 chmod 4755 "$1/usr/bin/pkexec"
102 chmod 700 "$1/etc/polkit-1/rules.d/"
103 chown 27:27 "$1/etc/polkit-1/rules.d/"
105 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
106 }
108 post_remove_polkit_pam() {
109 chroot "$1/" deluser polkitd
110 chroot "$1/" delgroup polkitd
111 }