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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Wed Mar 12 10:09:22 2014 UTC (5 years, 11 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
Stable for sparc, wrt bug #502942

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

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

  ViewVC Help
Powered by ViewVC 1.1.20