wok-4.x annotate partimage/receipt @ rev 7316
Up: assaultcube to 1.10.4. Up: assaultcube-data to 1.10.4.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Nov 17 17:55:22 2010 +0000 (2010-11-17) |
parents | c79e4c1abb03 |
children | 5f4753b7cf83 |
rev | line source |
---|---|
erjo@582 | 1 # SliTaz package receipt. |
erjo@582 | 2 |
erjo@582 | 3 PACKAGE="partimage" |
erjo@582 | 4 VERSION="0.6.7" |
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@5005 | 8 DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base" |
pascal@1484 | 9 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev" |
erjo@582 | 10 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
erjo@582 | 11 WEB_SITE="http://www.partimage.org/Index.fr.html" |
erjo@582 | 12 WGET_URL="http://heanet.dl.sourceforge.net/sourceforge/partimage/$TARBALL" |
erjo@582 | 13 |
erjo@582 | 14 # Rules to configure and make the package. |
erjo@582 | 15 compile_rules() |
erjo@582 | 16 { |
erjo@4229 | 17 busybox patch -p0 -i stuff/partimage-0.6.7_gcc4.u |
erjo@4229 | 18 |
erjo@582 | 19 cd $src |
pascal@5541 | 20 # fix build with openssl 1.0 |
pascal@5543 | 21 sed -i 's/= SSLv2_client_method/= (SSL_METHOD*) SSLv2_client_method/' \ |
pascal@5541 | 22 src/client/netclient.cpp |
pascal@5543 | 23 sed -i 's/= SSLv23_server_method/= (SSL_METHOD*) SSLv23_server_method/' \ |
pascal@5541 | 24 src/server/netserver.cpp |
erjo@582 | 25 ./configure --prefix=/usr \ |
erjo@582 | 26 --sysconfdir=/etc \ |
erjo@582 | 27 --infodir=/usr/share/info \ |
pascal@1484 | 28 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@1484 | 29 make && |
erjo@582 | 30 make DESTDIR=$PWD/_pkg install |
erjo@582 | 31 } |
erjo@582 | 32 |
erjo@582 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@582 | 34 genpkg_rules() |
erjo@582 | 35 { |
erjo@582 | 36 mkdir -p $fs/usr $fs/etc/init.d |
erjo@582 | 37 cp -a $_pkg/usr/sbin $fs/usr |
erjo@582 | 38 cp -a $_pkg/etc $fs/ |
erjo@582 | 39 install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged |
erjo@582 | 40 install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d |
erjo@582 | 41 strip -s $fs/usr/sbin/* |
erjo@582 | 42 } |
erjo@582 | 43 |
erjo@582 | 44 post_install() |
erjo@582 | 45 { |
erjo@582 | 46 echo "Processing post install commands..." |
erjo@582 | 47 echo "Adding user/group partimag..." |
pascal@1137 | 48 chroot $1/ adduser -S -H -D partimag |
erjo@582 | 49 |
erjo@582 | 50 echo "Setting permissions for config files" |
pascal@1137 | 51 chmod 0600 $1/etc/partimaged/* |
pascal@1137 | 52 chown partimag.partimag $1/etc/partimaged/* |
erjo@582 | 53 |
erjo@582 | 54 echo " Creating image files directory" |
pascal@1137 | 55 install -g partimag -o partimag -m 0755 -d $1/var/lib/partimaged |
erjo@582 | 56 |
erjo@582 | 57 echo "" |
erjo@582 | 58 echo -e "\nTo starts $PACKAGE server you can run :\n" |
erjo@582 | 59 echo "/etc/init.d/partimaged start" |
erjo@582 | 60 echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n" |
erjo@582 | 61 } |
erjo@582 | 62 |
erjo@582 | 63 post_remove() |
erjo@582 | 64 { |
erjo@582 | 65 deluser partimag |
erjo@582 | 66 delgroup partimag |
erjo@582 | 67 |
erjo@582 | 68 if [ -f /etc/paritimaged ]; then |
erjo@582 | 69 rm -rf /etc/partimaged |
erjo@582 | 70 fi |
erjo@582 | 71 } |
erjo@582 | 72 |
erjo@582 | 73 |