wok-next view partimage/receipt @ rev 20593

Up gpm (1.20.7)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Apr 14 16:28:35 2018 +0300 (2018-04-14)
parents d3adbeea3a9f
children 599c2faa5148
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:pam"
16 compile_rules() {
17 case $SET in
18 '') SET_ARGS='--disable-pam';;
19 pam) SET_ARGS='--enable-pam';;
20 esac
22 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h
23 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp
25 ./configure \
26 $SET_ARGS \
27 $CONFIGURE_ARGS &&
28 make &&
29 make DESTDIR=$DESTDIR install || return 1
31 install -Dm600 $stuff/etc/partimaged/partimaged.cert $install/etc/partimaged/partimaged.cert
32 install -Dm600 $stuff/etc/partimaged/partimaged.key $install/etc/partimaged/partimaged.key
33 install -Dm755 $stuff/etc/init.d/partimaged $install/etc/init.d/partimaged
35 mkdir -p $install/var/lib/partimaged/
36 }
38 genpkg_rules() {
39 case $PACKAGE in
40 partimage)
41 copy @std
42 DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base"
43 ;;
44 partimage-pam)
45 copy @std
46 CAT="system-tools|using PAM"
47 PROVIDE="partimage:pam"
48 DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base"
49 ;;
50 esac
51 }
53 # The same post-install/remove rules for both PAM/non-PAM packages
55 post_install() {
56 # Adding user/group partimag...
57 chroot "$1/" adduser -S -H -D partimag
59 # Setting permissions for config files
60 chmod 0600 "$1"/etc/partimaged/*
61 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
63 # Creating image files directory
64 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
66 [ -n "$quiet" ] || cat <<EOT
68 .---------------------------------------------------.
69 | To starts partimage server you can run: |
70 | /etc/init.d/partimaged start |
71 | |
72 | Or add partimaged to RUN_DAEMONS in /etc/rcS.conf |
73 '---------------------------------------------------'
74 EOT
75 }
77 post_remove() {
78 chroot "$1/" deluser partimag
79 chroot "$1/" delgroup partimag
81 if [ -f "$1/etc/paritimaged" ]; then
82 rm -rf "$1/etc/partimaged"
83 fi
84 }