xmlformat-1.04.ebuild 971 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. USE_RUBY="ruby20 ruby21 ruby22 ruby23"
  5. inherit ruby-single
  6. DESCRIPTION="Reformat XML documents to your custom style"
  7. SRC_URI="http://www.kitebird.com/software/${PN}/${P}.tar.gz"
  8. HOMEPAGE="http://www.kitebird.com/software/xmlformat/"
  9. SLOT="0"
  10. LICENSE="xmlformat"
  11. KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
  12. DEPEND="ruby? ( ${RUBY_DEPS} )
  13. !ruby? ( dev-lang/perl )"
  14. RDEPEND=${DEPEND}
  15. IUSE="ruby doc"
  16. src_install() {
  17. dobin xmlformat.pl
  18. if use ruby
  19. then
  20. dobin xmlformat.rb
  21. dosym xmlformat.rb /usr/bin/xmlformat
  22. else
  23. dosym xmlformat.pl /usr/bin/xmlformat
  24. fi
  25. dodoc BUGS ChangeLog README TODO
  26. if use doc
  27. then
  28. # APIs
  29. insinto /usr/share/doc/${PF}
  30. doins -r docs/*
  31. fi
  32. }
  33. src_test() {
  34. if use ruby
  35. then
  36. ./runtest all || die "runtest for ruby failed."
  37. else
  38. ./runtest -p all || die "runtest for perl failed."
  39. fi
  40. }