1 # Contributor: Michael Witten <mfwitten>
2 # Inspiration: Gustavo Dutra <mechamo@gustavodutra.com>
4 # For 3.5<=firefox<=4.0b7pre, update to revision 4361:
9 # makepkg --holdver -sfi
11 # To build a specific revision, it is probably
12 # necessary to run `makepkg' with the `--holdver'
15 # The various phases of the build can be controlled
16 # with the following variables (use an empty value
23 #_install= # do not install
27 # Use a kind of symlink to point firefox to the
28 # source repository rather than installing the
29 # files system-wide. This allows you to hack on
30 # the source without having to reinstall just
31 # to try out the results.
35 ######################################################################
41 pkgdesc="Make firefox look and behave like Vim; built from HEAD of branch default"
43 url=http://www.vimperator.org/vimperator
44 depends=('firefox>=4.0b5')
45 makedepends=(mercurial zip unzip)
48 _hgroot=https://vimperator-labs.googlecode.com
55 if [[ $_source ]]; then
59 msg "Connecting to server...."
61 if [[ -d $_hgrepo ]] ; then
65 msg "The local files are updated."
69 hg clone "$_hgroot/$_hgrepo"
73 msg "Checkout done or server timed out"
79 if [[ $_clean ]]; then
84 hg status --unknown | xargs rm -rf
91 if [[ $_compile && ! $_install_pointer ]]; then
93 cd "$srcdir/$_hgrepo/vimperator"
105 if [[ ! $_install ]]; then
111 cd "$srcdir/$_hgrepo/vimperator"
113 # This isn't very safe over time; XML parsing should really be used
114 local extension_id=`awk -F'<em:id>|</em:id>' '/<em:id>/ {print $2; exit}' install.rdf`
116 local path_install="$pkgdir/usr/lib/firefox/extensions/$extension_id"
118 if [[ $_install_pointer ]]; then
119 install -d "$(dirname "$path_install")"
120 echo "$(pwd)" > "$path_install"
123 local version_vimperator="`perl -ne '/VERSION\s*=\s*(\S+)/ && print($1) && last' Makefile`"
124 local path_xpi="../downloads/vimperator-$version_vimperator.xpi"
126 install -d "$path_install"
127 unzip -od "$path_install" "$path_xpi"