~ubuntu-branches/ubuntu/trusty/surfraw/trusty-proposed

« back to all changes in this revision

Viewing changes to elvi/openports

  • Committer: Bazaar Package Importer
  • Author(s): Ian Beckwith
  • Date: 2011-07-12 01:31:52 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20110712013152-ys4hnje67mwi3kgu
Tags: 2.2.8-1
* New upstream version
  + SURFRAW_graphical_remote defaults to off, as chromium
    doesn't support '-remote openURL()' (Closes: #628683).
* Move opensearch elvi to main surfraw package.
  It now has an optional mode that uses a redirector
  if the dependencies are not installed.
* debian/rules:
  + hardcode AWK as awk (Closes: #608967).
  + use dh_prep instead of dh_clean -k.
  + add build-arch and build-indep targets.
* debian/control:
  + Build-Depends: bump debhelper dependency to (>= 7).
  + Standards-Version: 3.9.2.
  + surfraw-extra: convert Conflicts: to Breaks:.
  + surfraw:
    * Breaks: surfraw-extra (<= 2.2.7-1)
      as we have taken over /usr/lib/surfraw/opensearch.
    * Recommends: surfraw-extra: add version of (>> 2.2.7-1).
    * Tweak Description.
* debian/source/format: explicitly specify 1.0 source format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# elvis: openports      -- search openports for OpenBSD packages
 
3
# coder@kyleisom.net 20110105
 
4
. surfraw || exit 1
 
5
 
 
6
w3_config_hook () {
 
7
    def     SURFRAW_openports_search    "http://openports.se/search.php?"
 
8
    def     SURFRAW_openports_stype     ""
 
9
}
 
10
 
 
11
w3_usage_hook () {
 
12
    cat <<EOF
 
13
Usage: $w3_argv0 [options] [search words]...
 
14
Description:
 
15
    Search openports for OpenBSD packages / ports. Only one search is active
 
16
    at a time. Feel free to n00b it up and use more than one flag. Go ahead,
 
17
    just try.
 
18
Local options:
 
19
  -m,-maintainer                search by maintainer
 
20
  -c,-comment                   search by comment
 
21
  -b,-builddeps                 search by build dependencies
 
22
  -r,-rundeps                   search by run dependencies
 
23
  -s,-mastersite                search by master site
 
24
  -d,-description               search by description
 
25
  -l,-commitlogs                search by commit logs
 
26
EOF
 
27
    w3_global_usage
 
28
}
 
29
 
 
30
w3_parse_option_hook () {
 
31
    opt="$1"
 
32
    optarg="$2"
 
33
    case "$opt" in
 
34
    -m|-mai*)           setopt  SURFRAW_openports_stype     "maintainer"    ;;
 
35
    -c|-comme*)         setopt  SURFRAW_openports_stype     "comment"       ;;
 
36
    -b|-bu*)            setopt  SURFRAW_openports_stype     "dependbuild"   ;;
 
37
    -r|-ru*)            setopt  SURFRAW_openports_stype     "dependrun"     ;;
 
38
    -s|-mas*)           setopt  SURFRAW_openports_stype     "MASTER_SITES"  ;;
 
39
    -d|-de*)            setopt  SURFRAW_openports_stype     "description"   ;;
 
40
    -l|-commi*)         setopt  SURFRAW_openports_stype     "commitlog"     ;;
 
41
    *) return 1 ;;
 
42
    esac
 
43
    return 0
 
44
}
 
45
 
 
46
w3_config
 
47
w3_parse_args "$@"
 
48
# w3_args now contains a list of arguments
 
49
 
 
50
escaped_args=`w3_url_of_arg $w3_args`
 
51
 
 
52
if test -z $SURFRAW_openports_stype ; then
 
53
    url="${SURFRAW_openports_search}so=${escaped_args}"
 
54
else
 
55
    url="${SURFRAW_openports_search}stype=${SURFRAW_openports_stype}&so=${escaped_args}"
 
56
fi
 
57
    
 
58
w3_browse_url $url