#
# Makefile for Here and Now.
# (c) Andrew Flegg 2010. Released under the Artistic Licence.

compile:
	perl -ni -e 'print; exit if /^XB-Maemo-Icon-26:$$/' debian/control
	uuencode -m icon-48.png - | perl -ne 'print " $$_" unless $$. == 1 or /^====$$/' >>debian/control

install:
	mkdir -p ${DESTDIR}/usr/bin
	cp -a here-and-now ${DESTDIR}/usr/bin/
	chmod 755 ${DESTDIR}/usr/bin/here-and-now
	mkdir -p ${DESTDIR}/usr/share/icons/hicolor/64x64/hildon
	cp icon-64.png ${DESTDIR}/usr/share/icons/hicolor/64x64/hildon/here-and-now.png
	mkdir -p ${DESTDIR}/usr/share/applications/hildon
	cp here-and-now.desktop ${DESTDIR}/usr/share/applications/hildon/

clean:
	rm -rf debian/here-and-now
	rm build-stamp configure-stamp

package:
	dpkg-buildpackage -rfakeroot -uc -us
	make clean
