wok-stable view rpm4/receipt @ rev 2955
Fix: nicotine+ (category)
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Fri May 08 14:21:20 2009 +0000 (2009-05-08) |
parents | b38a3f04facb |
children | 9f963a3c2aa3 |
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"
9 BUILD_DEPENDS="beecrypt beecrypt-dev popt-dev gettext"
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"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 ./configure --prefix=/usr \
20 --infodir=/usr/share/info \
21 --with-selinux=no \
22 --with-lua=no \
23 --with-dmalloc=no \
24 --with-efence=no \
25 --mandir=/usr/share/man $CONFIGURE_ARGS &&
26 make &&
27 make DESTDIR=$PWD/_pkg install
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr/bin \
34 $fs/usr/lib \
35 $fs/var/lib/rpm \
36 $fs/usr/src/redhat/SOURCES \
37 $fs/usr/src/redhat/BUILD \
38 $fs/usr/src/redhat/RPMS \
39 $fs/usr/src/redhat/SPECS \
40 $fs/usr/src/redhat/SRPMS
42 cp -a $_pkg/usr/bin $fs/usr
43 cp -a $_pkg/bin/* $fs/usr/bin
44 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
45 cp -a $_pkg/usr/lib/rpm $fs/usr/lib
46 rm $fs/usr/lib/libpopt.so.0*
47 }
49 post_install()
50 {
51 echo "Processing post install commands..."
52 cmd=`readlink $root/bin/rpm`
53 if [ ! "$cmd" = "/usr/bin/rpm" ]; then
54 echo ""
55 echo "**** Actual RPM link : $cmd"
56 echo ""
57 echo -n "Do you want rpm for /bin/rpm (y/N) ? : "; read anser
58 if [ "$anser" == "y" ]; then
59 echo ""
60 echo -n "Removing rpm link to make a new one pointing on /usr/bin/rpm..."
61 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm
62 status
63 else
64 echo ""
65 echo "Leaving /bin/vi to : $cmd"
66 fi
67 fi
69 # Building rpm database.
70 $root/usr/bin/rpm --initdb --quiet
71 }
73 pre_remove()
74 {
75 if [ -d /var/lib/rpm ]; then
76 rm -f /var/lib/rpm/*
77 fi
78 }
80 post_remove()
81 {
82 echo "Processing post remove commands..."
83 cmd=`readlink $root/bin/rpm`
84 if [ ! "$cmd" = "/bin/rpm" ]; then
85 echo -n "Restore applets from busybox..."
86 ln -sf $root/bin/busybox $root/bin/rpm
87 ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio
88 status
89 fi
90 }