#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

version=0.5.0

build: build-stamp
build-stamp:
	dh_testdir
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-make distclean
	-rm -f `find . -name "*~"`
	-rm -f `find . -name "*,v"`
	-rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
	-rm -f debian/*substvars
	dh_clean

binary-indep: build-stamp
	dh_testdir
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: build
	dh_testversion
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	cp bin/bookmarks-convert debian/tmp/usr/bin/bookmarks-convert
	cp -R public_html/* debian/tmp/usr/share/bookmarks
	bin/bookmarks-convert -r -o ns1 public_html/index.html bookmarks.ns1
	mv bookmarks.ns1 debian/tmp/usr/share/bookmarks
	
	dh_installdocs
	dh_installdocs OVERVIEW README.html-type README.ns1-type THANKS README
	dh_installmanpages
	dh_installchangelogs
	dh_fixperms
	dh_compress
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_makeshlibs
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot
