debhelper-9.20150101.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Collection of programs that can be used to automate common tasks in debian/rules"
  6. HOMEPAGE="http://packages.qa.debian.org/d/debhelper.html http://joeyh.name/code/debhelper/"
  7. SRC_URI="mirror://debian/pool/main/d/${PN}/${P/-/_}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux"
  11. IUSE="test"
  12. DH_LINGUAS=( de es fr )
  13. IUSE+=" ${DH_LINGUAS[@]/#/linguas_}"
  14. NLS_DEPEND=$(
  15. printf "linguas_%s? ( >=app-text/po4a-0.24 )\n" ${DH_LINGUAS[@]}
  16. )
  17. RDEPEND="
  18. >=dev-lang/perl-5.10:=
  19. >=app-arch/dpkg-1.17
  20. dev-perl/TimeDate
  21. virtual/perl-Getopt-Long
  22. "
  23. DEPEND="${RDEPEND}
  24. ${NLS_DEPEND}
  25. test? ( dev-perl/Test-Pod )
  26. "
  27. S=${WORKDIR}/${PN}
  28. src_compile() {
  29. tc-export CC
  30. local LANGS="" USE_NLS=no lingua
  31. for lingua in ${DH_LINGUAS[@]}; do
  32. if use linguas_${lingua}; then
  33. LANGS+=" ${lingua}"
  34. USE_NLS=yes
  35. fi
  36. done
  37. emake USE_NLS="${USE_NLS}" LANGS="${LANGS}" build
  38. }
  39. src_install() {
  40. emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
  41. dodoc doc/* debian/changelog
  42. docinto examples
  43. dodoc examples/*
  44. local lingua
  45. for manfile in *.1 *.7 ; do
  46. for lingua in ${DH_LINGUAS[@]}; do
  47. case ${manfile} in
  48. *.${lingua}.?)
  49. use linguas_${lingua} \
  50. && cp ${manfile} "${T}"/${manfile/.${lingua}/} \
  51. && doman -i18n=${lingua} "${T}"/${manfile/.${lingua}/}
  52. ;;
  53. *)
  54. doman ${manfile}
  55. ;;
  56. esac
  57. done
  58. done
  59. }