wok annotate partimage-pam/receipt @ rev 20501

frozen-bubble: move *.pm to i486-linux path
author Richard Dunbar <mojo@slitaz.org>
date Mon Oct 29 17:05:35 2018 -0400 (2018-10-29)
parents 9e01bc6321ea
children 8dd8bab3f0ca
rev   line source
pascal@2222 1 # SliTaz package receipt.
pascal@2222 2
pascal@2222 3 PACKAGE="partimage-pam"
slaxemulator@8643 4 VERSION="0.6.9"
pascal@2222 5 CATEGORY="system-tools"
pascal@2222 6 SHORT_DESC="Saves partitions in an image file."
pascal@2222 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15000 8 LICENSE="GPL2"
pascal@2222 9 SOURCE="partimage"
pascal@2222 10 TARBALL="$SOURCE-$VERSION.tar.bz2"
pascal@2222 11 WEB_SITE="http://www.partimage.org/Index.fr.html"
slaxemulator@8643 12 WGET_URL="$SF_MIRROR/$SOURCE/$TARBALL"
pascal@2222 13 PROVIDE="partimage:pam"
pascal@2222 14
pascal@15000 15 DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base"
pascal@15000 16 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev pam pam-dev"
pascal@15000 17
pascal@2222 18 # Rules to configure and make the package.
pascal@2222 19 compile_rules()
pascal@2222 20 {
pascal@12783 21 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h
pascal@12783 22 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp
al@18741 23 ./configure \
al@18741 24 --prefix=/usr \
al@18741 25 --enable-pam \
al@18741 26 --sysconfdir=/etc \
al@18741 27 --infodir=/usr/share/info \
al@18741 28 --mandir=/usr/share/man \
al@18741 29 $CONFIGURE_ARGS &&
pascal@2222 30 make &&
pascal@15000 31 make DESTDIR=$DESTDIR install
pascal@2222 32 }
pascal@2222 33
pascal@2222 34 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2222 35 genpkg_rules()
pascal@2222 36 {
pascal@2222 37 mkdir -p $fs/usr $fs/etc/init.d
pascal@15000 38 cp -a $install/usr/sbin $fs/usr
pascal@15000 39 cp -a $install/etc $fs/
slaxemulator@9701 40 install -g root -o root -m 0600 ../$SOURCE/stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
slaxemulator@9701 41 install -g root -o root -m 0755 ../$SOURCE/stuff/etc/init.d/partimaged $fs/etc/init.d
pascal@2222 42 }
pascal@2222 43
pascal@2222 44 post_install()
pascal@2222 45 {
al@18741 46 newline
pascal@2222 47 echo "Adding user/group partimag..."
pascal@18730 48 chroot "$1/" adduser -S -H -D partimag
pascal@2222 49
pascal@2222 50 echo "Setting permissions for config files"
pascal@18730 51 chmod 0600 "$1"/etc/partimaged/*
pascal@18730 52 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
al@18741 53
al@18741 54 echo "Creating image files directory"
pascal@18730 55 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
al@18741 56
pascal@2222 57 echo ""
pascal@2222 58 echo -e "\nTo starts $SOURCE server you can run :\n"
al@18741 59 echo "/etc/init.d/partimaged start"
al@18741 60 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
pascal@2222 61 }
pascal@2222 62
pascal@2222 63 post_remove()
pascal@2222 64 {
pascal@18730 65 chroot "$1/" deluser partimag
pascal@18730 66 chroot "$1/" delgroup partimag
al@18741 67
pascal@18730 68 if [ -f "$1/etc/paritimaged" ]; then
pascal@18730 69 rm -rf "$1/etc/partimaged"
pascal@2222 70 fi
pascal@2222 71 }