wok-stable annotate rpm4/receipt @ rev 9925
apr: use --with-egd --with-devrandom (apache dont build)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 17 23:24:56 2011 +0200 (2011-05-17) |
parents | 32bbe656f4ef |
children | 8e4c74abdf74 |
rev | line source |
---|---|
erjo@1432 | 1 # SliTaz package receipt. |
erjo@1432 | 2 |
erjo@1432 | 3 PACKAGE="rpm4" |
pascal@7441 | 4 VERSION="4.8.1" |
erjo@1432 | 5 CATEGORY="system-tools" |
erjo@1432 | 6 SHORT_DESC="RPM Package Manager" |
erjo@1432 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@5006 | 8 DEPENDS="popt beecrypt bzlib expat sqlite zlib gcc-lib-base neon libkrb5 \ |
slaxemulator@8472 | 9 libcomerr3 nss nspr db liblzma libmagic" |
pascal@7441 | 10 BUILD_DEPENDS="beecrypt beecrypt-dev popt-dev gettext zlib-dev python-dev \ |
slaxemulator@8472 | 11 nss-dev nspr-dev db-dev liblzma-dev libmagic-dev" |
erjo@1432 | 12 SOURCE="rpm" |
pascal@7441 | 13 TARBALL="$SOURCE-$VERSION.tar.bz2" |
erjo@1432 | 14 WEB_SITE="http://www.rpm.org/" |
pascal@7441 | 15 WGET_URL="http://www.rpm.org/releases/rpm-${VERSION:0:3}.x/$TARBALL" |
jozee@4972 | 16 TAGS="package-manager" |
erjo@1432 | 17 |
erjo@1432 | 18 # Rules to configure and make the package. |
erjo@1432 | 19 compile_rules() |
erjo@1432 | 20 { |
erjo@1432 | 21 cd $src |
pascal@7441 | 22 CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss" ./configure \ |
pascal@7441 | 23 --prefix=/usr \ |
erjo@1432 | 24 --infodir=/usr/share/info \ |
erjo@1432 | 25 --with-selinux=no \ |
erjo@1432 | 26 --with-lua=no \ |
erjo@1432 | 27 --with-dmalloc=no \ |
erjo@1432 | 28 --with-efence=no \ |
pascal@7441 | 29 --with-external-db \ |
pascal@2433 | 30 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@5778 | 31 make -j 4 && |
erjo@1432 | 32 make DESTDIR=$PWD/_pkg install |
erjo@1432 | 33 } |
erjo@1432 | 34 |
erjo@1432 | 35 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@1432 | 36 genpkg_rules() |
erjo@1432 | 37 { |
erjo@1432 | 38 mkdir -p $fs/usr/bin \ |
erjo@1432 | 39 $fs/usr/lib \ |
erjo@1432 | 40 $fs/var/lib/rpm \ |
erjo@1432 | 41 $fs/usr/src/redhat/SOURCES \ |
erjo@1432 | 42 $fs/usr/src/redhat/BUILD \ |
erjo@1432 | 43 $fs/usr/src/redhat/RPMS \ |
erjo@1432 | 44 $fs/usr/src/redhat/SPECS \ |
erjo@1432 | 45 $fs/usr/src/redhat/SRPMS |
erjo@1432 | 46 |
erjo@1432 | 47 cp -a $_pkg/usr/bin $fs/usr |
erjo@1432 | 48 cp -a $_pkg/bin/* $fs/usr/bin |
erjo@1432 | 49 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
erjo@1432 | 50 cp -a $_pkg/usr/lib/rpm $fs/usr/lib |
erjo@1432 | 51 } |
erjo@1432 | 52 |
erjo@1432 | 53 post_install() |
erjo@1432 | 54 { |
erjo@1432 | 55 echo "Processing post install commands..." |
erjo@1432 | 56 cmd=`readlink $root/bin/rpm` |
erjo@1432 | 57 if [ ! "$cmd" = "/usr/bin/rpm" ]; then |
erjo@1432 | 58 echo "" |
erjo@1432 | 59 echo "**** Actual RPM link : $cmd" |
erjo@1432 | 60 echo "" |
pascal@9267 | 61 echo -n "Do you want rpm for /bin/rpm (Y/n) ? : "; read -t 30 anser |
pascal@9267 | 62 if [ "$anser" != "n" ]; then |
erjo@1432 | 63 echo "" |
erjo@1432 | 64 echo -n "Removing rpm link to make a new one pointing on /usr/bin/rpm..." |
erjo@1432 | 65 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm |
erjo@1432 | 66 status |
erjo@1432 | 67 else |
erjo@1432 | 68 echo "" |
pascal@9267 | 69 echo "Leaving /bin/rpm to : $cmd" |
erjo@1432 | 70 fi |
erjo@1432 | 71 fi |
erjo@1432 | 72 |
erjo@1432 | 73 # Building rpm database. |
erjo@1432 | 74 $root/usr/bin/rpm --initdb --quiet |
erjo@1432 | 75 } |
erjo@1432 | 76 |
erjo@1432 | 77 pre_remove() |
erjo@1432 | 78 { |
erjo@1432 | 79 if [ -d /var/lib/rpm ]; then |
erjo@1432 | 80 rm -f /var/lib/rpm/* |
erjo@1432 | 81 fi |
erjo@1432 | 82 } |
erjo@1432 | 83 |
erjo@1432 | 84 post_remove() |
erjo@1432 | 85 { |
erjo@1432 | 86 echo "Processing post remove commands..." |
erjo@1432 | 87 cmd=`readlink $root/bin/rpm` |
erjo@1432 | 88 if [ ! "$cmd" = "/bin/rpm" ]; then |
erjo@1432 | 89 echo -n "Restore applets from busybox..." |
erjo@1432 | 90 ln -sf $root/bin/busybox $root/bin/rpm |
erjo@1432 | 91 ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio |
erjo@1432 | 92 status |
erjo@1432 | 93 fi |
erjo@1432 | 94 } |