wok-next view partimage/receipt @ rev 20452
liblzma-dev is absent -> xz-dev
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Feb 28 14:43:56 2018 +0200 (2018-02-28) |
parents | 204470f08d82 |
children | 757d032c55c7 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="partimage"
4 VERSION="0.6.9"
5 CATEGORY="system-tools"
6 SHORT_DESC="Saves partitions in an image file"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.partimage.org/Index.fr.html"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev pam-dev"
14 SPLIT="partimage partimage-pam"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h
20 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp
22 cp -a $src $src-pam
24 ./configure \
25 --prefix=/usr \
26 --disable-pam \
27 --sysconfdir=/etc \
28 --infodir=/usr/share/info \
29 --mandir=/usr/share/man $CONFIGURE_ARGS &&
30 make &&
31 make DESTDIR=$DESTDIR install || return 1
33 cd $src-pam
34 ./configure \
35 --prefix=/usr \
36 --enable-pam \
37 --sysconfdir=/etc \
38 --infodir=/usr/share/info \
39 --mandir=/usr/share/man $CONFIGURE_ARGS &&
40 make &&
41 make DESTDIR=$DESTDIR-pam install
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 case $PACKAGE in
48 partimage)
49 DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base"
50 mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged
51 cp -a $install/usr/sbin $fs/usr
52 cp -a $install/etc $fs/
53 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
54 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d
55 ;;
56 partimage-pam)
57 CAT="system-tools|using PAM"
58 PROVIDE="partimage:pam"
59 DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base"
60 mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged
61 cp -a $install-pam/usr/sbin $fs/usr
62 cp -a $install-pam/etc $fs/
63 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
64 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d
65 ;;
66 esac
67 }
69 post_install_partimage()
70 {
71 echo
72 echo "Adding user/group partimag..."
73 chroot "$1/" adduser -S -H -D partimag
75 echo "Setting permissions for config files"
76 chmod 0600 "$1"/etc/partimaged/*
77 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
79 echo "Creating image files directory"
80 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
82 echo ""
83 echo -e "\nTo starts partimage server you can run :\n"
84 echo "/etc/init.d/partimaged start"
85 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
86 }
88 post_remove_partimage()
89 {
90 chroot "$1/" deluser partimag
91 chroot "$1/" delgroup partimag
93 if [ -f "$1/etc/paritimaged" ]; then
94 rm -rf "$1/etc/partimaged"
95 fi
96 }
98 post_install_partimage_pam()
99 {
100 echo
101 echo "Adding user/group partimag..."
102 chroot "$1/" adduser -S -H -D partimag
104 echo "Setting permissions for config files"
105 chmod 0600 "$1"/etc/partimaged/*
106 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
108 echo "Creating image files directory"
109 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
111 echo ""
112 echo -e "\nTo starts partimage server you can run :\n"
113 echo "/etc/init.d/partimaged start"
114 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
115 }
117 post_remove_partimage_pam()
118 {
119 chroot "$1/" deluser partimag
120 chroot "$1/" delgroup partimag
122 if [ -f "$1/etc/paritimaged" ]; then
123 rm -rf "$1/etc/partimaged"
124 fi
125 }