wok annotate rpm4/receipt @ rev 23770
created recipes for xorg-libXfont2 and xorg-libXfont2-dev
author | Hans-G?nter Theisgen |
---|---|
date | Fri May 15 07:18:58 2020 +0100 (2020-05-15) |
parents | 615a666d7811 |
children | 2f230197370e |
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 |
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 \ |
erjo@1432 | 45 $fs/usr/lib \ |
erjo@1432 | 46 $fs/var/lib/rpm \ |
erjo@1432 | 47 $fs/usr/src/redhat/SOURCES \ |
erjo@1432 | 48 $fs/usr/src/redhat/BUILD \ |
erjo@1432 | 49 $fs/usr/src/redhat/RPMS \ |
erjo@1432 | 50 $fs/usr/src/redhat/SPECS \ |
erjo@1432 | 51 $fs/usr/src/redhat/SRPMS |
al@18741 | 52 |
Hans-G?nter@23617 | 53 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@23618 | 54 # cp -a $install/bin/* $fs/usr/bin |
Hans-G?nter@23617 | 55 cp -a $install/usr/lib/*.so* $fs/usr/lib |
Hans-G?nter@23617 | 56 cp -a $install/usr/lib/rpm $fs/usr/lib |
erjo@1432 | 57 } |
erjo@1432 | 58 |
erjo@1432 | 59 post_install() |
erjo@1432 | 60 { |
al@18741 | 61 cmd=$(readlink $root/bin/rpm) |
Hans-G?nter@23617 | 62 if [ "$cmd" != '/usr/bin/rpm' ] |
Hans-G?nter@23617 | 63 then |
al@18741 | 64 echo '' |
al@18741 | 65 echo "**** Actual RPM link : $cmd" |
al@18741 | 66 echo '' |
Hans-G?nter@23617 | 67 echo -n 'Do you want rpm for /bin/rpm (Y/n) ? : ' |
Hans-G?nter@23617 | 68 read -t 30 anser |
Hans-G?nter@23617 | 69 if [ "$anser" != 'n' ] |
Hans-G?nter@23617 | 70 then |
al@18741 | 71 echo '' |
al@18741 | 72 action 'Removing rpm link to make a new one pointing on /usr/bin/rpm...' |
Hans-G?nter@23617 | 73 rm $root/bin/rpm && |
Hans-G?nter@23617 | 74 ln -sf $root/usr/bin/rpm $root/bin/rpm |
al@18741 | 75 status |
al@18741 | 76 else |
al@18741 | 77 echo '' |
al@18741 | 78 echo "Leaving /bin/rpm to : $cmd" |
al@18741 | 79 fi |
al@18741 | 80 fi |
al@18741 | 81 |
al@18741 | 82 # Building rpm database. |
al@18741 | 83 $1/usr/bin/rpm --initdb --quiet |
erjo@1432 | 84 } |
erjo@1432 | 85 |
erjo@1432 | 86 pre_remove() |
erjo@1432 | 87 { |
Hans-G?nter@23617 | 88 if [ -d "$1/var/lib/rpm" ] |
Hans-G?nter@23617 | 89 then |
pascal@18730 | 90 rm -f "$1"/var/lib/rpm/* |
erjo@1432 | 91 fi |
erjo@1432 | 92 } |
erjo@1432 | 93 |
erjo@1432 | 94 post_remove() |
erjo@1432 | 95 { |
pascal@18730 | 96 cmd=$(readlink "$1/bin/rpm") |
Hans-G?nter@23617 | 97 if [ "$cmd" != '/bin/rpm' ] |
Hans-G?nter@23617 | 98 then |
al@18741 | 99 newline |
al@18741 | 100 action 'Restore applets from busybox...' |
pascal@18730 | 101 ln -sf /bin/busybox "$1/bin/rpm" |
pascal@18730 | 102 ln -sf /bin/busybox "$1/usr/bin/rpm2cpio" |
slaxemulator@13006 | 103 status |
slaxemulator@13006 | 104 fi |
erjo@1432 | 105 } |