wok-next view polkit/receipt @ rev 20289

remove polkit-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 08 17:23:10 2017 +0100 (2017-11-08)
parents e44a1a92452b
children d3adbeea3a9f
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 CROSS="error: cannot check for file existence when cross compiling"
12 TARBALL="polkit-$VERSION.tar.gz"
13 WGET_URL="http://www.freedesktop.org/software/polkit/releases/$TARBALL"
15 BUILD_DEPENDS="glib-dev js-dev expat-dev intltool pam-dev \
16 gobject-introspection-dev gtk-doc"
17 SPLIT="polkit polkit-pam polkit-dev polkit-pam-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
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 &&
26 cp -a $src $src-pam
27 ./configure \
28 --sysconfdir=/etc \
29 --localstatedir=/var \
30 --enable-libsystemd-login=no \
31 --with-authfw=shadow \
32 $CONFIGURE_ARGS &&
33 make && make install &&
35 cd $src-pam &&
36 ./configure \
37 --sysconfdir=/etc \
38 --localstatedir=/var \
39 --enable-libsystemd-login=no \
40 --with-authfw=pam \
41 $CONFIGURE_ARGS &&
42 make && make DESTDIR=$DESTDIR-pam install &&
44 mkdir -p $install-pam/etc/pam.d &&
45 cp $stuff/polkit-1 $install-pam/etc/pam.d &&
46 for inst in $install $install-pam ; do
47 # for access file in web interface, will be changed back in post-install to 700
48 chmod 755 "$inst/etc/polkit-1/rules.d/"
50 cp $stuff/*.rules $inst/etc/polkit-1/rules.d/
51 done
52 }
54 # Rules to gen a SliTaz package suitable for Tazpkg.
55 genpkg_rules()
56 {
57 case $PACKAGE in
58 polkit)
59 copy @std
60 DEPENDS="expat glib js"
61 ;;
62 polkit-pam)
63 install=$install-pam copy @std
64 DEPENDS="expat glib js pam"
65 PROVIDE="polkit:pam"
66 ;;
67 polkit-dev)
68 copy @dev
69 DEPENDS="polkit expat-dev glib-dev js-dev"
70 ;;
71 polkit-pam-dev)
72 install=$install-pam copy @dev
73 DEPENDS="polkit expat-dev glib-dev js-dev pam-dev"
74 PROVIDE="polkit-dev:pam"
75 ;;
76 esac
77 }
79 post_install_polkit() {
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
84 mkdir -p "$1/var"
86 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
87 chmod 4755 "$1/usr/bin/pkexec"
89 chmod 700 "$1/etc/polkit-1/rules.d/"
90 chown 27:27 "$1/etc/polkit-1/rules.d/"
92 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
93 }
95 post_install_polkit_pam() {
96 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd &&
97 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \
98 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd
100 mkdir -p "$1/var"
102 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1"
103 chmod 4755 "$1/usr/bin/pkexec"
105 chmod 700 "$1/etc/polkit-1/rules.d/"
106 chown 27:27 "$1/etc/polkit-1/rules.d/"
108 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d"
109 }