/[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.4 - (hide annotations) (download)
Sun Jul 29 22:52:42 2012 UTC (2 years, 4 months ago) by jer
Branch: MAIN
Changes since 1.3: +2 -2 lines
Stable for HPPA (bug #428148).

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

1 scarabeus 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 jer 1.4 # $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.10.0.ebuild,v 1.3 2012/07/26 12:24:56 johu Exp $
4 scarabeus 1.1
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 jer 1.4 KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86"
18 scarabeus 1.1
19     IUSE="nls python doc caps lua acl"
20    
21 scarabeus 1.2 RDEPEND="!app-arch/rpm5
22     >=sys-libs/db-4.5
23 scarabeus 1.1 >=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    
37     DEPEND="${RDEPEND}
38     nls? ( sys-devel/gettext )
39     doc? ( app-doc/doxygen )"
40    
41     pkg_setup() {
42     python_set_active_version 2
43     python_pkg_setup
44     }
45    
46     src_prepare() {
47     epatch \
48     "${FILESDIR}"/${PN}-4.8.1-autotools.patch \
49     "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
50     "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
51    
52     # fix #356769
53     sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
54    
55     eautoreconf
56     }
57    
58     src_configure() {
59     econf \
60     --without-selinux \
61     --with-external-db \
62     $(use_enable python) \
63     $(use_with doc hackingdocs) \
64     $(use_enable nls) \
65     $(use_with lua) \
66     $(use_with caps cap) \
67     $(use_with acl)
68     }
69    
70     src_compile() {
71     default
72     }
73    
74     src_install() {
75     default
76    
77     # remove la files
78     find "${ED}" -name '*.la' -exec rm -f {} +
79    
80     mv "${ED}"/bin/rpm "${ED}"/usr/bin
81     rmdir "${ED}"/bin
82     # fix symlinks to /bin/rpm (#349840)
83     for binary in rpmquery rpmverify;do
84     ln -sf rpm "${ED}"/usr/bin/${binary}
85     done
86    
87     use nls || rm -rf "${ED}"/usr/share/man/??
88    
89     keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
90    
91     dodoc CHANGES CREDITS GROUPS README*
92     if use doc; then
93     pushd doc/hacking/html
94     dohtml -p hacking -r .
95     popd
96     pushd doc/librpm/html
97     dohtml -p librpm -r .
98     popd
99     fi
100    
101     # Fix perllocal.pod file collision
102     fixlocalpod
103     }
104    
105     pkg_postinst() {
106     if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
107     einfo "RPM database found... Rebuilding database (may take a while)..."
108     "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
109     else
110     einfo "No RPM database found... Creating database..."
111     "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
112     fi
113    
114     use python && python_mod_optimize rpm
115     }
116    
117     pkg_postrm() {
118     use python && python_mod_cleanup rpm
119     }

  ViewVC Help
Powered by ViewVC 1.1.20