wok annotate rpm4/receipt @ rev 5006

[q-r]*: update depends
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 28 17:05:24 2010 +0100 (2010-02-28)
parents 8be66f03fbd2
children c161b9c835d2
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@5006 8 DEPENDS="popt beecrypt bzlib expat sqlite zlib gcc-lib-base neon libkrb5 \
pascal@5006 9 libcomerr3"
pascal@4670 10 BUILD_DEPENDS="beecrypt beecrypt-dev popt-dev gettext zlib-dev python-dev"
erjo@1432 11 SOURCE="rpm"
erjo@1432 12 TARBALL="$SOURCE-$VERSION.tar.gz"
erjo@1432 13 WEB_SITE="http://www.rpm.org/"
erjo@1432 14 WGET_URL="http://www.rpm.org/releases/rpm-4.4.x/$TARBALL"
jozee@4972 15 TAGS="package-manager"
erjo@1432 16
erjo@1432 17 # Rules to configure and make the package.
erjo@1432 18 compile_rules()
erjo@1432 19 {
erjo@1432 20 cd $src
erjo@1432 21 ./configure --prefix=/usr \
erjo@1432 22 --infodir=/usr/share/info \
erjo@1432 23 --with-selinux=no \
erjo@1432 24 --with-lua=no \
erjo@1432 25 --with-dmalloc=no \
erjo@1432 26 --with-efence=no \
pascal@2433 27 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@2433 28 make &&
erjo@1432 29 make DESTDIR=$PWD/_pkg install
erjo@1432 30 }
erjo@1432 31
erjo@1432 32 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@1432 33 genpkg_rules()
erjo@1432 34 {
erjo@1432 35 mkdir -p $fs/usr/bin \
erjo@1432 36 $fs/usr/lib \
erjo@1432 37 $fs/var/lib/rpm \
erjo@1432 38 $fs/usr/src/redhat/SOURCES \
erjo@1432 39 $fs/usr/src/redhat/BUILD \
erjo@1432 40 $fs/usr/src/redhat/RPMS \
erjo@1432 41 $fs/usr/src/redhat/SPECS \
erjo@1432 42 $fs/usr/src/redhat/SRPMS
erjo@1432 43
erjo@1432 44 cp -a $_pkg/usr/bin $fs/usr
erjo@1432 45 cp -a $_pkg/bin/* $fs/usr/bin
erjo@1432 46 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
erjo@1432 47 cp -a $_pkg/usr/lib/rpm $fs/usr/lib
pascal@2433 48 rm $fs/usr/lib/libpopt.so.0*
erjo@1432 49 }
erjo@1432 50
erjo@1432 51 post_install()
erjo@1432 52 {
erjo@1432 53 echo "Processing post install commands..."
erjo@1432 54 cmd=`readlink $root/bin/rpm`
erjo@1432 55 if [ ! "$cmd" = "/usr/bin/rpm" ]; then
erjo@1432 56 echo ""
erjo@1432 57 echo "**** Actual RPM link : $cmd"
erjo@1432 58 echo ""
erjo@1432 59 echo -n "Do you want rpm for /bin/rpm (y/N) ? : "; read anser
erjo@1432 60 if [ "$anser" == "y" ]; then
erjo@1432 61 echo ""
erjo@1432 62 echo -n "Removing rpm link to make a new one pointing on /usr/bin/rpm..."
erjo@1432 63 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm
erjo@1432 64 status
erjo@1432 65 else
erjo@1432 66 echo ""
erjo@1432 67 echo "Leaving /bin/vi to : $cmd"
erjo@1432 68 fi
erjo@1432 69 fi
erjo@1432 70
erjo@1432 71 # Building rpm database.
erjo@1432 72 $root/usr/bin/rpm --initdb --quiet
erjo@1432 73 }
erjo@1432 74
erjo@1432 75 pre_remove()
erjo@1432 76 {
erjo@1432 77 if [ -d /var/lib/rpm ]; then
erjo@1432 78 rm -f /var/lib/rpm/*
erjo@1432 79 fi
erjo@1432 80 }
erjo@1432 81
erjo@1432 82 post_remove()
erjo@1432 83 {
erjo@1432 84 echo "Processing post remove commands..."
erjo@1432 85 cmd=`readlink $root/bin/rpm`
erjo@1432 86 if [ ! "$cmd" = "/bin/rpm" ]; then
erjo@1432 87 echo -n "Restore applets from busybox..."
erjo@1432 88 ln -sf $root/bin/busybox $root/bin/rpm
erjo@1432 89 ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio
erjo@1432 90 status
erjo@1432 91 fi
erjo@1432 92 }