wok-6.x annotate partimage/receipt @ rev 25120
updated pekwm (0.1.17 -> 0.2.1)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Jun 26 10:18:40 2022 +0100 (2022-06-26) |
parents | 080c1dff8494 |
children |
rev | line source |
---|---|
erjo@582 | 1 # SliTaz package receipt. |
erjo@582 | 2 |
erjo@582 | 3 PACKAGE="partimage" |
slaxemulator@8643 | 4 VERSION="0.6.9" |
erjo@582 | 5 CATEGORY="system-tools" |
erjo@582 | 6 SHORT_DESC="Saves partitions in an image file." |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15000 | 8 LICENSE="GPL2" |
erjo@582 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pascal@24891 | 10 WEB_SITE="https://www.partimage.org/" |
slaxemulator@8643 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
erjo@582 | 12 |
pascal@15000 | 13 DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base" |
pascal@15000 | 14 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev" |
pascal@15000 | 15 |
pascal@24396 | 16 # What is the latest version available today? |
pascal@24396 | 17 current_version() |
pascal@24396 | 18 { |
pascal@24396 | 19 wget -O - https://sourceforge.net/projects/partimage/files/stable/ 2>/dev/null | \ |
pascal@24396 | 20 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ |
pascal@24396 | 21 sed '/scope="row/!d;s|.*/stable/||;s|/.*||;q' |
pascal@24396 | 22 } |
pascal@24396 | 23 |
erjo@582 | 24 # Rules to configure and make the package. |
erjo@582 | 25 compile_rules() |
al@18741 | 26 { |
pascal@12783 | 27 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h |
pascal@12783 | 28 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp |
al@18741 | 29 ./configure \ |
al@18741 | 30 --prefix=/usr \ |
al@18741 | 31 --sysconfdir=/etc \ |
al@18741 | 32 --infodir=/usr/share/info \ |
al@18741 | 33 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@1484 | 34 make && |
pascal@15000 | 35 make DESTDIR=$DESTDIR install |
erjo@582 | 36 } |
erjo@582 | 37 |
erjo@582 | 38 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@582 | 39 genpkg_rules() |
erjo@582 | 40 { |
pascal@11689 | 41 mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged |
pascal@15000 | 42 cp -a $install/usr/sbin $fs/usr |
pascal@15000 | 43 cp -a $install/etc $fs/ |
erjo@582 | 44 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged |
erjo@582 | 45 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d |
erjo@582 | 46 } |
erjo@582 | 47 |
erjo@582 | 48 post_install() |
erjo@582 | 49 { |
al@18741 | 50 echo |
erjo@582 | 51 echo "Adding user/group partimag..." |
pascal@18730 | 52 chroot "$1/" adduser -S -H -D partimag |
erjo@582 | 53 |
erjo@582 | 54 echo "Setting permissions for config files" |
pascal@18730 | 55 chmod 0600 "$1"/etc/partimaged/* |
pascal@18730 | 56 chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/* |
al@18741 | 57 |
al@18741 | 58 echo "Creating image files directory" |
pascal@18730 | 59 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged" |
al@18741 | 60 |
erjo@582 | 61 echo "" |
erjo@582 | 62 echo -e "\nTo starts $PACKAGE server you can run :\n" |
al@18741 | 63 echo "/etc/init.d/partimaged start" |
al@18741 | 64 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n" |
erjo@582 | 65 } |
erjo@582 | 66 |
erjo@582 | 67 post_remove() |
erjo@582 | 68 { |
pascal@18730 | 69 chroot "$1/" deluser partimag |
pascal@18730 | 70 chroot "$1/" delgroup partimag |
al@18741 | 71 |
pascal@18730 | 72 if [ -f "$1/etc/paritimaged" ]; then |
pascal@18730 | 73 rm -rf "$1/etc/partimaged" |
erjo@582 | 74 fi |
erjo@582 | 75 } |