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