/[gentoo-x86]/app-arch/rpm/rpm-4.9.1.2.ebuild
Gentoo

Contents of /app-arch/rpm/rpm-4.9.1.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Thu Jul 26 08:02:34 2012 UTC (2 years, 4 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
Remove rpm5 and overshadowed versions.

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.9.1.2.ebuild,v 1.11 2012/05/06 16:54:41 armin76 Exp $
4
5 EAPI=4
6
7 PYTHON_DEPEND="2"
8
9 inherit eutils autotools flag-o-matic perl-module python
10
11 DESCRIPTION="Red Hat Package Management Utils"
12 HOMEPAGE="http://www.rpm.org"
13 SRC_URI="http://rpm.org/releases/rpm-4.9.x/${P}.tar.bz2"
14
15 LICENSE="GPL-2 LGPL-2"
16 SLOT="0"
17 KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86"
18
19 IUSE="nls python doc caps lua acl"
20
21 RDEPEND=">=sys-libs/db-4.5
22 >=sys-libs/zlib-1.2.3-r1
23 >=app-arch/bzip2-1.0.1
24 >=dev-libs/popt-1.7
25 >=app-crypt/gnupg-1.2
26 dev-libs/elfutils
27 virtual/libintl
28 >=dev-lang/perl-5.8.8
29 dev-libs/nss
30 python? ( >=dev-lang/python-2.3 )
31 nls? ( virtual/libintl )
32 lua? ( >=dev-lang/lua-5.1.0[deprecated] )
33 acl? ( virtual/acl )
34 caps? ( >=sys-libs/libcap-2.0 )"
35
36 DEPEND="${RDEPEND}
37 nls? ( sys-devel/gettext )
38 doc? ( app-doc/doxygen )"
39
40 pkg_setup() {
41 python_set_active_version 2
42 python_pkg_setup
43 }
44
45 src_prepare() {
46 epatch "${FILESDIR}"/${PN}-4.8.1-autotools.patch
47 epatch "${FILESDIR}"/${PN}-4.8.1-db-path.patch
48
49 # fix #356769
50 sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
51
52 eautoreconf
53 }
54
55 src_compile() {
56 default
57 }
58
59 src_configure() {
60 econf \
61 --without-selinux \
62 --with-external-db \
63 $(use_enable python) \
64 $(use_with doc hackingdocs) \
65 $(use_enable nls) \
66 $(use_with lua) \
67 $(use_with caps cap) \
68 $(use_with acl)
69 }
70
71 src_install() {
72 default
73
74 mv "${ED}"/bin/rpm "${ED}"/usr/bin
75 rmdir "${ED}"/bin
76 # fix symlinks to /bin/rpm (#349840)
77 for binary in rpmquery rpmverify;do
78 ln -sf rpm "${ED}"/usr/bin/${binary}
79 done
80
81 use nls || rm -rf "${ED}"/usr/share/man/??
82
83 keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
84
85 dodoc CHANGES CREDITS GROUPS README*
86 if use doc; then
87 pushd doc/hacking/html
88 dohtml -p hacking -r .
89 popd
90 pushd doc/librpm/html
91 dohtml -p librpm -r .
92 popd
93 fi
94
95 # Fix perllocal.pod file collision
96 fixlocalpod
97 }
98
99 pkg_postinst() {
100 if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
101 einfo "RPM database found... Rebuilding database (may take a while)..."
102 "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
103 else
104 einfo "No RPM database found... Creating database..."
105 "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
106 fi
107
108 use python && python_mod_optimize rpm
109 }
110
111 pkg_postrm() {
112 use python && python_mod_cleanup rpm
113 }

  ViewVC Help
Powered by ViewVC 1.1.20