dev-libs/tomsfastmath: keyworded 0.13.1 for ia64, bug #725414
[gentoo.git] / dev-perl / PortageXS / PortageXS-0.02.10-r4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit perl-module eutils prefix
7
8 DESCRIPTION="Portage abstraction layer for perl"
9 HOMEPAGE="http://download.mpsna.de/opensource/PortageXS/"
10 SRC_URI="http://download.mpsna.de/opensource/PortageXS/${P}.tar.gz"
11
12 SLOT="0"
13 LICENSE="GPL-2"
14 KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
15 IUSE="minimal"
16 SRC_TEST="do"
17
18 DEPEND="virtual/perl-Term-ANSIColor
19         dev-perl/Shell-EnvImporter
20         !minimal? ( dev-perl/IO-Socket-SSL
21                     virtual/perl-Sys-Syslog )"
22
23 src_prepare() {
24         epatch "${FILESDIR}"/${PN}-0.02.10-portage_path_fix.patch
25         epatch "${FILESDIR}"/${PN}-0.02.10-prefix.patch
26
27         eprefixify \
28                 lib/PortageXS/Core.pm \
29                 lib/PortageXS.pm \
30                 usr/bin/portagexs_client \
31                 usr/sbin/portagexsd
32
33         if use minimal ; then
34                 rm -r "${S}"/usr || die
35                 rm -r "${S}"/etc/init.d || die
36                 rm -r "${S}"/etc/pxs/certs || die
37                 rm "${S}"/etc/pxs/portagexsd.conf || die
38                 rm -r "${S}"/lib/PortageXS/examples || die
39         fi
40 }
41
42 pkg_preinst() {
43         if use !minimal ; then
44                 cp -r "${S}"/usr "${D}${EPREFIX}" || die
45         fi
46         cp -r "${S}"/etc "${D}${EPREFIX}" || die
47 }
48
49 pkg_postinst() {
50         if [ -d "${EPREFIX}"/etc/portagexs ]; then
51                 elog "${EPREFIX}/etc/portagexs has been moved to ${EPREFIX}/etc/pxs for convenience.  It is safe"
52                 elog "to delete old ${EPREFIX}/etc/portagexs directories."
53         fi
54 }