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

[a-b]*: update depends
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 28 12:41:24 2010 +0100 (2010-02-28)
parents 9f963a3c2aa3
children 1707e54fb4cf
line source
1 # SliTaz package receipt.
3 PACKAGE="rpm4"
4 VERSION="4.4.2.3"
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"
9 BUILD_DEPENDS="beecrypt beecrypt-dev popt-dev gettext zlib-dev python-dev"
10 SOURCE="rpm"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WEB_SITE="http://www.rpm.org/"
13 WGET_URL="http://www.rpm.org/releases/rpm-4.4.x/$TARBALL"
14 TAGS="package-manager"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure --prefix=/usr \
21 --infodir=/usr/share/info \
22 --with-selinux=no \
23 --with-lua=no \
24 --with-dmalloc=no \
25 --with-efence=no \
26 --mandir=/usr/share/man $CONFIGURE_ARGS &&
27 make &&
28 make DESTDIR=$PWD/_pkg install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/bin \
35 $fs/usr/lib \
36 $fs/var/lib/rpm \
37 $fs/usr/src/redhat/SOURCES \
38 $fs/usr/src/redhat/BUILD \
39 $fs/usr/src/redhat/RPMS \
40 $fs/usr/src/redhat/SPECS \
41 $fs/usr/src/redhat/SRPMS
43 cp -a $_pkg/usr/bin $fs/usr
44 cp -a $_pkg/bin/* $fs/usr/bin
45 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
46 cp -a $_pkg/usr/lib/rpm $fs/usr/lib
47 rm $fs/usr/lib/libpopt.so.0*
48 }
50 post_install()
51 {
52 echo "Processing post install commands..."
53 cmd=`readlink $root/bin/rpm`
54 if [ ! "$cmd" = "/usr/bin/rpm" ]; then
55 echo ""
56 echo "**** Actual RPM link : $cmd"
57 echo ""
58 echo -n "Do you want rpm for /bin/rpm (y/N) ? : "; read anser
59 if [ "$anser" == "y" ]; then
60 echo ""
61 echo -n "Removing rpm link to make a new one pointing on /usr/bin/rpm..."
62 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm
63 status
64 else
65 echo ""
66 echo "Leaving /bin/vi to : $cmd"
67 fi
68 fi
70 # Building rpm database.
71 $root/usr/bin/rpm --initdb --quiet
72 }
74 pre_remove()
75 {
76 if [ -d /var/lib/rpm ]; then
77 rm -f /var/lib/rpm/*
78 fi
79 }
81 post_remove()
82 {
83 echo "Processing post remove commands..."
84 cmd=`readlink $root/bin/rpm`
85 if [ ! "$cmd" = "/bin/rpm" ]; then
86 echo -n "Restore applets from busybox..."
87 ln -sf $root/bin/busybox $root/bin/rpm
88 ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio
89 status
90 fi
91 }