wok-next annotate partimage/receipt @ rev 20534

Clean default configure options when site script used.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 30 19:31:50 2018 +0300 (2018-03-30)
parents d3adbeea3a9f
children 599c2faa5148
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"
erjo@582 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
erjo@582 10 WEB_SITE="http://www.partimage.org/Index.fr.html"
slaxemulator@8643 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
erjo@582 12
pascal@20281 13 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev pam-dev"
al@20534 14 SPLIT="partimage partimage-pam:pam"
pascal@15000 15
al@20534 16 compile_rules() {
al@20534 17 case $SET in
al@20534 18 '') SET_ARGS='--disable-pam';;
al@20534 19 pam) SET_ARGS='--enable-pam';;
al@20534 20 esac
al@20534 21
pascal@12783 22 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h
pascal@12783 23 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp
al@20292 24
al@18741 25 ./configure \
al@20534 26 $SET_ARGS \
al@20534 27 $CONFIGURE_ARGS &&
pascal@1484 28 make &&
al@20292 29 make DESTDIR=$DESTDIR install || return 1
pascal@20281 30
al@20534 31 install -Dm600 $stuff/etc/partimaged/partimaged.cert $install/etc/partimaged/partimaged.cert
al@20534 32 install -Dm600 $stuff/etc/partimaged/partimaged.key $install/etc/partimaged/partimaged.key
al@20534 33 install -Dm755 $stuff/etc/init.d/partimaged $install/etc/init.d/partimaged
al@20534 34
al@20534 35 mkdir -p $install/var/lib/partimaged/
erjo@582 36 }
erjo@582 37
al@20534 38 genpkg_rules() {
pascal@20281 39 case $PACKAGE in
al@20534 40 partimage)
al@20534 41 copy @std
al@20534 42 DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base"
al@20534 43 ;;
al@20534 44 partimage-pam)
al@20534 45 copy @std
al@20534 46 CAT="system-tools|using PAM"
al@20534 47 PROVIDE="partimage:pam"
al@20534 48 DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base"
al@20534 49 ;;
pascal@20281 50 esac
erjo@582 51 }
erjo@582 52
al@20534 53 # The same post-install/remove rules for both PAM/non-PAM packages
al@20534 54
al@20534 55 post_install() {
al@20534 56 # Adding user/group partimag...
pascal@18730 57 chroot "$1/" adduser -S -H -D partimag
erjo@582 58
al@20534 59 # Setting permissions for config files
pascal@18730 60 chmod 0600 "$1"/etc/partimaged/*
al@20534 61 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
al@18741 62
al@20534 63 # Creating image files directory
pascal@18730 64 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
al@18741 65
al@20534 66 [ -n "$quiet" ] || cat <<EOT
al@20534 67
al@20534 68 .---------------------------------------------------.
al@20534 69 | To starts partimage server you can run: |
al@20534 70 | /etc/init.d/partimaged start |
al@20534 71 | |
al@20534 72 | Or add partimaged to RUN_DAEMONS in /etc/rcS.conf |
al@20534 73 '---------------------------------------------------'
al@20534 74 EOT
erjo@582 75 }
erjo@582 76
al@20534 77 post_remove() {
al@20534 78 chroot "$1/" deluser partimag
pascal@18730 79 chroot "$1/" delgroup partimag
al@18741 80
pascal@18730 81 if [ -f "$1/etc/paritimaged" ]; then
pascal@18730 82 rm -rf "$1/etc/partimaged"
erjo@582 83 fi
erjo@582 84 }