summaryrefslogtreecommitdiff
path: root/app-text/pastebinit/pastebinit-1.5.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-09-08 11:22:11 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-09-08 11:22:11 +0100
commit193881c47e7ee26db87b145e06d7a1ee908402ed (patch)
tree89cd49fbe2f95c355e2fc4bae3ec72fa6695d9f4 /app-text/pastebinit/pastebinit-1.5.ebuild
parentc95d0a6be52d97ad9c2de1a00a079dd95b1b4e12 (diff)
import pastebinit from gentoo, but patch it to use debian pastebin by default
Diffstat (limited to 'app-text/pastebinit/pastebinit-1.5.ebuild')
-rw-r--r--app-text/pastebinit/pastebinit-1.5.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/app-text/pastebinit/pastebinit-1.5.ebuild b/app-text/pastebinit/pastebinit-1.5.ebuild
new file mode 100644
index 00000000..0e0db7ca
--- /dev/null
+++ b/app-text/pastebinit/pastebinit-1.5.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE="xml"
+
+inherit python-single-r1
+
+DESCRIPTION="A software that lets you send anything you want directly to a pastebin"
+HOMEPAGE="https://launchpad.net/pastebinit"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="crypt"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/configobj[${PYTHON_USEDEP}]
+ crypt? ( app-crypt/gnupg )"
+DEPEND="app-text/docbook-xsl-stylesheets"
+
+src_prepare() {
+ local mo=""
+
+ for lang in ${LINGUAS}; do
+ if [ -f po/${lang}.po ]; then
+ mo="${mo} ${lang}.mo"
+ fi
+ done
+
+ sed -i -e "/^build-mo/s/:.*/:${mo}/" po/Makefile || die
+ sed -i -e "/#!/s/python3/python/" pastebinit || die
+ # set default pastebin service to debian
+ epatch ${FILESDIR}/defaultPB_debian_pastebin.patch
+}
+
+src_compile() {
+ emake -C po
+ xsltproc --nonet \
+ "${EROOT}"usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \
+ pastebinit.xml || die
+}
+
+src_install() {
+ dobin pastebinit utils/pbput
+ python_fix_shebang "${ED}usr/bin/${PN}"
+ dosym pbput /usr/bin/pbget
+ use crypt && dosym pbput /usr/bin/pbputs
+ dodoc README
+ doman pastebinit.1 utils/*.1
+ insinto /usr/share/locale
+ [[ -d po/mo ]] && doins -r po/mo/*
+ insinto /usr/share
+ doins -r pastebin.d
+}