wok-next view partimage/receipt @ rev 20281

remove netatalk-pam, partimage-pam, openssh-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 08 14:51:34 2017 +0100 (2017-11-08)
parents 6fab3264ba87
children d3adbeea3a9f
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
21 cp -a $src $src-pam
22 ./configure \
23 --prefix=/usr \
24 --disable-pam \
25 --sysconfdir=/etc \
26 --infodir=/usr/share/info \
27 --mandir=/usr/share/man $CONFIGURE_ARGS &&
28 make &&
29 make DESTDIR=$DESTDIR install
31 cd $src-pam
32 ./configure \
33 --prefix=/usr \
34 --enable-pam \
35 --sysconfdir=/etc \
36 --infodir=/usr/share/info \
37 --mandir=/usr/share/man $CONFIGURE_ARGS &&
38 make &&
39 make DESTDIR=$DESTDIR-pam install
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 case $PACKAGE in
46 partimage)
47 DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base"
48 mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged
49 cp -a $install/usr/sbin $fs/usr
50 cp -a $install/etc $fs/
51 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
52 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d
53 ;;
54 partimage-pam)
55 CAT="system-tools|using PAM"
56 PROVIDE="partimage:pam"
57 DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base"
58 mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged
59 cp -a $install-pam/usr/sbin $fs/usr
60 cp -a $install-pam/etc $fs/
61 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
62 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d
63 ;;
64 esac
65 }
67 post_install_partimage()
68 {
69 echo
70 echo "Adding user/group partimag..."
71 chroot "$1/" adduser -S -H -D partimag
73 echo "Setting permissions for config files"
74 chmod 0600 "$1"/etc/partimaged/*
75 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
77 echo "Creating image files directory"
78 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
80 echo ""
81 echo -e "\nTo starts partimage server you can run :\n"
82 echo "/etc/init.d/partimaged start"
83 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
84 }
86 post_remove_partimage()
87 {
88 chroot "$1/" deluser partimag
89 chroot "$1/" delgroup partimag
91 if [ -f "$1/etc/paritimaged" ]; then
92 rm -rf "$1/etc/partimaged"
93 fi
94 }
96 post_install_partimage_pam()
97 {
98 echo
99 echo "Adding user/group partimag..."
100 chroot "$1/" adduser -S -H -D partimag
102 echo "Setting permissions for config files"
103 chmod 0600 "$1"/etc/partimaged/*
104 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
106 echo "Creating image files directory"
107 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
109 echo ""
110 echo -e "\nTo starts partimage server you can run :\n"
111 echo "/etc/init.d/partimaged start"
112 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
113 }
115 post_remove_partimage_pam()
116 {
117 chroot "$1/" deluser partimag
118 chroot "$1/" delgroup partimag
120 if [ -f "$1/etc/paritimaged" ]; then
121 rm -rf "$1/etc/partimaged"
122 fi
123 }