diff options
Diffstat (limited to 'app-text/pastebinit')
-rw-r--r-- | app-text/pastebinit/Manifest | 2 | ||||
-rw-r--r-- | app-text/pastebinit/files/pastebinit-1.5.1-distro.patch | 13 | ||||
-rw-r--r-- | app-text/pastebinit/metadata.xml | 6 | ||||
-rw-r--r-- | app-text/pastebinit/pastebinit-1.5.1-r1.ebuild | 74 | ||||
-rw-r--r-- | app-text/pastebinit/pastebinit-1.5.ebuild | 57 |
5 files changed, 90 insertions, 62 deletions
diff --git a/app-text/pastebinit/Manifest b/app-text/pastebinit/Manifest index fc3dcc2ccb44..a70400b64a3c 100644 --- a/app-text/pastebinit/Manifest +++ b/app-text/pastebinit/Manifest @@ -1 +1 @@ -DIST pastebinit-1.5.tar.bz2 42941 BLAKE2B 678df7f2e77cc832fc9e152fb451538284033d181d9165b1a1194b254ad08ca1ac3e4612dddf7db6c62c1c3c59265ad94a78cc6df9457565264864ab06bff00b SHA512 cc4b7c46ab7932be3a1064ce7a1d91da3ebf4b132ad44b0090c8d431bfc68e945357344e59ac1239e37b3178de124930c5c8dc552b42f16c39c0452ac9ab8099 +DIST pastebinit_1.5.1.orig.tar.gz 51448 BLAKE2B a5cfa13c770e234d6e08d4f0b662c09398a5f20ac4e3f7c10ab086261923851239a3e6c1bda78ba6ba810f95cd90e6517b74aa41c5b5e3d50bca5b8c100aa594 SHA512 02b7faa54862d240eac3a8edaae2edb895cbb476cbf89dc71514a5a0a42aa2b0d26f07e5485627d1deb61f62e37018459e4d072bd4aacc886f259fced35e352c diff --git a/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch b/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch new file mode 100644 index 000000000000..ee7245c03faa --- /dev/null +++ b/app-text/pastebinit/files/pastebinit-1.5.1-distro.patch @@ -0,0 +1,13 @@ +Fix DeprecationWarning +--- a/pastebinit ++++ b/pastebinit +@@ -32,8 +32,7 @@ + # Now try to override it with a distributor pastebin + try: + import distro +- release = distro.linux_distribution( +- full_distribution_name=False)[0].lower() ++ release = distro.id() + if release == 'debian': + defaultPB = "paste.debian.net" + elif release == 'fedora': diff --git a/app-text/pastebinit/metadata.xml b/app-text/pastebinit/metadata.xml index c5629ce6ee70..946d7034d93b 100644 --- a/app-text/pastebinit/metadata.xml +++ b/app-text/pastebinit/metadata.xml @@ -1,10 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <!--maintainer-needed--> - <use> - <flag name="crypt">Install pbputs for gpg-encrypted pastes</flag> - </use> + <stabilize-allarches/> <upstream> <remote-id type="launchpad">pastebinit</remote-id> </upstream> diff --git a/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild b/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild new file mode 100644 index 000000000000..bf613cf69206 --- /dev/null +++ b/app-text/pastebinit/pastebinit-1.5.1-r1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="xml(+)" +inherit optfeature python-single-r1 + +MY_P="${PN}_${PV}" +DESCRIPTION="A software that lets you send anything you want directly to a pastebin" +HOMEPAGE="https://launchpad.net/pastebinit" +SRC_URI="mirror://ubuntu/pool/main/p/${PN}/${MY_P}.orig.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~riscv x86" +IUSE="man" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/configobj[${PYTHON_USEDEP}] + ') +" +BDEPEND=" + sys-devel/gettext + man? ( + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + ) +" + +PATCHES=( "${FILESDIR}"/${P}-distro.patch ) + +src_prepare() { + default + python_fix_shebang "${S}"/${PN} +} + +src_compile() { + emake -C po + + if use man; then + ebegin "Generating a manpage with xsltproc" + xsltproc --nonet \ + "${BROOT}"/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \ + pastebinit.xml + eend $? + fi +} + +src_install() { + dobin pastebinit utils/pbput + dosym pbput /usr/bin/pbget + dosym pbput /usr/bin/pbputs + + einstalldocs + doman utils/*.1 + use man && doman pastebinit.1 + + insinto /usr/share/locale + doins -r po/mo/* + + insinto /usr/share + doins -r pastebin.d +} + +pkg_postinst() { + optfeature "identification of your distribution" dev-python/distro + optfeature "pbput and pbputs scripts" app-arch/xz-utils + optfeature "pbget and pbputs scripts" app-crypt/gnupg +} diff --git a/app-text/pastebinit/pastebinit-1.5.ebuild b/app-text/pastebinit/pastebinit-1.5.ebuild deleted file mode 100644 index c78123910daf..000000000000 --- a/app-text/pastebinit/pastebinit-1.5.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -PYTHON_COMPAT=( python{2_7,3_5,3_6} ) -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 -} - -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 -} |