plowshare-2.1.5-r1.ebuild 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit bash-completion-r1
  5. DESCRIPTION="Command-line downloader and uploader for file-sharing websites"
  6. HOMEPAGE="https://github.com/mcrapet/plowshare"
  7. LICENSE="GPL-3"
  8. SLOT="0"
  9. KEYWORDS="~amd64 ~arm ~ppc ~x86"
  10. IUSE="bash-completion +javascript view-captcha"
  11. SRC_URI="https://github.com/mcrapet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  12. RDEPEND="
  13. >=app-shells/bash-4
  14. || ( app-text/recode ( dev-lang/perl dev-perl/HTML-Parser ) )
  15. dev-vcs/git
  16. net-misc/curl
  17. sys-apps/util-linux
  18. virtual/imagemagick-tools[tiff]
  19. javascript? ( || ( dev-lang/spidermonkey:0 dev-java/rhino ) )
  20. view-captcha? ( || ( media-gfx/aview media-libs/libcaca ) )"
  21. DEPEND=""
  22. # NOTES:
  23. # javascript dep should be any javascript interpreter using /usr/bin/js
  24. src_prepare() {
  25. # Fix doc install path
  26. sed -i -e "/^DOCDIR/s|plowshare|${PF}|" Makefile || die "sed failed"
  27. if ! use bash-completion
  28. then
  29. sed -i -e \ "/^install:/s/install_bash_completion//" \
  30. Makefile || die "sed failed"
  31. fi
  32. default
  33. }
  34. src_compile() {
  35. # There is a Makefile but it's not compiling anything, let's not try.
  36. :
  37. }
  38. src_test() {
  39. # Disable tests because all of them need a working Internet connection.
  40. :
  41. }
  42. src_install() {
  43. emake DESTDIR="${D}" PREFIX="/usr" \
  44. PLOWSHARE_FORCE_VERSION="${PV}" install
  45. }
  46. pkg_postinst() {
  47. elog "plowshare is not delivered with modules by default anymore"
  48. elog "Per-user modules can be installed/updated with the plowmod command"
  49. if ! use javascript; then
  50. ewarn "Without javascript you will not be able to use modules"
  51. ewarn "requering a Javascript shell (/usr/bin/js)"
  52. fi
  53. }