wok-next annotate partimage/receipt @ rev 21332

updated libvirt (4.3.0 -> 5.10.0)
author Hans-G?nter Theisgen
date Thu Dec 12 17:26:25 2019 +0100 (2019-12-12)
parents d5aab818505e
children
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"
al@21020 7 MAINTAINER="devel@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@21020 14 BUILD_DEPENDS="gettext-dev newt-dev slang-dev bzip2-dev openssl-dev zlib-dev \
al@20719 15 pam-dev"
al@21020 16 SPLIT="$PACKAGE-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@21020 27 make install || return 1
al@21020 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@21020 35 make install || return 1
al@21020 36
al@20719 37 install -Dm644 partimaged.pam $install/etc/pam.d/partimaged
al@21020 38 ;;
al@21020 39 esac
pascal@20281 40
al@20534 41 install -Dm600 $stuff/etc/partimaged/partimaged.cert $install/etc/partimaged/partimaged.cert
al@20534 42 install -Dm600 $stuff/etc/partimaged/partimaged.key $install/etc/partimaged/partimaged.key
al@20534 43 install -Dm755 $stuff/etc/init.d/partimaged $install/etc/init.d/partimaged
al@20534 44
al@20534 45 mkdir -p $install/var/lib/partimaged/
erjo@582 46 }
erjo@582 47
al@20534 48 genpkg_rules() {
al@20719 49 copy @std
pascal@20281 50 case $PACKAGE in
al@20534 51 partimage)
al@21105 52 DEPENDS="libbzip2 newt openssl slang zlib"
al@20534 53 ;;
al@20534 54 partimage-pam)
al@20534 55 CAT="system-tools|using PAM"
al@20534 56 PROVIDE="partimage:pam"
al@21105 57 DEPENDS="libbzip2 newt openssl pam slang zlib"
al@20534 58 ;;
pascal@20281 59 esac
erjo@582 60 }
erjo@582 61
al@20534 62 # The same post-install/remove rules for both PAM/non-PAM packages
al@20534 63
al@20534 64 post_install() {
al@20534 65 # Adding user/group partimag...
pascal@18730 66 chroot "$1/" adduser -S -H -D partimag
erjo@582 67
al@20534 68 # Setting permissions for config files
pascal@18730 69 chmod 0600 "$1"/etc/partimaged/*
al@20534 70 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
al@18741 71
al@20534 72 # Creating image files directory
pascal@18730 73 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
al@18741 74
al@20534 75 [ -n "$quiet" ] || cat <<EOT
al@20534 76
al@20534 77 .---------------------------------------------------.
al@21020 78 | To start partimage server you can run: |
al@20534 79 | /etc/init.d/partimaged start |
al@20534 80 | |
al@20534 81 | Or add partimaged to RUN_DAEMONS in /etc/rcS.conf |
al@20534 82 '---------------------------------------------------'
al@20534 83 EOT
erjo@582 84 }
erjo@582 85
al@20534 86 post_remove() {
al@20534 87 chroot "$1/" deluser partimag
pascal@18730 88 chroot "$1/" delgroup partimag
al@18741 89
pascal@18730 90 if [ -f "$1/etc/paritimaged" ]; then
pascal@18730 91 rm -rf "$1/etc/partimaged"
erjo@582 92 fi
erjo@582 93 }