wok annotate rpm4/receipt @ rev 4398
Up: pidgin (2.6.3)
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Oct 18 12:19:16 2009 +0000 (2009-10-18) |
parents | b38a3f04facb |
children | 9f963a3c2aa3 |
rev | line source |
---|---|
erjo@1432 | 1 # SliTaz package receipt. |
erjo@1432 | 2 |
erjo@1432 | 3 PACKAGE="rpm4" |
erjo@1432 | 4 VERSION="4.4.2.3" |
erjo@1432 | 5 CATEGORY="system-tools" |
erjo@1432 | 6 SHORT_DESC="RPM Package Manager" |
erjo@1432 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@2433 | 8 DEPENDS="popt beecrypt bzlib expat sqlite zlib" |
erjo@1434 | 9 BUILD_DEPENDS="beecrypt beecrypt-dev popt-dev gettext" |
erjo@1432 | 10 SOURCE="rpm" |
erjo@1432 | 11 TARBALL="$SOURCE-$VERSION.tar.gz" |
erjo@1432 | 12 WEB_SITE="http://www.rpm.org/" |
erjo@1432 | 13 WGET_URL="http://www.rpm.org/releases/rpm-4.4.x/$TARBALL" |
erjo@1432 | 14 |
erjo@1432 | 15 # Rules to configure and make the package. |
erjo@1432 | 16 compile_rules() |
erjo@1432 | 17 { |
erjo@1432 | 18 cd $src |
erjo@1432 | 19 ./configure --prefix=/usr \ |
erjo@1432 | 20 --infodir=/usr/share/info \ |
erjo@1432 | 21 --with-selinux=no \ |
erjo@1432 | 22 --with-lua=no \ |
erjo@1432 | 23 --with-dmalloc=no \ |
erjo@1432 | 24 --with-efence=no \ |
pascal@2433 | 25 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@2433 | 26 make && |
erjo@1432 | 27 make DESTDIR=$PWD/_pkg install |
erjo@1432 | 28 } |
erjo@1432 | 29 |
erjo@1432 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@1432 | 31 genpkg_rules() |
erjo@1432 | 32 { |
erjo@1432 | 33 mkdir -p $fs/usr/bin \ |
erjo@1432 | 34 $fs/usr/lib \ |
erjo@1432 | 35 $fs/var/lib/rpm \ |
erjo@1432 | 36 $fs/usr/src/redhat/SOURCES \ |
erjo@1432 | 37 $fs/usr/src/redhat/BUILD \ |
erjo@1432 | 38 $fs/usr/src/redhat/RPMS \ |
erjo@1432 | 39 $fs/usr/src/redhat/SPECS \ |
erjo@1432 | 40 $fs/usr/src/redhat/SRPMS |
erjo@1432 | 41 |
erjo@1432 | 42 cp -a $_pkg/usr/bin $fs/usr |
erjo@1432 | 43 cp -a $_pkg/bin/* $fs/usr/bin |
erjo@1432 | 44 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
erjo@1432 | 45 cp -a $_pkg/usr/lib/rpm $fs/usr/lib |
pascal@2433 | 46 rm $fs/usr/lib/libpopt.so.0* |
erjo@1432 | 47 } |
erjo@1432 | 48 |
erjo@1432 | 49 post_install() |
erjo@1432 | 50 { |
erjo@1432 | 51 echo "Processing post install commands..." |
erjo@1432 | 52 cmd=`readlink $root/bin/rpm` |
erjo@1432 | 53 if [ ! "$cmd" = "/usr/bin/rpm" ]; then |
erjo@1432 | 54 echo "" |
erjo@1432 | 55 echo "**** Actual RPM link : $cmd" |
erjo@1432 | 56 echo "" |
erjo@1432 | 57 echo -n "Do you want rpm for /bin/rpm (y/N) ? : "; read anser |
erjo@1432 | 58 if [ "$anser" == "y" ]; then |
erjo@1432 | 59 echo "" |
erjo@1432 | 60 echo -n "Removing rpm link to make a new one pointing on /usr/bin/rpm..." |
erjo@1432 | 61 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm |
erjo@1432 | 62 status |
erjo@1432 | 63 else |
erjo@1432 | 64 echo "" |
erjo@1432 | 65 echo "Leaving /bin/vi to : $cmd" |
erjo@1432 | 66 fi |
erjo@1432 | 67 fi |
erjo@1432 | 68 |
erjo@1432 | 69 # Building rpm database. |
erjo@1432 | 70 $root/usr/bin/rpm --initdb --quiet |
erjo@1432 | 71 } |
erjo@1432 | 72 |
erjo@1432 | 73 pre_remove() |
erjo@1432 | 74 { |
erjo@1432 | 75 if [ -d /var/lib/rpm ]; then |
erjo@1432 | 76 rm -f /var/lib/rpm/* |
erjo@1432 | 77 fi |
erjo@1432 | 78 } |
erjo@1432 | 79 |
erjo@1432 | 80 post_remove() |
erjo@1432 | 81 { |
erjo@1432 | 82 echo "Processing post remove commands..." |
erjo@1432 | 83 cmd=`readlink $root/bin/rpm` |
erjo@1432 | 84 if [ ! "$cmd" = "/bin/rpm" ]; then |
erjo@1432 | 85 echo -n "Restore applets from busybox..." |
erjo@1432 | 86 ln -sf $root/bin/busybox $root/bin/rpm |
erjo@1432 | 87 ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio |
erjo@1432 | 88 status |
erjo@1432 | 89 fi |
erjo@1432 | 90 } |