wok-stable view partimage/receipt @ rev 2334
squidguard: relocate configfile, add post_remove function, restart squid after install/remove package.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Mar 01 08:53:15 2009 +0100 (2009-03-01) |
parents | 61bc01878920 |
children | 89e187b7d309 |
line source
1 # SliTaz package receipt.
3 PACKAGE="partimage"
4 VERSION="0.6.7"
5 CATEGORY="system-tools"
6 SHORT_DESC="Saves partitions in an image file."
7 MAINTAINER="erjo@slitaz.org"
8 DEPENDS="newt bzip2 openssl slitaz-base-files"
9 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.partimage.org/Index.fr.html"
12 WGET_URL="http://heanet.dl.sourceforge.net/sourceforge/partimage/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 ./configure --prefix=/usr \
19 --sysconfdir=/etc \
20 --infodir=/usr/share/info \
21 --mandir=/usr/share/man $CONFIGURE_ARGS &&
22 make &&
23 make DESTDIR=$PWD/_pkg install
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/usr $fs/etc/init.d
30 cp -a $_pkg/usr/sbin $fs/usr
31 cp -a $_pkg/etc $fs/
32 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
33 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d
34 strip -s $fs/usr/sbin/*
35 }
37 post_install()
38 {
39 echo "Processing post install commands..."
40 echo "Adding user/group partimag..."
41 chroot $1/ adduser -S -H -D partimag
43 echo "Setting permissions for config files"
44 chmod 0600 $1/etc/partimaged/*
45 chown partimag.partimag $1/etc/partimaged/*
47 echo " Creating image files directory"
48 install -g partimag -o partimag -m 0755 -d $1/var/lib/partimaged
50 echo ""
51 echo -e "\nTo starts $PACKAGE server you can run :\n"
52 echo "/etc/init.d/partimaged start"
53 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
54 }
56 post_remove()
57 {
58 deluser partimag
59 delgroup partimag
61 if [ -f /etc/paritimaged ]; then
62 rm -rf /etc/partimaged
63 fi
64 }