wok-6.x annotate rpm4/receipt @ rev 23617

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