wok-4.x view rpm4/receipt @ rev 7172

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