wok-6.x view partimage/receipt @ rev 24873

updated lynis (3.0.6 -> 3.0.7)
author Hans-G?nter Theisgen
date Thu Mar 31 07:46:22 2022 +0100 (2022-03-31)
parents 8dd8bab3f0ca
children 617f7ee416b1
line source
1 # SliTaz package receipt.
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/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base"
14 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - https://sourceforge.net/projects/partimage/files/stable/ 2>/dev/null | \
20 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
21 sed '/scope="row/!d;s|.*/stable/||;s|/.*||;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h
28 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp
29 ./configure \
30 --prefix=/usr \
31 --sysconfdir=/etc \
32 --infodir=/usr/share/info \
33 --mandir=/usr/share/man $CONFIGURE_ARGS &&
34 make &&
35 make DESTDIR=$DESTDIR install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged
42 cp -a $install/usr/sbin $fs/usr
43 cp -a $install/etc $fs/
44 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
45 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d
46 }
48 post_install()
49 {
50 echo
51 echo "Adding user/group partimag..."
52 chroot "$1/" adduser -S -H -D partimag
54 echo "Setting permissions for config files"
55 chmod 0600 "$1"/etc/partimaged/*
56 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*
58 echo "Creating image files directory"
59 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
61 echo ""
62 echo -e "\nTo starts $PACKAGE server you can run :\n"
63 echo "/etc/init.d/partimaged start"
64 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
65 }
67 post_remove()
68 {
69 chroot "$1/" deluser partimag
70 chroot "$1/" delgroup partimag
72 if [ -f "$1/etc/paritimaged" ]; then
73 rm -rf "$1/etc/partimaged"
74 fi
75 }