pastebinit-1.5.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python{2_7,3_4} )
  5. PYTHON_REQ_USE="xml"
  6. inherit python-single-r1
  7. DESCRIPTION="A software that lets you send anything you want directly to a pastebin"
  8. HOMEPAGE="https://launchpad.net/pastebinit"
  9. SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.bz2"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="amd64 x86"
  13. IUSE="crypt"
  14. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  15. RDEPEND="${PYTHON_DEPS}
  16. dev-python/configobj[${PYTHON_USEDEP}]
  17. crypt? ( app-crypt/gnupg )"
  18. DEPEND="app-text/docbook-xsl-stylesheets"
  19. src_prepare() {
  20. local mo=""
  21. for lang in ${LINGUAS}; do
  22. if [ -f po/${lang}.po ]; then
  23. mo="${mo} ${lang}.mo"
  24. fi
  25. done
  26. sed -i -e "/^build-mo/s/:.*/:${mo}/" po/Makefile || die
  27. sed -i -e "/#!/s/python3/python/" pastebinit || die
  28. }
  29. src_compile() {
  30. emake -C po
  31. xsltproc --nonet \
  32. "${EROOT}"usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \
  33. pastebinit.xml || die
  34. }
  35. src_install() {
  36. dobin pastebinit utils/pbput
  37. python_fix_shebang "${ED}usr/bin/${PN}"
  38. dosym pbput /usr/bin/pbget
  39. use crypt && dosym pbput /usr/bin/pbputs
  40. dodoc README
  41. doman pastebinit.1 utils/*.1
  42. insinto /usr/share/locale
  43. [[ -d po/mo ]] && doins -r po/mo/*
  44. insinto /usr/share
  45. doins -r pastebin.d
  46. }