plowshare-9999.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 git-r3
  5. DESCRIPTION="Command-line downloader and uploader for file-sharing websites"
  6. HOMEPAGE="https://github.com/mcrapet/plowshare"
  7. EGIT_REPO_URI="https://github.com/mcrapet/plowshare.git"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS=""
  11. IUSE="bash-completion +javascript view-captcha"
  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. }