wok-next annotate polkit/receipt @ rev 21017
Some maintenance
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Oct 16 16:46:05 2018 +0300 (2018-10-16) |
parents | 10df65db91ad |
children | d5aab818505e |
rev | line source |
---|---|
al@19789 | 1 # SliTaz package receipt v2. |
slaxemulator@7921 | 2 |
slaxemulator@7921 | 3 PACKAGE="polkit" |
al@19789 | 4 VERSION="0.113" |
slaxemulator@8860 | 5 CATEGORY="base-system" |
al@19789 | 6 SHORT_DESC="Authorization manager" |
slaxemulator@7921 | 7 MAINTAINER="slaxemulator@gmail.com" |
pascal@15004 | 8 LICENSE="LGPL2" |
al@19789 | 9 WEB_SITE="https://www.freedesktop.org/wiki/Software/polkit/" |
al@21017 | 10 LFS="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/polkit.html" |
slaxemulator@7921 | 11 |
al@20443 | 12 TARBALL="$PACKAGE-$VERSION.tar.gz" |
al@19789 | 13 WGET_URL="http://www.freedesktop.org/software/polkit/releases/$TARBALL" |
al@19789 | 14 |
al@20443 | 15 JS='js185' |
al@20443 | 16 BUILD_DEPENDS="glib-dev $JS-dev expat-dev intltool pam-dev \ |
al@19789 | 17 gobject-introspection-dev gtk-doc" |
al@20443 | 18 SPLIT="polkit polkit-dev polkit-pam:pam polkit-pam-dev:pam" |
pankso@9764 | 19 |
al@20604 | 20 CROSS="error: cannot check for file existence when cross compiling" |
al@20604 | 21 |
al@20443 | 22 compile_rules() { |
al@20443 | 23 if ! grep -q polkitd "/etc/passwd"; then |
al@20443 | 24 addgroup -g 27 polkitd |
al@20443 | 25 adduser -g "PolicyKit Daemon Owner" -h /etc/polkit-1 -u 27 \ |
al@20443 | 26 -G polkitd -s /bin/false -D polkitd |
al@20443 | 27 fi |
al@19789 | 28 |
al@20443 | 29 case "$SET" in |
al@20443 | 30 '') SET_ARGS='--with-authfw=shadow';; |
al@20443 | 31 pam) SET_ARGS='--with-authfw=pam';; |
al@20443 | 32 esac |
al@20443 | 33 |
slaxemulator@7922 | 34 ./configure \ |
al@19789 | 35 --enable-libsystemd-login=no \ |
al@20443 | 36 $SET_ARGS \ |
pankso@12473 | 37 $CONFIGURE_ARGS && |
al@20604 | 38 fix libtool && |
al@20604 | 39 make && |
al@20604 | 40 make install || return 1 |
al@19789 | 41 |
al@20443 | 42 case "$SET" in |
al@20443 | 43 pam) install -Dm644 $stuff/polkit-1 $install/etc/pam.d/polkit-1;; |
al@20443 | 44 esac |
al@19863 | 45 |
al@20443 | 46 # for access file in web interface, will be changed back in post-install to 700 |
al@20443 | 47 chmod 755 "$install/etc/polkit-1/rules.d/" |
pascal@20289 | 48 |
al@20443 | 49 cp $stuff/*.rules $install/etc/polkit-1/rules.d/ |
slaxemulator@7921 | 50 } |
slaxemulator@7921 | 51 |
al@20443 | 52 genpkg_rules() { |
al@19789 | 53 case $PACKAGE in |
al@19789 | 54 polkit) |
al@19789 | 55 copy @std |
al@20443 | 56 DEPENDS="expat glib $JS" |
pascal@20289 | 57 ;; |
pascal@20289 | 58 polkit-dev) |
al@19789 | 59 copy @dev |
al@20443 | 60 DEPENDS="polkit expat-dev glib-dev $JS-dev" |
al@20443 | 61 ;; |
al@20443 | 62 |
al@20443 | 63 polkit-pam) |
al@20443 | 64 copy @std |
al@20443 | 65 CAT="base-system|using PAM" |
al@20443 | 66 DEPENDS="expat glib $JS pam" |
al@20443 | 67 PROVIDE="polkit:pam" |
al@19789 | 68 ;; |
pascal@20289 | 69 polkit-pam-dev) |
al@20443 | 70 copy @dev |
al@20292 | 71 CAT="development|development files, using PAM" |
al@20443 | 72 DEPENDS="polkit expat-dev glib-dev $JS-dev pam-dev" |
pascal@20289 | 73 PROVIDE="polkit-dev:pam" |
pascal@20289 | 74 ;; |
al@19789 | 75 esac |
slaxemulator@7921 | 76 } |
al@19789 | 77 |
al@19789 | 78 post_install_polkit() { |
al@20492 | 79 if ! grep -q polkitd "$1/etc/group"; then |
al@20492 | 80 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd |
al@20492 | 81 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \ |
al@20492 | 82 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd |
al@20492 | 83 fi |
al@19789 | 84 |
al@19789 | 85 mkdir -p "$1/var" |
al@19789 | 86 |
al@19789 | 87 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1" |
al@19789 | 88 chmod 4755 "$1/usr/bin/pkexec" |
al@19789 | 89 |
al@19789 | 90 chmod 700 "$1/etc/polkit-1/rules.d/" |
al@19789 | 91 chown 27:27 "$1/etc/polkit-1/rules.d/" |
al@19789 | 92 |
al@19789 | 93 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d" |
al@19789 | 94 } |
pascal@20289 | 95 |
al@20492 | 96 post_remove_polkit() { |
al@20492 | 97 chroot "$1/" deluser polkitd |
al@20492 | 98 chroot "$1/" delgroup polkitd |
al@20492 | 99 } |
al@20492 | 100 |
pascal@20289 | 101 post_install_polkit_pam() { |
al@20492 | 102 if ! grep -q polkitd "$1/etc/group"; then |
al@20492 | 103 chroot "$1/" /usr/sbin/addgroup -g 27 polkitd |
al@20492 | 104 chroot "$1/" /usr/sbin/adduser -g "PolicyKit Daemon Owner" \ |
al@20492 | 105 -h /etc/polkit-1 -u 27 -G polkitd -s /bin/false -D polkitd |
al@20492 | 106 fi |
pascal@20289 | 107 |
pascal@20289 | 108 mkdir -p "$1/var" |
pascal@20289 | 109 |
pascal@20289 | 110 chmod 4755 "$1/usr/lib/polkit-1/polkit-agent-helper-1" |
pascal@20289 | 111 chmod 4755 "$1/usr/bin/pkexec" |
pascal@20289 | 112 |
pascal@20289 | 113 chmod 700 "$1/etc/polkit-1/rules.d/" |
pascal@20289 | 114 chown 27:27 "$1/etc/polkit-1/rules.d/" |
pascal@20289 | 115 |
pascal@20289 | 116 install -dm700 -o27 -g27 "$1/usr/share/polkit-1/rules.d" |
pascal@20289 | 117 } |
al@20492 | 118 |
al@20492 | 119 post_remove_polkit_pam() { |
al@20492 | 120 chroot "$1/" deluser polkitd |
al@20492 | 121 chroot "$1/" delgroup polkitd |
al@20492 | 122 } |