wok-6.x view rpm4/receipt @ rev 23835
Up axel (2.17.8), bluez (5.54), cpio (2.13), dnsmasq (2.81), libssh (0.9.4), unbound (1.10.1)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 01 09:34:18 2020 +0000 (2020-06-01) |
parents | 615a666d7811 |
children | 2f230197370e |
line source
1 # SliTaz package receipt.
3 PACKAGE="rpm4"
4 VERSION="4.15.1"
5 CATEGORY="system-tools"
6 TAGS="package-manager"
7 SHORT_DESC="RPM Package Manager."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://rpm.org/"
12 SOURCE="rpm"
13 TARBALL="$SOURCE-$VERSION.tar.bz2"
14 WGET_URL="http://ftp.rpm.org/releases/rpm-${VERSION%.*}.x/$TARBALL"
16 DEPENDS="beecrypt bzlib db expat gcc-lib-base libcomerr3 libkrb5
17 libmagic liblzma neon nspr nss popt sqlite zlib"
18 BUILD_DEPENDS="beecrypt-dev db-dev gettext libarchive-dev liblzma
19 liblzma-dev libmagic-dev nspr-dev nss-dev popt-dev python-dev
20 zlib-dev"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 CPPFLAGS="$CPPFLAGS -I/usr/include/nspr -I/usr/include/nss" \
26 ./configure \
27 --prefix=/usr \
28 --infodir=/usr/share/info \
29 --with-selinux=no \
30 --with-lua=no \
31 --with-dmalloc=no \
32 --with-efence=no \
33 --with-external-db \
34 --localstatedir=/var \
35 --mandir=/usr/share/man \
36 $CONFIGURE_ARGS &&
37 make $MAKEFLAGS &&
38 make DESTDIR=$DESTDIR install
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 mkdir -p \
45 $fs/usr/lib \
46 $fs/var/lib/rpm \
47 $fs/usr/src/redhat/SOURCES \
48 $fs/usr/src/redhat/BUILD \
49 $fs/usr/src/redhat/RPMS \
50 $fs/usr/src/redhat/SPECS \
51 $fs/usr/src/redhat/SRPMS
53 cp -a $install/usr/bin $fs/usr
54 # cp -a $install/bin/* $fs/usr/bin
55 cp -a $install/usr/lib/*.so* $fs/usr/lib
56 cp -a $install/usr/lib/rpm $fs/usr/lib
57 }
59 post_install()
60 {
61 cmd=$(readlink $root/bin/rpm)
62 if [ "$cmd" != '/usr/bin/rpm' ]
63 then
64 echo ''
65 echo "**** Actual RPM link : $cmd"
66 echo ''
67 echo -n 'Do you want rpm for /bin/rpm (Y/n) ? : '
68 read -t 30 anser
69 if [ "$anser" != 'n' ]
70 then
71 echo ''
72 action 'Removing rpm link to make a new one pointing on /usr/bin/rpm...'
73 rm $root/bin/rpm &&
74 ln -sf $root/usr/bin/rpm $root/bin/rpm
75 status
76 else
77 echo ''
78 echo "Leaving /bin/rpm to : $cmd"
79 fi
80 fi
82 # Building rpm database.
83 $1/usr/bin/rpm --initdb --quiet
84 }
86 pre_remove()
87 {
88 if [ -d "$1/var/lib/rpm" ]
89 then
90 rm -f "$1"/var/lib/rpm/*
91 fi
92 }
94 post_remove()
95 {
96 cmd=$(readlink "$1/bin/rpm")
97 if [ "$cmd" != '/bin/rpm' ]
98 then
99 newline
100 action 'Restore applets from busybox...'
101 ln -sf /bin/busybox "$1/bin/rpm"
102 ln -sf /bin/busybox "$1/usr/bin/rpm2cpio"
103 status
104 fi
105 }