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