devscripts-2.20.4.ebuild (2126B)
1 # Copyright 1999-2021 Gentoo Authors 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=7 5 PYTHON_COMPAT=( python3_{7..9} ) 6 DISTUTILS_SINGLE_IMPL=1 7 8 inherit distutils-r1 9 10 DESCRIPTION="Scripts to make the life of a Debian Package maintainer easier" 11 HOMEPAGE="https://salsa.debian.org/debian/devscripts" 12 SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.xz" 13 14 LICENSE="GPL-2+" 15 SLOT="0" 16 KEYWORDS="~amd64 ~x86" 17 IUSE="test" 18 19 CDEPEND=" 20 dev-lang/perl:= 21 dev-perl/File-DesktopEntry 22 dev-perl/libwww-perl 23 dev-util/distro-info 24 ${PYTHON_DEPS} 25 " 26 DEPEND="${CDEPEND} 27 app-shells/bash-completion 28 virtual/pkgconfig 29 test? ( 30 dev-perl/Software-License 31 dev-perl/UNIVERSAL-require 32 dev-util/shunit2 33 $(python_gen_cond_dep ' 34 dev-python/flake8[${PYTHON_MULTI_USEDEP}] 35 ') 36 )" 37 RDEPEND="${CDEPEND} 38 app-arch/dpkg 39 app-text/wdiff 40 dev-util/debhelper 41 sys-apps/fakeroot 42 " 43 44 DISTUTILS_S="${S}"/scripts 45 46 src_prepare() { 47 default 48 49 # Replace Debian xsl stylesheets paths with Gentoo's 50 sed -i \ 51 -e 's#stylesheet/xsl/nwalsh#xsl-stylesheets#g' \ 52 "${S}"/po4a/Makefile \ 53 "${DISTUTILS_S}"/Makefile \ 54 "${DISTUTILS_S}"/deb-reversion.dbk || die 55 56 # distutils-r1 eclass will be used instead 57 sed -i -e "/python3 setup.py/d" \ 58 -e "/python3 -m flake8/d" \ 59 -e "/py3versions/d" \ 60 "${DISTUTILS_S}"/Makefile || die 61 62 # Avoid file collision with app-shells/bash-completion 63 rm "${DISTUTILS_S}"/bts.bash_completion || die 64 65 # It's not possible to use all Debian stuff in Gentoo. 66 # Remove known failing tests for now. 67 sed -i -e "s/dd-list//g" \ 68 -e "s/package_lifecycle//g" \ 69 "${S}"/test/Makefile || die 70 } 71 72 src_configure() { 73 default 74 75 pushd "${DISTUTILS_S}" > /dev/null || die 76 distutils-r1_src_configure 77 popd > /dev/null || die 78 } 79 80 src_compile() { 81 default 82 83 pushd "${DISTUTILS_S}" > /dev/null || die 84 distutils-r1_src_compile 85 popd > /dev/null || die 86 } 87 88 src_install() { 89 dodir /usr/bin 90 default 91 92 pushd "${DISTUTILS_S}" > /dev/null || die 93 distutils-r1_src_install 94 popd > /dev/null || die 95 } 96 97 src_test() { 98 default 99 100 pushd "${DISTUTILS_S}" > /dev/null || die 101 distutils-r1_src_test 102 popd > /dev/null || die 103 }