wok-next view partimage/receipt @ rev 21722

efivar: typo in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 01 10:31:46 2020 +0000 (2020-09-01)
parents d5aab818505e
children
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="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.partimage.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 BUILD_DEPENDS="gettext-dev newt-dev slang-dev bzip2-dev openssl-dev zlib-dev \
15 pam-dev"
16 SPLIT="$PACKAGE-pam:pam"
18 compile_rules() {
19 sed -i 's/CRYPTO_lock/X509_new/g' configure
21 case $SET in
22 '')
23 ./configure \
24 --disable-pam \
25 $CONFIGURE_ARGS &&
26 make &&
27 make install || return 1
28 ;;
29 pam)
30 ./configure \
31 --enable-pam \
32 $CONFIGURE_ARGS &&
33 make &&
34 make pamfile &&
35 make install || return 1
37 install -Dm644 partimaged.pam $install/etc/pam.d/partimaged
38 ;;
39 esac
41 install -Dm600 $stuff/etc/partimaged/partimaged.cert $install/etc/partimaged/partimaged.cert
42 install -Dm600 $stuff/etc/partimaged/partimaged.key $install/etc/partimaged/partimaged.key
43 install -Dm755 $stuff/etc/init.d/partimaged $install/etc/init.d/partimaged
45 mkdir -p $install/var/lib/partimaged/
46 }
48 genpkg_rules() {
49 copy @std
50 case $PACKAGE in
51 partimage)
52 DEPENDS="libbzip2 newt openssl slang zlib"
53 ;;
54 partimage-pam)
55 CAT="system-tools|using PAM"
56 PROVIDE="partimage:pam"
57 DEPENDS="libbzip2 newt openssl pam slang zlib"
58 ;;
59 esac
60 }
62 # The same post-install/remove rules for both PAM/non-PAM packages
64 post_install() {
65 # Adding user/group partimag...
66 chroot "$1/" adduser -S -H -D partimag
68 # Setting permissions for config files
69 chmod 0600 "$1"/etc/partimaged/*
70 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
72 # Creating image files directory
73 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
75 [ -n "$quiet" ] || cat <<EOT
77 .---------------------------------------------------.
78 | To start partimage server you can run: |
79 | /etc/init.d/partimaged start |
80 | |
81 | Or add partimaged to RUN_DAEMONS in /etc/rcS.conf |
82 '---------------------------------------------------'
83 EOT
84 }
86 post_remove() {
87 chroot "$1/" deluser partimag
88 chroot "$1/" delgroup partimag
90 if [ -f "$1/etc/paritimaged" ]; then
91 rm -rf "$1/etc/partimaged"
92 fi
93 }