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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Fri Feb 15 11:38:31 2013 UTC (18 months, 2 weeks ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
Cleanup older.

(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 8EEE3BE8)

1 # Copyright 1999-2013 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.10.0.ebuild,v 1.10 2013/01/07 03:02:00 floppym Exp $
4
5 EAPI=4
6
7 PYTHON_DEPEND="2"
8
9 inherit eutils autotools flag-o-matic perl-module python versionator
10
11 DESCRIPTION="Red Hat Package Management Utils"
12 HOMEPAGE="http://www.rpm.org"
13 SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).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 selinux"
20
21 RDEPEND="!app-arch/rpm5
22 >=sys-libs/db-4.5
23 >=sys-libs/zlib-1.2.3-r1
24 >=app-arch/bzip2-1.0.1
25 >=dev-libs/popt-1.7
26 >=app-crypt/gnupg-1.2
27 dev-libs/elfutils
28 virtual/libintl
29 >=dev-lang/perl-5.8.8
30 dev-libs/nss
31 python? ( >=dev-lang/python-2.3 )
32 nls? ( virtual/libintl )
33 lua? ( >=dev-lang/lua-5.1.0[deprecated] )
34 acl? ( virtual/acl )
35 caps? ( >=sys-libs/libcap-2.0 )
36 selinux? ( sec-policy/selinux-rpm )"
37
38 DEPEND="${RDEPEND}
39 nls? ( sys-devel/gettext )
40 doc? ( app-doc/doxygen )"
41
42 pkg_setup() {
43 python_set_active_version 2
44 python_pkg_setup
45 }
46
47 src_prepare() {
48 epatch \
49 "${FILESDIR}"/${PN}-4.8.1-autotools.patch \
50 "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
51 "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
52
53 # fix #356769
54 sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
55
56 eautoreconf
57
58 # Prevent automake maintainer mode from kicking in (#450448).
59 touch -r Makefile.am preinstall.am
60 }
61
62 src_configure() {
63 econf \
64 --without-selinux \
65 --with-external-db \
66 $(use_enable python) \
67 $(use_with doc hackingdocs) \
68 $(use_enable nls) \
69 $(use_with lua) \
70 $(use_with caps cap) \
71 $(use_with acl)
72 }
73
74 src_compile() {
75 default
76 }
77
78 src_install() {
79 default
80
81 # remove la files
82 find "${ED}" -name '*.la' -exec rm -f {} +
83
84 mv "${ED}"/bin/rpm "${ED}"/usr/bin
85 rmdir "${ED}"/bin
86 # fix symlinks to /bin/rpm (#349840)
87 for binary in rpmquery rpmverify;do
88 ln -sf rpm "${ED}"/usr/bin/${binary}
89 done
90
91 use nls || rm -rf "${ED}"/usr/share/man/??
92
93 keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
94
95 dodoc CHANGES CREDITS GROUPS README*
96 if use doc; then
97 pushd doc/hacking/html
98 dohtml -p hacking -r .
99 popd
100 pushd doc/librpm/html
101 dohtml -p librpm -r .
102 popd
103 fi
104
105 # Fix perllocal.pod file collision
106 fixlocalpod
107 }
108
109 pkg_postinst() {
110 if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
111 einfo "RPM database found... Rebuilding database (may take a while)..."
112 "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
113 else
114 einfo "No RPM database found... Creating database..."
115 "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
116 fi
117
118 use python && python_mod_optimize rpm
119 }
120
121 pkg_postrm() {
122 use python && python_mod_cleanup rpm
123 }

  ViewVC Help
Powered by ViewVC 1.1.20