wok-6.x annotate rpm4/receipt @ rev 1742
Add balance
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 22 20:13:58 2008 +0000 (2008-11-22) |
parents | 5e22c8b65fc5 |
children | a4af2b62bb67 |
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" |
erjo@1432 | 8 DEPENDS="" |
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 \ |
erjo@1432 | 25 --mandir=/usr/share/man $CONFIGURE_ARGS |
erjo@1432 | 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 |
erjo@1432 | 46 } |
erjo@1432 | 47 |
erjo@1432 | 48 post_install() |
erjo@1432 | 49 { |
erjo@1432 | 50 echo "Processing post install commands..." |
erjo@1432 | 51 cmd=`readlink $root/bin/rpm` |
erjo@1432 | 52 if [ ! "$cmd" = "/usr/bin/rpm" ]; then |
erjo@1432 | 53 echo "" |
erjo@1432 | 54 echo "**** Actual RPM link : $cmd" |
erjo@1432 | 55 echo "" |
erjo@1432 | 56 echo -n "Do you want rpm for /bin/rpm (y/N) ? : "; read anser |
erjo@1432 | 57 if [ "$anser" == "y" ]; then |
erjo@1432 | 58 echo "" |
erjo@1432 | 59 echo -n "Removing rpm link to make a new one pointing on /usr/bin/rpm..." |
erjo@1432 | 60 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm |
erjo@1432 | 61 status |
erjo@1432 | 62 else |
erjo@1432 | 63 echo "" |
erjo@1432 | 64 echo "Leaving /bin/vi to : $cmd" |
erjo@1432 | 65 fi |
erjo@1432 | 66 fi |
erjo@1432 | 67 |
erjo@1432 | 68 # Building rpm database. |
erjo@1432 | 69 $root/usr/bin/rpm --initdb --quiet |
erjo@1432 | 70 } |
erjo@1432 | 71 |
erjo@1432 | 72 pre_remove() |
erjo@1432 | 73 { |
erjo@1432 | 74 if [ -d /var/lib/rpm ]; then |
erjo@1432 | 75 rm -f /var/lib/rpm/* |
erjo@1432 | 76 fi |
erjo@1432 | 77 } |
erjo@1432 | 78 |
erjo@1432 | 79 post_remove() |
erjo@1432 | 80 { |
erjo@1432 | 81 echo "Processing post remove commands..." |
erjo@1432 | 82 cmd=`readlink $root/bin/rpm` |
erjo@1432 | 83 if [ ! "$cmd" = "/bin/rpm" ]; then |
erjo@1432 | 84 echo -n "Restore applets from busybox..." |
erjo@1432 | 85 ln -sf $root/bin/busybox $root/bin/rpm |
erjo@1432 | 86 ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio |
erjo@1432 | 87 status |
erjo@1432 | 88 fi |
erjo@1432 | 89 } |