1 # Contributor: Dave Nguyen <diendien@gmail.com>
2 # Inspiration: Michael Witten <mfwitten>, Gustavo Dutra <mechamo@gustavodutra.com>
4 # The various phases of the build can be controlled
5 # with the following variables (use an empty value
13 #_install= # do not install
15 ######################################################################
21 pkgdesc="Make Thunderbird look and behave like Vim; built from HEAD of branch default"
23 url=http://www.vimperator.org/muttator
24 depends=('thunderbird')
25 makedepends=(coreutils mercurial sh zip unzip)
28 _hgroot=https://vimperator-labs.googlecode.com
36 cd "$srcdir" || return 1
38 if [ ! $_source ]; then
40 cd "$_hgrepo" || return 1
44 msg "Connecting to server...."
46 if [ -d "$_hgrepo" ] ; then
48 cd "$_hgrepo" && hg pull -u || return 1
49 msg "The local files are updated."
53 hg clone "$_hgroot/$_hgrepo" || return 1
54 cd "$_hgrepo" || return 1
58 msg "Checkout done or server timed out"
62 # At this point, the current working directory
63 # should be "$srcdir/$_hgrepo"
70 hg update --clean || return 1
82 # Current version is 3.0.2, but still needs to be installed in "3.0" folder
83 #local _thunderbirdVersion=$(thunderbird -v | awk '{gsub(/,/, "", $0); print $2}') || return 1
84 local _thunderbirdVersion="3.1"
85 local _muttatorVersion="`perl -ne '/VERSION\s*=\s*(\S+)/ && print($1) && last' Makefile`" || return 1
86 local _emid=$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' install.rdf) || return 1
88 local dstdir=$pkgdir/usr/lib/thunderbird-$_thunderbirdVersion/extensions/$_emid
89 local path_xpi="../downloads/muttator_$_muttatorVersion.xpi"
93 # At this point, the current working directory
94 # should be "$srcdir/$_hgroot/muttator"
98 if [ $_compile ]; then
107 if [ $_install ]; then
111 install -d "$dstdir" || return 1
112 unzip -od "$dstdir" "$path_xpi" || return 1
113 rm -f $dstdir/*.xpi || return 1