wok-next view polkit/receipt @ rev 20785

gpgme: add gnupg, since build can not find gpgconf and gpg
author Erkan Yilmaz <erkan@slitaz.org>
date Sat Jun 09 07:02:52 2018 +0000 (2018-06-09)
parents 757d032c55c7
children f48456621a9d
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"
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="polkit polkit-dev polkit-pam:pam polkit-pam-dev:pam"
20 CROSS="error: cannot check for file existence when cross compiling"
22 compile_rules() {
23 if ! grep -q polkitd "/etc/passwd"; then
24 addgroup -g 27 polkitd
25 adduser -g "PolicyKit Daemon Owner" -h /etc/polkit-1 -u 27 \
26 -G polkitd -s /bin/false -D polkitd
27 fi
29 case "$SET" in
30 '') SET_ARGS='--with-authfw=shadow';;
31 pam) SET_ARGS='--with-authfw=pam';;
32 esac
34 ./configure \
35 --enable-libsystemd-login=no \
36 $SET_ARGS \
37 $CONFIGURE_ARGS &&
38 fix libtool &&
39 make &&
40 make install || return 1
42 case "$SET" in
43 pam) install -Dm644 $stuff/polkit-1 $install/etc/pam.d/polkit-1;;
44 esac
46 # for access file in web interface, will be changed back in post-install to 700
47 chmod 755 "$install/etc/polkit-1/rules.d/"
49 cp $stuff/*.rules $install/etc/polkit-1/rules.d/
50 }
52 genpkg_rules() {
53 case $PACKAGE in
54 polkit)
55 copy @std
56 DEPENDS="expat glib $JS"
57 ;;
58 polkit-dev)
59 copy @dev
60 DEPENDS="polkit expat-dev glib-dev $JS-dev"
61 ;;
63 polkit-pam)
64 copy @std
65 CAT="base-system|using PAM"
66 DEPENDS="expat glib $JS pam"
67 PROVIDE="polkit:pam"
68 ;;
69 polkit-pam-dev)
70 copy @dev
71 CAT="development|development files, using PAM"
72 DEPENDS="polkit expat-dev glib-dev $JS-dev pam-dev"
73 PROVIDE="polkit-dev:pam"
74 ;;
75 esac
76 }
78 post_install_polkit() {
79 if ! grep -q polkitd "$1/etc/group"; then
80 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd
81 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
82 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
83 fi
85 mkdir -p "$1/var"
87 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
88 chmod 4755 "$1/usr/bin/pkexec"
90 chmod 700 "$1/etc/polkit-1/rules.d/"
91 chown 27:27 "$1/etc/polkit-1/rules.d/"
93 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
94 }
96 post_remove_polkit() {
97 chroot "$1/" deluser polkitd
98 chroot "$1/" delgroup polkitd
99 }
101 post_install_polkit_pam() {
102 if ! grep -q polkitd "$1/etc/group"; then
103 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd
104 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
105 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
106 fi
108 mkdir -p "$1/var"
110 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
111 chmod 4755 "$1/usr/bin/pkexec"
113 chmod 700 "$1/etc/polkit-1/rules.d/"
114 chown 27:27 "$1/etc/polkit-1/rules.d/"
116 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
117 }
119 post_remove_polkit_pam() {
120 chroot "$1/" deluser polkitd
121 chroot "$1/" delgroup polkitd
122 }