1 |
|
# Copyright 1999-2014 Gentoo Foundation
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
|
# $Header: /var/cvsroot/gentoo-x86/app-text/wgetpaste/wgetpaste-2.25-r3.ebuild,v 1.9 2014/11/02 09:09:38 ago Exp $
|
4 |
3 |
|
5 |
|
EAPI="5"
|
|
4 |
EAPI=8
|
6 |
5 |
|
7 |
|
inherit eutils
|
|
6 |
inherit optfeature
|
8 |
7 |
|
9 |
8 |
DESCRIPTION="Command-line interface to various pastebins"
|
10 |
|
HOMEPAGE="http://wgetpaste.zlin.dk/"
|
11 |
|
SRC_URI="http://wgetpaste.zlin.dk/${P}.tar.bz2"
|
|
9 |
HOMEPAGE="https://github.com/zlin/wgetpaste"
|
|
10 |
SRC_URI="https://github.com/zlin/wgetpaste/releases/download/${PV}/${P}.tar.xz"
|
12 |
11 |
|
13 |
|
LICENSE="public-domain"
|
|
12 |
LICENSE="MIT"
|
14 |
13 |
SLOT="0"
|
15 |
|
KEYWORDS="alpha amd64 ~arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
|
16 |
|
IUSE=""
|
|
14 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
|
|
15 |
IUSE="+ssl"
|
17 |
16 |
|
18 |
|
DEPEND=""
|
19 |
|
RDEPEND="net-misc/wget
|
20 |
|
app-i18n/enca
|
21 |
|
"
|
|
17 |
PROPERTIES="test_network"
|
|
18 |
RESTRICT="test"
|
|
19 |
|
|
20 |
RDEPEND="net-misc/wget[ssl?]"
|
|
21 |
|
|
22 |
PATCHES=(
|
|
23 |
"${FILESDIR}"/${PN}-2.33-tests.patch
|
|
24 |
"${FILESDIR}"/${PN}-2.33-disable-sprunge.patch
|
|
25 |
)
|
22 |
26 |
|
23 |
27 |
src_prepare() {
|
|
28 |
default
|
|
29 |
|
24 |
30 |
sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die
|
25 |
|
epatch "${FILESDIR}"/calculate_wgetpaste-25.patch
|
|
31 |
}
|
|
32 |
|
|
33 |
src_test() {
|
|
34 |
test/test.sh || die
|
26 |
35 |
}
|
27 |
36 |
|
28 |
37 |
src_install() {
|
29 |
38 |
dobin ${PN}
|
30 |
|
insinto /etc/wgetpaste.d
|
31 |
|
newins "${FILESDIR}"/wgetpaste-config-services services.conf
|
32 |
39 |
insinto /usr/share/zsh/site-functions
|
33 |
40 |
doins _wgetpaste
|
34 |
41 |
}
|
|
42 |
|
|
43 |
pkg_postinst() {
|
|
44 |
optfeature "ANSI (color code) stripping support" app-text/ansifilter
|
|
45 |
optfeature "xclip support" x11-misc/xclip
|
|
46 |
|
|
47 |
if [[ -n ${REPLACING_VERSIONS} ]]; then
|
|
48 |
local old
|
|
49 |
|
|
50 |
for old in ${REPLACING_VERSIONS}; do
|
|
51 |
if ver_test ${old} -lt '2.33-r2'; then
|
|
52 |
ewarn
|
|
53 |
ewarn "Sprunge is dead and the service has been dropped from the code. Remove or"
|
|
54 |
ewarn "replace sprunge as the default service in the system or user wgetpaste"
|
|
55 |
ewarn "config if applicable."
|
|
56 |
ewarn
|
|
57 |
break
|
|
58 |
fi
|
|
59 |
done
|
|
60 |
fi
|
|
61 |
}
|