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