
all:: qgit


clean:
	rm -rf qgit
	# rm -rf .cache	


qgit:: .cache/qgit-2.0.tar.bz2 $(PREFIX)/bin/git
	tar jxf .cache/qgit-2.0.tar.bz2
	cd qgit/src ; qmake ; xcodebuild
	cd qgit/src/build/Default/qgit.app/Contents/MacOS ; mv qgit qgit-bin ; echo "#!/bin/bash" > qgit
	cd qgit/src/build/Default/qgit.app/Contents/MacOS ; echo "PATH=$PATH:/usr/local/bin /Applications/qgit.app/Contents/MacOS/qgit-bin" >> qgit
	cd qgit/src/build/Default ; chmod a+x qgit.app/Contents/MacOS/qgit ; sudo cp -r qgit.app /Applications


.cache/qgit-2.0.tar.bz2:
	mkdir -p .cache
	cd .cache ; curl http://easynews.dl.sourceforge.net/sourceforge/qgit/qgit-2.0.tar.bz2 -O


