wok-current view rpm4/receipt @ rev 25667
Up kernel to 5.10.210 and aufs5
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sat Mar 02 17:27:56 2024 +0000 (8 months ago) |
parents | a35e53505947 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="rpm4"
4 VERSION="4.15.1"
5 CATEGORY="system-tools"
6 TAGS="package-manager"
7 SHORT_DESC="RPM Package Manager."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://rpm.org/"
12 SOURCE="rpm"
13 TARBALL="$SOURCE-$VERSION.tar.bz2"
14 WGET_URL="http://ftp.rpm.org/releases/rpm-${VERSION%.*}.x/$TARBALL"
16 DEPENDS="beecrypt bzlib db expat gcc-lib-base libcomerr3 libkrb5
17 libmagic liblzma neon nspr nss popt sqlite zlib"
18 BUILD_DEPENDS="beecrypt-dev db-dev gettext libarchive-dev liblzma
19 liblzma-dev libmagic-dev nspr-dev nss-dev popt-dev python-dev
20 zlib-dev"
22 # What is the latest version available today?
23 current_version()
24 {
25 wget -O - $WEB_SITE 2>/dev/null | \
26 sed '/released/!d;s|.*RPM ||;s| rel.*||;q'
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 CPPFLAGS="$CPPFLAGS -I/usr/include/nspr -I/usr/include/nss" \
33 ./configure \
34 --prefix=/usr \
35 --infodir=/usr/share/info \
36 --with-selinux=no \
37 --with-lua=no \
38 --with-dmalloc=no \
39 --with-efence=no \
40 --with-external-db \
41 --localstatedir=/var \
42 --mandir=/usr/share/man \
43 $CONFIGURE_ARGS &&
44 make $MAKEFLAGS &&
45 make DESTDIR=$DESTDIR install
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 mkdir -p \
52 $fs/usr/lib \
53 $fs/var/lib/rpm \
54 $fs/usr/src/redhat/SOURCES \
55 $fs/usr/src/redhat/BUILD \
56 $fs/usr/src/redhat/RPMS \
57 $fs/usr/src/redhat/SPECS \
58 $fs/usr/src/redhat/SRPMS
60 cp -a $install/usr/bin $fs/usr
61 # cp -a $install/bin/* $fs/usr/bin
62 cp -a $install/usr/lib/*.so* $fs/usr/lib
63 cp -a $install/usr/lib/rpm $fs/usr/lib
64 }
66 post_install()
67 {
68 cmd=$(readlink $root/bin/rpm)
69 if [ "$cmd" != '/usr/bin/rpm' ]
70 then
71 echo ''
72 echo "**** Actual RPM link : $cmd"
73 echo ''
74 echo -n 'Do you want rpm for /bin/rpm (Y/n) ? : '
75 read -t 30 anser
76 if [ "$anser" != 'n' ]
77 then
78 echo ''
79 action 'Removing rpm link to make a new one pointing on /usr/bin/rpm...'
80 rm $root/bin/rpm &&
81 ln -sf $root/usr/bin/rpm $root/bin/rpm
82 status
83 else
84 echo ''
85 echo "Leaving /bin/rpm to : $cmd"
86 fi
87 fi
89 # Building rpm database.
90 $1/usr/bin/rpm --initdb --quiet
91 }
93 pre_remove()
94 {
95 if [ -d "$1/var/lib/rpm" ]
96 then
97 rm -f "$1"/var/lib/rpm/*
98 fi
99 }
101 post_remove()
102 {
103 cmd=$(readlink "$1/bin/rpm")
104 if [ "$cmd" != '/bin/rpm' ]
105 then
106 newline
107 action 'Restore applets from busybox...'
108 ln -sf /bin/busybox "$1/bin/rpm"
109 ln -sf /bin/busybox "$1/usr/bin/rpm2cpio"
110 status
111 fi
112 }