wok view rpm4/receipt @ rev 20715
tor 0.3.5.7
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Thu Feb 07 09:37:17 2019 +0000 (2019-02-07) |
parents | 6fab3264ba87 |
children | 27198696acb7 |
line source
1 # SliTaz package receipt.
3 PACKAGE="rpm4"
4 VERSION="4.10.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="RPM Package Manager"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2"
9 SOURCE="rpm"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.rpm.org/"
12 WGET_URL="http://www.rpm.org/releases/rpm-${VERSION:0:4}.x/$TARBALL"
13 TAGS="package-manager"
15 DEPENDS="popt beecrypt bzlib expat sqlite zlib gcc-lib-base neon libkrb5 \
16 libcomerr3 nss nspr db liblzma libmagic"
17 BUILD_DEPENDS="beecrypt beecrypt-dev popt-dev gettext zlib-dev python-dev \
18 nss-dev nspr-dev db-dev liblzma liblzma-dev libmagic-dev"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 cd $src
24 CPPFLAGS="$CPPFLAGS -I/usr/include/nspr -I/usr/include/nss" ./configure \
25 --prefix=/usr \
26 --infodir=/usr/share/info \
27 --with-selinux=no \
28 --with-lua=no \
29 --with-dmalloc=no \
30 --with-efence=no \
31 --with-external-db \
32 --localstatedir=/var \
33 --mandir=/usr/share/man $CONFIGURE_ARGS &&
34 make $MAKEFLAGS &&
35 make DESTDIR=$DESTDIR install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p \
42 $fs/usr/bin \
43 $fs/usr/lib \
44 $fs/var/lib/rpm \
45 $fs/usr/src/redhat/SOURCES \
46 $fs/usr/src/redhat/BUILD \
47 $fs/usr/src/redhat/RPMS \
48 $fs/usr/src/redhat/SPECS \
49 $fs/usr/src/redhat/SRPMS
51 cp -a $install/usr/bin $fs/usr
52 cp -a $install/bin/* $fs/usr/bin
53 cp -a $install/usr/lib/*.so* $fs/usr/lib
54 cp -a $install/usr/lib/rpm $fs/usr/lib
55 }
57 post_install()
58 {
59 cmd=$(readlink $root/bin/rpm)
60 if [ "$cmd" != '/usr/bin/rpm' ]; then
61 echo ''
62 echo "**** Actual RPM link : $cmd"
63 echo ''
64 echo -n 'Do you want rpm for /bin/rpm (Y/n) ? : '; read -t 30 anser
65 if [ "$anser" != 'n' ]; then
66 echo ''
67 action 'Removing rpm link to make a new one pointing on /usr/bin/rpm...'
68 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm
69 status
70 else
71 echo ''
72 echo "Leaving /bin/rpm to : $cmd"
73 fi
74 fi
76 # Building rpm database.
77 $1/usr/bin/rpm --initdb --quiet
78 }
80 pre_remove()
81 {
82 if [ -d "$1/var/lib/rpm" ]; then
83 rm -f "$1"/var/lib/rpm/*
84 fi
85 }
87 post_remove()
88 {
89 cmd=$(readlink "$1/bin/rpm")
90 if [ "$cmd" != '/bin/rpm' ]; then
91 newline
92 action 'Restore applets from busybox...'
93 ln -sf /bin/busybox "$1/bin/rpm"
94 ln -sf /bin/busybox "$1/usr/bin/rpm2cpio"
95 status
96 fi
97 }