wok-next annotate partimage/receipt @ rev 19718

Up tty-clock (2.3) (thanks Pascal to pointing me right direction :)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 23 14:40:37 2017 +0300 (2017-05-23)
parents 9e01bc6321ea
children 204470f08d82
rev   line source
erjo@582 1 # SliTaz package receipt.
erjo@582 2
erjo@582 3 PACKAGE="partimage"
slaxemulator@8643 4 VERSION="0.6.9"
erjo@582 5 CATEGORY="system-tools"
erjo@582 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@15000 13 DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base"
pascal@15000 14 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev"
pascal@15000 15
erjo@582 16 # Rules to configure and make the package.
erjo@582 17 compile_rules()
al@18741 18 {
pascal@12783 19 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h
pascal@12783 20 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp
al@18741 21 ./configure \
al@18741 22 --prefix=/usr \
al@18741 23 --sysconfdir=/etc \
al@18741 24 --infodir=/usr/share/info \
al@18741 25 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@1484 26 make &&
pascal@15000 27 make DESTDIR=$DESTDIR install
erjo@582 28 }
erjo@582 29
erjo@582 30 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@582 31 genpkg_rules()
erjo@582 32 {
pascal@11689 33 mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged
pascal@15000 34 cp -a $install/usr/sbin $fs/usr
pascal@15000 35 cp -a $install/etc $fs/
erjo@582 36 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
erjo@582 37 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d
erjo@582 38 }
erjo@582 39
erjo@582 40 post_install()
erjo@582 41 {
al@18741 42 echo
erjo@582 43 echo "Adding user/group partimag..."
pascal@18730 44 chroot "$1/" adduser -S -H -D partimag
erjo@582 45
erjo@582 46 echo "Setting permissions for config files"
pascal@18730 47 chmod 0600 "$1"/etc/partimaged/*
pascal@18730 48 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
al@18741 49
al@18741 50 echo "Creating image files directory"
pascal@18730 51 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
al@18741 52
erjo@582 53 echo ""
erjo@582 54 echo -e "\nTo starts $PACKAGE server you can run :\n"
al@18741 55 echo "/etc/init.d/partimaged start"
al@18741 56 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
erjo@582 57 }
erjo@582 58
erjo@582 59 post_remove()
erjo@582 60 {
pascal@18730 61 chroot "$1/" deluser partimag
pascal@18730 62 chroot "$1/" delgroup partimag
al@18741 63
pascal@18730 64 if [ -f "$1/etc/paritimaged" ]; then
pascal@18730 65 rm -rf "$1/etc/partimaged"
erjo@582 66 fi
erjo@582 67 }