wok-next annotate partimage/receipt @ rev 20719

partimage: use patches
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun May 27 15:45:14 2018 +0300 (2018-05-27)
parents 757d032c55c7
children d5aab818505e
rev   line source
pascal@20281 1 # SliTaz package receipt v2.
erjo@582 2
erjo@582 3 PACKAGE="partimage"
slaxemulator@8643 4 VERSION="0.6.9"
erjo@582 5 CATEGORY="system-tools"
pascal@20281 6 SHORT_DESC="Saves partitions in an image file"
erjo@784 7 MAINTAINER="erjo@slitaz.org"
pascal@15000 8 LICENSE="GPL2"
al@20719 9 WEB_SITE="http://www.partimage.org/"
al@20719 10
erjo@582 11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
slaxemulator@8643 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
erjo@582 13
al@20719 14 BUILD_DEPENDS="gettext newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev \
al@20719 15 pam-dev"
al@20534 16 SPLIT="partimage partimage-pam:pam"
pascal@15000 17
al@20534 18 compile_rules() {
al@20719 19 sed -i 's/CRYPTO_lock/X509_new/g' configure
al@20719 20
al@20534 21 case $SET in
al@20719 22 '')
al@20719 23 ./configure \
al@20719 24 --disable-pam \
al@20719 25 $CONFIGURE_ARGS &&
al@20719 26 make &&
al@20719 27 make install
al@20719 28 ;;
al@20719 29 pam)
al@20719 30 ./configure \
al@20719 31 --enable-pam \
al@20719 32 $CONFIGURE_ARGS &&
al@20719 33 make &&
al@20719 34 make pamfile &&
al@20719 35 make install &&
al@20719 36 install -Dm644 partimaged.pam $install/etc/pam.d/partimaged
al@20719 37 ;;
al@20719 38 esac || return 1
pascal@20281 39
al@20534 40 install -Dm600 $stuff/etc/partimaged/partimaged.cert $install/etc/partimaged/partimaged.cert
al@20534 41 install -Dm600 $stuff/etc/partimaged/partimaged.key $install/etc/partimaged/partimaged.key
al@20534 42 install -Dm755 $stuff/etc/init.d/partimaged $install/etc/init.d/partimaged
al@20534 43
al@20534 44 mkdir -p $install/var/lib/partimaged/
erjo@582 45 }
erjo@582 46
al@20534 47 genpkg_rules() {
al@20719 48 copy @std
pascal@20281 49 case $PACKAGE in
al@20534 50 partimage)
al@20719 51 DEPENDS="bzlib newt openssl slang zlib"
al@20534 52 ;;
al@20534 53 partimage-pam)
al@20534 54 CAT="system-tools|using PAM"
al@20534 55 PROVIDE="partimage:pam"
al@20719 56 DEPENDS="bzlib newt openssl pam slang zlib"
al@20534 57 ;;
pascal@20281 58 esac
erjo@582 59 }
erjo@582 60
al@20534 61 # The same post-install/remove rules for both PAM/non-PAM packages
al@20534 62
al@20534 63 post_install() {
al@20534 64 # Adding user/group partimag...
pascal@18730 65 chroot "$1/" adduser -S -H -D partimag
erjo@582 66
al@20534 67 # Setting permissions for config files
pascal@18730 68 chmod 0600 "$1"/etc/partimaged/*
al@20534 69 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
al@18741 70
al@20534 71 # Creating image files directory
pascal@18730 72 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
al@18741 73
al@20534 74 [ -n "$quiet" ] || cat <<EOT
al@20534 75
al@20534 76 .---------------------------------------------------.
al@20534 77 | To starts partimage server you can run: |
al@20534 78 | /etc/init.d/partimaged start |
al@20534 79 | |
al@20534 80 | Or add partimaged to RUN_DAEMONS in /etc/rcS.conf |
al@20534 81 '---------------------------------------------------'
al@20534 82 EOT
erjo@582 83 }
erjo@582 84
al@20534 85 post_remove() {
al@20534 86 chroot "$1/" deluser partimag
pascal@18730 87 chroot "$1/" delgroup partimag
al@18741 88
pascal@18730 89 if [ -f "$1/etc/paritimaged" ]; then
pascal@18730 90 rm -rf "$1/etc/partimaged"
erjo@582 91 fi
erjo@582 92 }