wok annotate rpm4/receipt @ rev 21014
added updated version of wireless-regdb from Alexej Bobylev
author | Hans-G?nter Theisgen |
---|---|
date | Sun Mar 10 07:33:11 2019 +0100 (2019-03-10) |
parents | 6fab3264ba87 |
children | 27198696acb7 |
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@17670 | 24 CPPFLAGS="$CPPFLAGS -I/usr/include/nspr -I/usr/include/nss" ./configure \ |
al@18741 | 25 --prefix=/usr \ |
al@18741 | 26 --infodir=/usr/share/info \ |
al@18741 | 27 --with-selinux=no \ |
al@18741 | 28 --with-lua=no \ |
al@18741 | 29 --with-dmalloc=no \ |
al@18741 | 30 --with-efence=no \ |
al@18741 | 31 --with-external-db \ |
pascal@19106 | 32 --localstatedir=/var \ |
al@18741 | 33 --mandir=/usr/share/man $CONFIGURE_ARGS && |
gokhlayeh@11574 | 34 make $MAKEFLAGS && |
slaxemulator@13006 | 35 make DESTDIR=$DESTDIR install |
erjo@1432 | 36 } |
erjo@1432 | 37 |
erjo@1432 | 38 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@1432 | 39 genpkg_rules() |
erjo@1432 | 40 { |
al@18741 | 41 mkdir -p \ |
al@18741 | 42 $fs/usr/bin \ |
erjo@1432 | 43 $fs/usr/lib \ |
erjo@1432 | 44 $fs/var/lib/rpm \ |
erjo@1432 | 45 $fs/usr/src/redhat/SOURCES \ |
erjo@1432 | 46 $fs/usr/src/redhat/BUILD \ |
erjo@1432 | 47 $fs/usr/src/redhat/RPMS \ |
erjo@1432 | 48 $fs/usr/src/redhat/SPECS \ |
erjo@1432 | 49 $fs/usr/src/redhat/SRPMS |
al@18741 | 50 |
slaxemulator@13006 | 51 cp -a $install/usr/bin $fs/usr |
slaxemulator@13006 | 52 cp -a $install/bin/* $fs/usr/bin |
slaxemulator@13006 | 53 cp -a $install/usr/lib/*.so* $fs/usr/lib |
slaxemulator@13006 | 54 cp -a $install/usr/lib/rpm $fs/usr/lib |
erjo@1432 | 55 } |
erjo@1432 | 56 |
erjo@1432 | 57 post_install() |
erjo@1432 | 58 { |
al@18741 | 59 cmd=$(readlink $root/bin/rpm) |
al@18741 | 60 if [ "$cmd" != '/usr/bin/rpm' ]; then |
al@18741 | 61 echo '' |
al@18741 | 62 echo "**** Actual RPM link : $cmd" |
al@18741 | 63 echo '' |
al@18741 | 64 echo -n 'Do you want rpm for /bin/rpm (Y/n) ? : '; read -t 30 anser |
al@18741 | 65 if [ "$anser" != 'n' ]; then |
al@18741 | 66 echo '' |
al@18741 | 67 action 'Removing rpm link to make a new one pointing on /usr/bin/rpm...' |
al@18741 | 68 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm |
al@18741 | 69 status |
al@18741 | 70 else |
al@18741 | 71 echo '' |
al@18741 | 72 echo "Leaving /bin/rpm to : $cmd" |
al@18741 | 73 fi |
al@18741 | 74 fi |
al@18741 | 75 |
al@18741 | 76 # Building rpm database. |
al@18741 | 77 $1/usr/bin/rpm --initdb --quiet |
erjo@1432 | 78 } |
erjo@1432 | 79 |
erjo@1432 | 80 pre_remove() |
erjo@1432 | 81 { |
pascal@18730 | 82 if [ -d "$1/var/lib/rpm" ]; then |
pascal@18730 | 83 rm -f "$1"/var/lib/rpm/* |
erjo@1432 | 84 fi |
erjo@1432 | 85 } |
erjo@1432 | 86 |
erjo@1432 | 87 post_remove() |
erjo@1432 | 88 { |
pascal@18730 | 89 cmd=$(readlink "$1/bin/rpm") |
al@18741 | 90 if [ "$cmd" != '/bin/rpm' ]; then |
al@18741 | 91 newline |
al@18741 | 92 action 'Restore applets from busybox...' |
pascal@18730 | 93 ln -sf /bin/busybox "$1/bin/rpm" |
pascal@18730 | 94 ln -sf /bin/busybox "$1/usr/bin/rpm2cpio" |
slaxemulator@13006 | 95 status |
slaxemulator@13006 | 96 fi |
erjo@1432 | 97 } |