1 |
commit: 2d04fafa3eec7ac5d204119110681d653240cdc1 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 17 13:53:33 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 17 13:53:52 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d04fafa |
7 |
|
8 |
www-client/surfraw: Simplify dodoc call |
9 |
|
10 |
Package-Manager: Portage-2.3.76, Repoman-2.3.17 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
www-client/surfraw/surfraw-2.3.0-r2.ebuild | 92 ++++++++++++++++++++++++++++++ |
14 |
www-client/surfraw/surfraw-99999.ebuild | 4 +- |
15 |
2 files changed, 93 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/www-client/surfraw/surfraw-2.3.0-r2.ebuild b/www-client/surfraw/surfraw-2.3.0-r2.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..3e142161597 |
20 |
--- /dev/null |
21 |
+++ b/www-client/surfraw/surfraw-2.3.0-r2.ebuild |
22 |
@@ -0,0 +1,92 @@ |
23 |
+# Copyright 1999-2019 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+inherit autotools bash-completion-r1 |
28 |
+ |
29 |
+DESCRIPTION="A fast unix command line interface to WWW" |
30 |
+HOMEPAGE="https://gitlab.com/surfraw/Surfraw" |
31 |
+SRC_URI="${HOMEPAGE}/-/archive/${P}/${PN^}-${P}.tar.bz2" |
32 |
+SLOT="0" |
33 |
+LICENSE="public-domain" |
34 |
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris" |
35 |
+ |
36 |
+RDEPEND=" |
37 |
+ dev-lang/perl |
38 |
+" |
39 |
+RESTRICT="test" |
40 |
+DOCS=( |
41 |
+ AUTHORS ChangeLog HACKING NEWS README TODO |
42 |
+) |
43 |
+PATCHES=( |
44 |
+ "${FILESDIR}"/${PN}-2.3.0-completion.patch |
45 |
+) |
46 |
+S=${WORKDIR}/${PN^}-${P} |
47 |
+ |
48 |
+src_prepare() { |
49 |
+ default |
50 |
+ eautoreconf |
51 |
+} |
52 |
+ |
53 |
+src_configure() { |
54 |
+ econf --with-elvidir='$(datadir)'/surfraw |
55 |
+} |
56 |
+ |
57 |
+src_install() { |
58 |
+ default |
59 |
+ |
60 |
+ newbashcomp surfraw-bash-completion ${PN} |
61 |
+ bashcomp_alias ${PN} sr |
62 |
+ |
63 |
+ docinto examples |
64 |
+ dodoc examples/README examples/uzbl_load_url_from_surfraw |
65 |
+} |
66 |
+ |
67 |
+pkg_preinst() { |
68 |
+ has_version "=${CATEGORY}/${PN}-1.0.7" |
69 |
+ upgrade_from_1_0_7=$? |
70 |
+} |
71 |
+ |
72 |
+pkg_postinst() { |
73 |
+ local moves f |
74 |
+ |
75 |
+ einfo |
76 |
+ einfo "You can get a list of installed elvi by just typing 'surfraw' or" |
77 |
+ einfo "the abbreviated 'sr'." |
78 |
+ einfo |
79 |
+ einfo "You can try some searches, for example:" |
80 |
+ einfo "$ sr ask why is jeeves gay? " |
81 |
+ einfo "$ sr google -results=100 RMS, GNU, which is sinner, which is sin?" |
82 |
+ einfo "$ sr rhyme -method=perfect Julian" |
83 |
+ einfo |
84 |
+ einfo "The system configuration file is /etc/surfraw.conf" |
85 |
+ einfo |
86 |
+ einfo "Users can specify preferences in '~/.surfraw.conf' e.g." |
87 |
+ einfo "SURFRAW_graphical_browser=mozilla" |
88 |
+ einfo "SURFRAW_text_browser=w3m" |
89 |
+ einfo "SURFRAW_graphical=no" |
90 |
+ einfo |
91 |
+ einfo "surfraw works with any graphical and/or text WWW browser" |
92 |
+ einfo |
93 |
+ if [[ $upgrade_from_1_0_7 = 0 ]] ; then |
94 |
+ ewarn "surfraw usage has changed slightly since version 1.0.7, elvi are now called" |
95 |
+ ewarn "using the 'sr' wrapper script as described above. If you wish to return to" |
96 |
+ ewarn "the old behaviour you can add /usr/share/surfraw to your \$PATH" |
97 |
+ fi |
98 |
+ # This file was always autogenerated, and is no longer needed. |
99 |
+ if [ -f "${EROOT}"/etc/surfraw_elvi.list ]; then |
100 |
+ rm -f "${EROOT}"/etc/surfraw_elvi.list |
101 |
+ fi |
102 |
+ |
103 |
+ # Config file location changes in v2.2.6 |
104 |
+ for f in /etc/surfraw.{bookmarks,conf}; do |
105 |
+ if [ -f "${EROOT}"${f} ]; then |
106 |
+ ewarn "${f} has moved to /etc/xdg/config/surfraw/${f##*.} in v2.2.6." |
107 |
+ moves=1 |
108 |
+ fi |
109 |
+ done |
110 |
+ if [ "${moves}" == 1 ]; then |
111 |
+ ewarn "You must manually move, and update, the config files listed" |
112 |
+ ewarn "above for surfraw v2.2.6 and above to use them." |
113 |
+ fi |
114 |
+} |
115 |
|
116 |
diff --git a/www-client/surfraw/surfraw-99999.ebuild b/www-client/surfraw/surfraw-99999.ebuild |
117 |
index cf8930db468..6c4ea3c9876 100644 |
118 |
--- a/www-client/surfraw/surfraw-99999.ebuild |
119 |
+++ b/www-client/surfraw/surfraw-99999.ebuild |
120 |
@@ -41,7 +41,5 @@ src_install() { |
121 |
bashcomp_alias ${PN} sr |
122 |
|
123 |
docinto examples |
124 |
- dodoc examples/README |
125 |
- insinto /usr/share/doc/${PF}/examples |
126 |
- doins examples/uzbl_load_url_from_surfraw |
127 |
+ dodoc examples/README examples/uzbl_load_url_from_surfraw |
128 |
} |