summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2009-11-20 14:36:45 +0000
committerJeroen Roovers <jer@gentoo.org>2009-11-20 14:36:45 +0000
commite4df380408ba2d7c3f925eff71e8377c653278cf (patch)
treef40d1786cb0ef0aaa8546c3e8d0580b7f4b26c68 /www-client/surfraw
parentx86 stable, bug #286423 (diff)
downloadgentoo-2-e4df380408ba2d7c3f925eff71e8377c653278cf.tar.gz
gentoo-2-e4df380408ba2d7c3f925eff71e8377c653278cf.tar.bz2
gentoo-2-e4df380408ba2d7c3f925eff71e8377c653278cf.zip
Version bump thanks to James Rowe (bug #293836).
(Portage version: 2.2_rc50/cvs/Linux i686)
Diffstat (limited to 'www-client/surfraw')
-rw-r--r--www-client/surfraw/ChangeLog8
-rw-r--r--www-client/surfraw/files/surfraw-2.2.6-gentoo_pkg_tools.patch39
-rw-r--r--www-client/surfraw/surfraw-2.2.6.ebuild94
3 files changed, 140 insertions, 1 deletions
diff --git a/www-client/surfraw/ChangeLog b/www-client/surfraw/ChangeLog
index aa34e10bb2e8..6ba23d0ded96 100644
--- a/www-client/surfraw/ChangeLog
+++ b/www-client/surfraw/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for www-client/surfraw
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/surfraw/ChangeLog,v 1.45 2009/08/12 15:01:56 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/surfraw/ChangeLog,v 1.46 2009/11/20 14:36:44 jer Exp $
+
+*surfraw-2.2.6 (20 Nov 2009)
+
+ 20 Nov 2009; Jeroen Roovers <jer@gentoo.org> +surfraw-2.2.6.ebuild,
+ +files/surfraw-2.2.6-gentoo_pkg_tools.patch:
+ Version bump thanks to James Rowe (bug #293836).
12 Aug 2009; Jeroen Roovers <jer@gentoo.org> -surfraw-2.2.4.ebuild:
Remove old.
diff --git a/www-client/surfraw/files/surfraw-2.2.6-gentoo_pkg_tools.patch b/www-client/surfraw/files/surfraw-2.2.6-gentoo_pkg_tools.patch
new file mode 100644
index 000000000000..fbd959af5422
--- /dev/null
+++ b/www-client/surfraw/files/surfraw-2.2.6-gentoo_pkg_tools.patch
@@ -0,0 +1,39 @@
+ Needs a little more thought, or some method which would allow for an upstream
+push without affecting the non-Gentoo users.
+
+diff --git i/surfraw-bash-completion.IN w/surfraw-bash-completion.IN
+index d5d1374..41a232e 100644
+--- i/surfraw-bash-completion.IN
++++ w/surfraw-bash-completion.IN
+@@ -4,6 +4,22 @@
+ # installing the bash-completion package which sets this explicitly.
+ shopt -s extglob
+
++_srpkgname()
++{
++ local pd
++ local dir=$(sed -n -e '/^PORTDIR=/ { s/^[^=]\+="\?\([^"]\+\|\S\+\).*/\1/p ; q }' \
++ /etc/make.{conf,globals})/*
++ local cur="$1"
++
++ COMPREPLY=($(compgen -W "$(
++ for pd in $dir
++ do
++ [ ! -d ${pd} ] && continue
++ builtin cd ${pd}
++ echo *
++ done)" -- ${cur})
++ )
++}
+ _surfraw()
+ { COMPREPLY=()
+ local cur=${COMP_WORDS[COMP_CWORD]}
+@@ -20,7 +36,7 @@ _surfraw()
+ then COMPREPLY=( $( compgen -W "$elvi" -- $cur ) )
+ # "sr go<tab>" for google
+ elif [[ $prev == @(alioth|deb@(bugs|contents|packages|pts|sec)|freshmeat|fsfdir|sourceforge) ]]
+- then COMPREPLY=( $(apt-cache --generate pkgnames $cur) )
++ then _srpkgname ${cur}
+ # "sr debbugs 4<tab>" to check 44bsd-rdist bugs...
+ elif [[ -x /usr/bin/look ]] # in bsdmainutils, "important"
+ then COMPREPLY=( $(/usr/bin/look ${cur:-''}) )
diff --git a/www-client/surfraw/surfraw-2.2.6.ebuild b/www-client/surfraw/surfraw-2.2.6.ebuild
new file mode 100644
index 000000000000..e66fc55ae7d5
--- /dev/null
+++ b/www-client/surfraw/surfraw-2.2.6.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-client/surfraw/surfraw-2.2.6.ebuild,v 1.1 2009/11/20 14:36:44 jer Exp $
+
+inherit bash-completion eutils
+
+DESCRIPTION="A fast unix command line interface to WWW"
+HOMEPAGE="http://surfraw.alioth.debian.org/"
+SRC_URI="http://${PN}.alioth.debian.org/dist/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE=""
+RESTRICT="test"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-gentoo_pkg_tools.patch
+ # Man page symlinks shouldn't link to compressed files
+ sed -i 's,\.gz,,g' links.IN
+}
+
+src_compile() {
+ econf \
+ --with-elvidir='$(datadir)'/surfraw \
+ --disable-opensearch \
+ || die "./configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog HACKING NEWS README TODO
+
+ dobashcompletion surfraw-bash-completion
+
+ docinto examples
+ dodoc examples/README
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/uzbl_load_url_from_surfraw
+}
+
+pkg_preinst() {
+ has_version "=${CATEGORY}/${PN}-1.0.7"
+ upgrade_from_1_0_7=$?
+}
+
+pkg_postinst() {
+ local moves f
+
+ bash-completion_pkg_postinst
+ einfo
+ einfo "You can get a list of installed elvi by just typing 'surfraw' or"
+ einfo "the abbreviated 'sr'."
+ einfo
+ einfo "You can try some searches, for example:"
+ einfo "$ sr ask why is jeeves gay? "
+ einfo "$ sr google -results=100 RMS, GNU, which is sinner, which is sin?"
+ einfo "$ sr rhyme -method=perfect Julian"
+ einfo
+ einfo "The system configuration file is /etc/surfraw.conf"
+ einfo
+ einfo "Users can specify preferences in '~/.surfraw.conf' e.g."
+ einfo "SURFRAW_graphical_browser=mozilla"
+ einfo "SURFRAW_text_browser=w3m"
+ einfo "SURFRAW_graphical=no"
+ einfo
+ einfo "surfraw works with any graphical and/or text WWW browser"
+ einfo
+ if [[ $upgrade_from_1_0_7 = 0 ]] ; then
+ ewarn "surfraw usage has changed slightly since version 1.0.7, elvi are now called"
+ ewarn "using the 'sr' wrapper script as described above. If you wish to return to"
+ ewarn "the old behaviour you can add /usr/share/surfraw to your \$PATH"
+ fi
+ # This file was always autogenerated, and is no longer needed.
+ if [ -f "${ROOT}"/etc/surfraw_elvi.list ]; then
+ rm -f "${ROOT}"/etc/surfraw_elvi.list
+ fi
+
+ # Config file location changes in v2.2.6
+ for f in /etc/surfraw.{bookmarks,conf}; do
+ if [ -f "${ROOT}"${f} ]; then
+ ewarn "${f} has moved to /etc/xdg/config/surfraw/${f##*.} in v2.2.6."
+ moves=1
+ fi
+ done
+ if [ "${moves}" == 1 ]; then
+ ewarn "You must manually move, and update, the config files listed"
+ ewarn "above for surfraw v2.2.6 and above to use them."
+ fi
+}