1 # Contributor: Michael Witten <mfwitten>
3 # The various phases of the build can be controlled
4 # with the following variables (use an empty value
11 #_install= # do not install
13 ######################################################################
15 pkgname=greasemonkey-git
19 pkgdesc="A user-script manager for Firefox."
21 url=http://www.greasespot.net/
22 depends=('firefox>=3.0')
24 provides=(greasemonkey)
26 _gitroot=git://github.com/greasemonkey/greasemonkey.git
28 _repo=$srcdir/$_gitname
35 if [[ $srcdir ]]; then
39 msg "Getting source code ..."
41 if [[ -d $_gitname ]]; then
48 git clone "$_gitroot" "$_gitname"
56 if [[ $_clean ]]; then
67 if [[ $_compile ]]; then
79 pacman -Ql firefox | while read path; do
80 if [[ $path =~ firefox-([^/]+)/ ]]; then
81 echo ${BASH_REMATCH[1]}
92 if [[ $_install ]]; then
96 local version_firefox="$(firefox_version)"
98 # This isn't very safe over time; XML parsing should really be used
99 local extension_id="`awk -F'<em:id>|</em:id>' '/<em:id>/ {print $2; exit}' install.rdf`"
101 local path_install="$pkgdir/usr/lib/firefox-$version_firefox/extensions/$extension_id"
105 install -d "$path_install"
106 unzip -od "$path_install" *.xpi # it's probably bad to rely on globbing.