wok view rpm4/receipt @ rev 18748
marble: remove unwanted files
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Dec 26 16:00:02 2015 +0200 (2015-12-26) |
parents | 9e01bc6321ea |
children | e96b9982c405 |
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 --mandir=/usr/share/man $CONFIGURE_ARGS &&
33 make $MAKEFLAGS &&
34 make DESTDIR=$DESTDIR install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p \
41 $fs/usr/bin \
42 $fs/usr/lib \
43 $fs/var/lib/rpm \
44 $fs/usr/src/redhat/SOURCES \
45 $fs/usr/src/redhat/BUILD \
46 $fs/usr/src/redhat/RPMS \
47 $fs/usr/src/redhat/SPECS \
48 $fs/usr/src/redhat/SRPMS
50 cp -a $install/usr/bin $fs/usr
51 cp -a $install/bin/* $fs/usr/bin
52 cp -a $install/usr/lib/*.so* $fs/usr/lib
53 cp -a $install/usr/lib/rpm $fs/usr/lib
54 }
56 post_install()
57 {
58 cmd=$(readlink $root/bin/rpm)
59 if [ "$cmd" != '/usr/bin/rpm' ]; then
60 echo ''
61 echo "**** Actual RPM link : $cmd"
62 echo ''
63 echo -n 'Do you want rpm for /bin/rpm (Y/n) ? : '; read -t 30 anser
64 if [ "$anser" != 'n' ]; then
65 echo ''
66 action 'Removing rpm link to make a new one pointing on /usr/bin/rpm...'
67 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm
68 status
69 else
70 echo ''
71 echo "Leaving /bin/rpm to : $cmd"
72 fi
73 fi
75 # Building rpm database.
76 $1/usr/bin/rpm --initdb --quiet
77 }
79 pre_remove()
80 {
81 if [ -d "$1/var/lib/rpm" ]; then
82 rm -f "$1"/var/lib/rpm/*
83 fi
84 }
86 post_remove()
87 {
88 cmd=$(readlink "$1/bin/rpm")
89 if [ "$cmd" != '/bin/rpm' ]; then
90 newline
91 action 'Restore applets from busybox...'
92 ln -sf /bin/busybox "$1/bin/rpm"
93 ln -sf /bin/busybox "$1/usr/bin/rpm2cpio"
94 status
95 fi
96 }