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