clive-2.3.0.1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit perl-app
  5. DESCRIPTION="Command line tool for extracting videos from various websites"
  6. HOMEPAGE="http://clive.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/${PN}/${PV:0:3}/${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="amd64 ~ppc ~ppc64 x86"
  11. IUSE="clipboard pager password test"
  12. RDEPEND=">=dev-perl/BerkeleyDB-0.34
  13. >=dev-perl/Config-Tiny-2.12
  14. >=virtual/perl-Digest-SHA-5.47
  15. >=dev-perl/HTML-TokeParser-Simple-2.37
  16. >=dev-perl/Class-Singleton-1.4
  17. >=dev-perl/WWW-Curl-4.05
  18. >=dev-perl/XML-Simple-2.18
  19. >=dev-perl/Getopt-ArgvFile-1.11
  20. dev-perl/JSON-XS
  21. dev-perl/URI
  22. virtual/perl-Getopt-Long
  23. virtual/perl-File-Spec
  24. clipboard? ( >=dev-perl/Clipboard-0.09 )
  25. pager? ( >=dev-perl/IO-Pager-0.05 )
  26. password? ( >=dev-perl/Expect-1.21 )
  27. media-libs/quvi
  28. || ( net-misc/wget net-misc/curl )"
  29. DEPEND="test? ( dev-perl/Test-Pod ${RDEPEND} )"
  30. SRC_TEST=do
  31. mydoc="NEWS"
  32. src_install() {
  33. perl-module_src_install
  34. dodir /etc/clive
  35. cat <<-EOF > "${ED}"/etc/clive/config || die
  36. --quvi "quvi %u"
  37. --get-with "if type -P wget >/dev/null 2>&1; then wget -c -O %f %u; else curl -L -C - -o %f %u; fi"
  38. --filename-format "%t.%s"
  39. EOF
  40. }
  41. src_test() {
  42. if [ -z "${I_WANT_CLIVE_HOSTS_TESTS}" ] ; then
  43. elog "If you wish to run the full testsuite of ${PN}"
  44. elog "Please set the variable 'I_WANT_CLIVE_HOSTS_TESTS' variable"
  45. elog "Note that the tests try to download some videos from various websites"
  46. elog "and thus may randomly fail depending on the site's status."
  47. export NO_INTERNET=1
  48. fi
  49. perl-module_src_test
  50. }