1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools bash-completion-r1
7 DESCRIPTION="A fast unix command line interface to WWW"
8 HOMEPAGE="https://gitlab.com/surfraw/Surfraw"
9 SRC_URI="https://gitlab.com/surfraw/Surfraw/-/archive/${P}/${PN^}-${P}.tar.bz2"
11 LICENSE="public-domain"
12 KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
19 AUTHORS ChangeLog HACKING NEWS README TODO
22 "${FILESDIR}"/${PN}-2.3.0-completion.patch
24 S=${WORKDIR}/${PN^}-${P}
32 econf --with-elvidir='$(datadir)'/surfraw
38 newbashcomp surfraw-bash-completion ${PN}
39 bashcomp_alias ${PN} sr
42 dodoc examples/README examples/uzbl_load_url_from_surfraw
46 has_version "=${CATEGORY}/${PN}-1.0.7"
54 einfo "You can get a list of installed elvi by just typing 'surfraw' or"
55 einfo "the abbreviated 'sr'."
57 einfo "You can try some searches, for example:"
58 einfo "$ sr ask why is jeeves gay? "
59 einfo "$ sr google -results=100 RMS, GNU, which is sinner, which is sin?"
60 einfo "$ sr rhyme -method=perfect Julian"
62 einfo "The system configuration file is /etc/surfraw.conf"
64 einfo "Users can specify preferences in '~/.surfraw.conf' e.g."
65 einfo "SURFRAW_graphical_browser=mozilla"
66 einfo "SURFRAW_text_browser=w3m"
67 einfo "SURFRAW_graphical=no"
69 einfo "surfraw works with any graphical and/or text WWW browser"
71 if [[ $upgrade_from_1_0_7 = 0 ]] ; then
72 ewarn "surfraw usage has changed slightly since version 1.0.7, elvi are now called"
73 ewarn "using the 'sr' wrapper script as described above. If you wish to return to"
74 ewarn "the old behaviour you can add /usr/share/surfraw to your \$PATH"
76 # This file was always autogenerated, and is no longer needed.
77 if [ -f "${EROOT}"/etc/surfraw_elvi.list ]; then
78 rm -f "${EROOT}"/etc/surfraw_elvi.list
81 # Config file location changes in v2.2.6
82 for f in /etc/surfraw.{bookmarks,conf}; do
83 if [ -f "${EROOT}"${f} ]; then
84 ewarn "${f} has moved to /etc/xdg/config/surfraw/${f##*.} in v2.2.6."
88 if [ "${moves}" == 1 ]; then
89 ewarn "You must manually move, and update, the config files listed"
90 ewarn "above for surfraw v2.2.6 and above to use them."