wok annotate rpm4/receipt @ rev 24937
Up iptraf (3.0.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Apr 14 08:53:05 2022 +0000 (2022-04-14) |
parents | a35e53505947 |
children |
rev | line source |
---|---|
erjo@1432 | 1 # SliTaz package receipt. |
erjo@1432 | 2 |
erjo@1432 | 3 PACKAGE="rpm4" |
Hans-G?nter@23617 | 4 VERSION="4.15.1" |
erjo@1432 | 5 CATEGORY="system-tools" |
Hans-G?nter@23617 | 6 TAGS="package-manager" |
Hans-G?nter@23617 | 7 SHORT_DESC="RPM Package Manager." |
erjo@1432 | 8 MAINTAINER="erjo@slitaz.org" |
pascal@15002 | 9 LICENSE="GPL2" |
pascal@23634 | 10 WEB_SITE="https://rpm.org/" |
Hans-G?nter@23617 | 11 |
erjo@1432 | 12 SOURCE="rpm" |
pascal@7441 | 13 TARBALL="$SOURCE-$VERSION.tar.bz2" |
Hans-G?nter@23617 | 14 WGET_URL="http://ftp.rpm.org/releases/rpm-${VERSION%.*}.x/$TARBALL" |
erjo@1432 | 15 |
Hans-G?nter@23617 | 16 DEPENDS="beecrypt bzlib db expat gcc-lib-base libcomerr3 libkrb5 |
Hans-G?nter@23617 | 17 libmagic liblzma neon nspr nss popt sqlite zlib" |
Hans-G?nter@23617 | 18 BUILD_DEPENDS="beecrypt-dev db-dev gettext libarchive-dev liblzma |
Hans-G?nter@23617 | 19 liblzma-dev libmagic-dev nspr-dev nss-dev popt-dev python-dev |
Hans-G?nter@23617 | 20 zlib-dev" |
pascal@15002 | 21 |
pascal@24459 | 22 # What is the latest version available today? |
pascal@24459 | 23 current_version() |
pascal@24459 | 24 { |
pascal@24459 | 25 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24459 | 26 sed '/released/!d;s|.*RPM ||;s| rel.*||;q' |
pascal@24459 | 27 } |
pascal@24459 | 28 |
erjo@1432 | 29 # Rules to configure and make the package. |
erjo@1432 | 30 compile_rules() |
erjo@1432 | 31 { |
Hans-G?nter@23617 | 32 CPPFLAGS="$CPPFLAGS -I/usr/include/nspr -I/usr/include/nss" \ |
Hans-G?nter@23617 | 33 ./configure \ |
Hans-G?nter@23617 | 34 --prefix=/usr \ |
Hans-G?nter@23617 | 35 --infodir=/usr/share/info \ |
Hans-G?nter@23617 | 36 --with-selinux=no \ |
Hans-G?nter@23617 | 37 --with-lua=no \ |
Hans-G?nter@23617 | 38 --with-dmalloc=no \ |
Hans-G?nter@23617 | 39 --with-efence=no \ |
Hans-G?nter@23617 | 40 --with-external-db \ |
Hans-G?nter@23617 | 41 --localstatedir=/var \ |
Hans-G?nter@23617 | 42 --mandir=/usr/share/man \ |
Hans-G?nter@23617 | 43 $CONFIGURE_ARGS && |
gokhlayeh@11574 | 44 make $MAKEFLAGS && |
slaxemulator@13006 | 45 make DESTDIR=$DESTDIR install |
erjo@1432 | 46 } |
erjo@1432 | 47 |
erjo@1432 | 48 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@1432 | 49 genpkg_rules() |
erjo@1432 | 50 { |
al@18741 | 51 mkdir -p \ |
erjo@1432 | 52 $fs/usr/lib \ |
erjo@1432 | 53 $fs/var/lib/rpm \ |
erjo@1432 | 54 $fs/usr/src/redhat/SOURCES \ |
erjo@1432 | 55 $fs/usr/src/redhat/BUILD \ |
erjo@1432 | 56 $fs/usr/src/redhat/RPMS \ |
erjo@1432 | 57 $fs/usr/src/redhat/SPECS \ |
erjo@1432 | 58 $fs/usr/src/redhat/SRPMS |
al@18741 | 59 |
Hans-G?nter@23617 | 60 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@23618 | 61 # cp -a $install/bin/* $fs/usr/bin |
Hans-G?nter@23617 | 62 cp -a $install/usr/lib/*.so* $fs/usr/lib |
Hans-G?nter@23617 | 63 cp -a $install/usr/lib/rpm $fs/usr/lib |
erjo@1432 | 64 } |
erjo@1432 | 65 |
erjo@1432 | 66 post_install() |
erjo@1432 | 67 { |
al@18741 | 68 cmd=$(readlink $root/bin/rpm) |
Hans-G?nter@23617 | 69 if [ "$cmd" != '/usr/bin/rpm' ] |
Hans-G?nter@23617 | 70 then |
al@18741 | 71 echo '' |
al@18741 | 72 echo "**** Actual RPM link : $cmd" |
al@18741 | 73 echo '' |
Hans-G?nter@23617 | 74 echo -n 'Do you want rpm for /bin/rpm (Y/n) ? : ' |
Hans-G?nter@23617 | 75 read -t 30 anser |
Hans-G?nter@23617 | 76 if [ "$anser" != 'n' ] |
Hans-G?nter@23617 | 77 then |
al@18741 | 78 echo '' |
al@18741 | 79 action 'Removing rpm link to make a new one pointing on /usr/bin/rpm...' |
Hans-G?nter@23617 | 80 rm $root/bin/rpm && |
Hans-G?nter@23617 | 81 ln -sf $root/usr/bin/rpm $root/bin/rpm |
al@18741 | 82 status |
al@18741 | 83 else |
al@18741 | 84 echo '' |
al@18741 | 85 echo "Leaving /bin/rpm to : $cmd" |
al@18741 | 86 fi |
al@18741 | 87 fi |
al@18741 | 88 |
al@18741 | 89 # Building rpm database. |
al@18741 | 90 $1/usr/bin/rpm --initdb --quiet |
erjo@1432 | 91 } |
erjo@1432 | 92 |
erjo@1432 | 93 pre_remove() |
erjo@1432 | 94 { |
Hans-G?nter@23617 | 95 if [ -d "$1/var/lib/rpm" ] |
Hans-G?nter@23617 | 96 then |
pascal@18730 | 97 rm -f "$1"/var/lib/rpm/* |
erjo@1432 | 98 fi |
erjo@1432 | 99 } |
erjo@1432 | 100 |
erjo@1432 | 101 post_remove() |
erjo@1432 | 102 { |
pascal@18730 | 103 cmd=$(readlink "$1/bin/rpm") |
Hans-G?nter@23617 | 104 if [ "$cmd" != '/bin/rpm' ] |
Hans-G?nter@23617 | 105 then |
al@18741 | 106 newline |
al@18741 | 107 action 'Restore applets from busybox...' |
pascal@18730 | 108 ln -sf /bin/busybox "$1/bin/rpm" |
pascal@18730 | 109 ln -sf /bin/busybox "$1/usr/bin/rpm2cpio" |
slaxemulator@13006 | 110 status |
slaxemulator@13006 | 111 fi |
erjo@1432 | 112 } |