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