summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Konotopov <ykonotopov@gmail.com>2016-05-14 16:31:22 +0300
committerIan Delaney <idella4@gentoo.org>2016-05-20 00:25:30 +0800
commitc1f93d8bdad012c60c186bf8ec65bbbb7ce7e4b6 (patch)
treedcc4f1a55906666d235ad7ec688f3734fb6b1bb8 /dev-util/distro-info/distro-info-0.14.ebuild
parentdev-util/distro-info-data: initial ebuild version - 0.29 (diff)
downloadgentoo-c1f93d8bdad012c60c186bf8ec65bbbb7ce7e4b6.tar.gz
gentoo-c1f93d8bdad012c60c186bf8ec65bbbb7ce7e4b6.tar.bz2
gentoo-c1f93d8bdad012c60c186bf8ec65bbbb7ce7e4b6.zip
dev-util/distro-info: initial ebuild version - 0.14
Package will be maintained by Yuri Konotopov <ykonotopov@gmail.com> via Proxy Maintainers Project. Closes: https://github.com/gentoo/gentoo/pull/1465 Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'dev-util/distro-info/distro-info-0.14.ebuild')
-rw-r--r--dev-util/distro-info/distro-info-0.14.ebuild94
1 files changed, 94 insertions, 0 deletions
diff --git a/dev-util/distro-info/distro-info-0.14.ebuild b/dev-util/distro-info/distro-info-0.14.ebuild
new file mode 100644
index 00000000000..9c5e67ca75d
--- /dev/null
+++ b/dev-util/distro-info/distro-info-0.14.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+DISTUTILS_OPTIONAL=true
+
+inherit distutils-r1
+
+DESCRIPTION="Provides information about the Debian distributions' releases"
+HOMEPAGE="https://debian.org"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="python test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="dev-lang/perl:=
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${CDEPEND}
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
+ test? (
+ dev-util/shunit2
+ dev-python/pylint[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${CDEPEND}
+ dev-util/distro-info-data"
+
+src_prepare() {
+ default
+
+ # 1. Gentoo do not provides dpkg vendor information
+ # 2. Strip *FLAGS
+ # 3. Strip predefined CFLAGS
+ # 4. Point to correct perl's vendorlib
+ # 5. Remove python tests - python eclass will be used instead
+ sed -e "/cd python && python/d" \
+ -e "/VENDOR/d" \
+ -e "/dpkg-buildflags/d" \
+ -e "s/-g -O2//g" \
+ -e "s:\$(PREFIX)/share/perl5/Debian:\$(PERL_VENDORLIB)/Debian:g" \
+ -e "/pyversions/d" \
+ -i "${S}"/Makefile || die
+}
+
+src_configure() {
+ default
+
+ if use python; then
+ pushd ./python > /dev/null || die
+ distutils-r1_src_configure
+ popd > /dev/null || die
+ fi
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ pushd ./python > /dev/null || die
+ distutils-r1_src_compile
+ popd > /dev/null || die
+ fi
+}
+
+src_install() {
+ emake PERL_VENDORLIB=$(perl -e 'require Config; print "$Config::Config{'vendorlib'}\n";') \
+ DESTDIR="${D}" install
+
+ if use python; then
+ pushd ./python > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+ fi
+}
+
+src_test() {
+ TZ=UTC default
+
+ if use python; then
+ python_test() {
+ esetup.py test
+ }
+
+ pushd ./python > /dev/null || die
+ distutils-r1_src_test
+ popd > /dev/null || die
+ fi
+}