wok-6.x view rpm4/receipt @ rev 13236

Move from undigest: nimrod
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 14 13:39:10 2012 +0200 (2012-08-14)
parents 8e4c74abdf74
children 7896f0694ef6
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 DEPENDS="popt beecrypt bzlib expat sqlite zlib gcc-lib-base neon libkrb5 \
9 libcomerr3 nss nspr db liblzma libmagic"
10 BUILD_DEPENDS="beecrypt beecrypt-dev popt-dev gettext zlib-dev python-dev \
11 nss-dev nspr-dev db-dev liblzma liblzma-dev libmagic-dev"
12 SOURCE="rpm"
13 TARBALL="$SOURCE-$VERSION.tar.bz2"
14 WEB_SITE="http://www.rpm.org/"
15 WGET_URL="http://www.rpm.org/releases/rpm-${VERSION:0:4}.x/$TARBALL"
16 TAGS="package-manager"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss" ./configure \
23 --prefix=/usr \
24 --infodir=/usr/share/info \
25 --with-selinux=no \
26 --with-lua=no \
27 --with-dmalloc=no \
28 --with-efence=no \
29 --with-external-db \
30 --mandir=/usr/share/man $CONFIGURE_ARGS &&
31 make $MAKEFLAGS &&
32 make DESTDIR=$DESTDIR install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr/bin \
39 $fs/usr/lib \
40 $fs/var/lib/rpm \
41 $fs/usr/src/redhat/SOURCES \
42 $fs/usr/src/redhat/BUILD \
43 $fs/usr/src/redhat/RPMS \
44 $fs/usr/src/redhat/SPECS \
45 $fs/usr/src/redhat/SRPMS
47 cp -a $install/usr/bin $fs/usr
48 cp -a $install/bin/* $fs/usr/bin
49 cp -a $install/usr/lib/*.so* $fs/usr/lib
50 cp -a $install/usr/lib/rpm $fs/usr/lib
51 }
53 post_install()
54 {
55 echo "Processing post install commands..."
56 cmd=`readlink $root/bin/rpm`
57 if [ ! "$cmd" = "/usr/bin/rpm" ]; then
58 echo ""
59 echo "**** Actual RPM link : $cmd"
60 echo ""
61 echo -n "Do you want rpm for /bin/rpm (Y/n) ? : "; read -t 30 anser
62 if [ "$anser" != "n" ]; then
63 echo ""
64 echo -n "Removing rpm link to make a new one pointing on /usr/bin/rpm..."
65 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm
66 status
67 else
68 echo ""
69 echo "Leaving /bin/rpm to : $cmd"
70 fi
71 fi
73 # Building rpm database.
74 $root/usr/bin/rpm --initdb --quiet
75 }
77 pre_remove()
78 {
79 if [ -d $1/var/lib/rpm ]; then
80 rm -f $1/var/lib/rpm/*
81 fi
82 }
84 post_remove()
85 {
86 echo "Processing post remove commands..."
87 cmd=`readlink $root/bin/rpm`
88 if [ ! "$cmd" = "/bin/rpm" ]; then
89 echo -n "Restore applets from busybox..."
90 ln -sf $root/bin/busybox $root/bin/rpm
91 ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio
92 status
93 fi
94 }