wok-next view rpm4/receipt @ rev 1898
kismet: conf files kept on upgrade
author | Dominique Corbex <domcox@users.sourceforge.net> |
---|---|
date | Sat Dec 20 18:27:45 2008 +0100 (2008-12-20) |
parents | 5e22c8b65fc5 |
children | a4af2b62bb67 |
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=""
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 }
48 post_install()
49 {
50 echo "Processing post install commands..."
51 cmd=`readlink $root/bin/rpm`
52 if [ ! "$cmd" = "/usr/bin/rpm" ]; then
53 echo ""
54 echo "**** Actual RPM link : $cmd"
55 echo ""
56 echo -n "Do you want rpm for /bin/rpm (y/N) ? : "; read anser
57 if [ "$anser" == "y" ]; then
58 echo ""
59 echo -n "Removing rpm link to make a new one pointing on /usr/bin/rpm..."
60 rm $root/bin/rpm && ln -sf $root/usr/bin/rpm $root/bin/rpm
61 status
62 else
63 echo ""
64 echo "Leaving /bin/vi to : $cmd"
65 fi
66 fi
68 # Building rpm database.
69 $root/usr/bin/rpm --initdb --quiet
70 }
72 pre_remove()
73 {
74 if [ -d /var/lib/rpm ]; then
75 rm -f /var/lib/rpm/*
76 fi
77 }
79 post_remove()
80 {
81 echo "Processing post remove commands..."
82 cmd=`readlink $root/bin/rpm`
83 if [ ! "$cmd" = "/bin/rpm" ]; then
84 echo -n "Restore applets from busybox..."
85 ln -sf $root/bin/busybox $root/bin/rpm
86 ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio
87 status
88 fi
89 }