Package-Name: firefox-bin
Requires: XFree86|Xorg gtk+
Homepage: http://www.mozilla.org/
Source: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/(\d+.\d+)(?:((?:a|b|rc)\d*)|(.\d+))? e:$1.($2||$3||".0") $1$2$3/linux-i686/en-US/firefox-$1$2$3.tar.gz
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	mv firefox* firefox-bin-"$(VERSION)"
Compile:
	mv -f firefox firefox~
	sed 's,/usr/local/lib/mozilla-[0-9a-z.]*,$(PREFIX),g' < firefox~ > firefox
	chmod 755 firefox
	touch firefox -r firefox~
	rm -f firefox~
	rm -rf "$(PREFIX)"/*
	cp -av * "$(PREFIX)"/
	mkdir -p "$(PREFIX)"/chrome/icons/default
	ln -s ../../../icons/mozicon50.xpm "$(PREFIX)"/chrome/icons/default/main-window.xpm
Install:
	ln -fs "$(PREFIX)"/firefox /usr/bin/
# FIXME: dir has to be writable by user using Mozilla or we get errors about
#        not being able to write the xpti manifest
#	chown -R achurch "$(PREFIX)"

/pkg/firefox-bin/
/usr/bin/firefox
