wok-current annotate partimage-pam/receipt @ rev 12984
slitaz-base-files: add /run
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 02 16:06:04 2012 +0200 (2012-06-02) |
parents | 7b13b3b4b836 |
children | 380ffe05937a |
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@5005 | 8 DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base" |
pascal@2222 | 9 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev pam pam-dev" |
pascal@2222 | 10 SOURCE="partimage" |
pascal@2222 | 11 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@2222 | 12 WEB_SITE="http://www.partimage.org/Index.fr.html" |
slaxemulator@8643 | 13 WGET_URL="$SF_MIRROR/$SOURCE/$TARBALL" |
pascal@2222 | 14 PROVIDE="partimage:pam" |
pascal@2222 | 15 |
pascal@2222 | 16 # Rules to configure and make the package. |
pascal@2222 | 17 compile_rules() |
pascal@2222 | 18 { |
pascal@2222 | 19 cd $src |
pascal@12783 | 20 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h |
pascal@12783 | 21 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp |
pascal@2222 | 22 ./configure --prefix=/usr --enable-pam \ |
pascal@2222 | 23 --sysconfdir=/etc \ |
pascal@2222 | 24 --infodir=/usr/share/info \ |
pascal@2222 | 25 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@2222 | 26 make && |
pascal@2222 | 27 make DESTDIR=$PWD/_pkg install |
pascal@2222 | 28 } |
pascal@2222 | 29 |
pascal@2222 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2222 | 31 genpkg_rules() |
pascal@2222 | 32 { |
pascal@2222 | 33 mkdir -p $fs/usr $fs/etc/init.d |
pascal@2222 | 34 cp -a $_pkg/usr/sbin $fs/usr |
pascal@2222 | 35 cp -a $_pkg/etc $fs/ |
slaxemulator@9701 | 36 install -g root -o root -m 0600 ../$SOURCE/stuff/etc/partimaged/partimaged.* $fs/etc/partimaged |
slaxemulator@9701 | 37 install -g root -o root -m 0755 ../$SOURCE/stuff/etc/init.d/partimaged $fs/etc/init.d |
pascal@2222 | 38 } |
pascal@2222 | 39 |
pascal@2222 | 40 post_install() |
pascal@2222 | 41 { |
pascal@2222 | 42 echo "Processing post install commands..." |
pascal@2222 | 43 echo "Adding user/group partimag..." |
pascal@2222 | 44 chroot $1/ adduser -S -H -D partimag |
pascal@2222 | 45 |
pascal@2222 | 46 echo "Setting permissions for config files" |
pascal@2222 | 47 chmod 0600 $1/etc/partimaged/* |
pascal@2222 | 48 chown partimag.partimag $1/etc/partimaged/* |
pascal@2222 | 49 |
pascal@2222 | 50 echo " Creating image files directory" |
pascal@2222 | 51 install -g partimag -o partimag -m 0755 -d $1/var/lib/partimaged |
pascal@2222 | 52 |
pascal@2222 | 53 echo "" |
pascal@2222 | 54 echo -e "\nTo starts $SOURCE server you can run :\n" |
pascal@2222 | 55 echo "/etc/init.d/partimaged start" |
pascal@2222 | 56 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n" |
pascal@2222 | 57 } |
pascal@2222 | 58 |
pascal@2222 | 59 post_remove() |
pascal@2222 | 60 { |
slaxemulator@8643 | 61 chroot $1/ deluser partimag |
slaxemulator@8643 | 62 chroot $1/ delgroup partimag |
pascal@2222 | 63 |
slaxemulator@8643 | 64 if [ -f $1/etc/paritimaged ]; then |
slaxemulator@8643 | 65 rm -rf $1/etc/partimaged |
pascal@2222 | 66 fi |
pascal@2222 | 67 } |
pascal@2222 | 68 |
pascal@2222 | 69 |