/[gentoo-x86]/www-client/surfraw/surfraw-2.2.9-r1.ebuild
Gentoo

Contents of /www-client/surfraw/surfraw-2.2.9-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Feb 27 11:05:41 2015 UTC (4 years, 7 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
Stable for sparc, wrt bug #535692

(Portage version: 2.2.14/cvs/Linux x86_64, RepoMan options: --include-arches="sparc", signed Manifest commit with key 7194459F)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/surfraw/surfraw-2.2.9-r1.ebuild,v 1.5 2015/01/28 10:27:17 ago Exp $
4
5 EAPI=5
6
7 inherit bash-completion-r1 eutils
8
9 DESCRIPTION="A fast unix command line interface to WWW"
10 HOMEPAGE="http://surfraw.alioth.debian.org/"
11 SRC_URI="http://${PN}.alioth.debian.org/dist/${P}.tar.gz"
12
13 SLOT="0"
14 LICENSE="public-domain"
15 KEYWORDS="amd64 hppa ppc sparc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
16 RESTRICT="test"
17 RDEPEND="dev-lang/perl"
18
19 DOCS=(AUTHORS ChangeLog HACKING NEWS README TODO)
20
21 src_prepare() {
22 epatch \
23 "${FILESDIR}"/${PN}-2.2.6-gentoo_pkg_tools.patch \
24 "${FILESDIR}"/${PN}-2.2.9-completion.patch
25 }
26
27 src_configure() {
28 econf --with-elvidir='$(datadir)'/surfraw
29 }
30
31 src_install() {
32 default
33
34 newbashcomp surfraw-bash-completion ${PN}
35 bashcomp_alias ${PN} sr
36
37 docinto examples
38 dodoc examples/README
39 insinto /usr/share/doc/${PF}/examples
40 doins examples/uzbl_load_url_from_surfraw
41 }
42
43 pkg_preinst() {
44 has_version "=${CATEGORY}/${PN}-1.0.7"
45 upgrade_from_1_0_7=$?
46 }
47
48 pkg_postinst() {
49 local moves f
50
51 einfo
52 einfo "You can get a list of installed elvi by just typing 'surfraw' or"
53 einfo "the abbreviated 'sr'."
54 einfo
55 einfo "You can try some searches, for example:"
56 einfo "$ sr ask why is jeeves gay? "
57 einfo "$ sr google -results=100 RMS, GNU, which is sinner, which is sin?"
58 einfo "$ sr rhyme -method=perfect Julian"
59 einfo
60 einfo "The system configuration file is /etc/surfraw.conf"
61 einfo
62 einfo "Users can specify preferences in '~/.surfraw.conf' e.g."
63 einfo "SURFRAW_graphical_browser=mozilla"
64 einfo "SURFRAW_text_browser=w3m"
65 einfo "SURFRAW_graphical=no"
66 einfo
67 einfo "surfraw works with any graphical and/or text WWW browser"
68 einfo
69 if [[ $upgrade_from_1_0_7 = 0 ]] ; then
70 ewarn "surfraw usage has changed slightly since version 1.0.7, elvi are now called"
71 ewarn "using the 'sr' wrapper script as described above. If you wish to return to"
72 ewarn "the old behaviour you can add /usr/share/surfraw to your \$PATH"
73 fi
74 # This file was always autogenerated, and is no longer needed.
75 if [ -f "${EROOT}"/etc/surfraw_elvi.list ]; then
76 rm -f "${EROOT}"/etc/surfraw_elvi.list
77 fi
78
79 # Config file location changes in v2.2.6
80 for f in /etc/surfraw.{bookmarks,conf}; do
81 if [ -f "${EROOT}"${f} ]; then
82 ewarn "${f} has moved to /etc/xdg/config/surfraw/${f##*.} in v2.2.6."
83 moves=1
84 fi
85 done
86 if [ "${moves}" == 1 ]; then
87 ewarn "You must manually move, and update, the config files listed"
88 ewarn "above for surfraw v2.2.6 and above to use them."
89 fi
90 }

  ViewVC Help
Powered by ViewVC 1.1.20