#!/usr/bin/make -f

build :
	make prefix=/usr

binary : binary-arch binary-indep

binary-arch : build
	dh_testroot
	make prefix=debian/webdvd/usr install
	dh_strip
	dh_shlibdeps
	@echo "Despite the warnings from dh_shlibdeps, this should complete dependencies:"
	echo "mozilla:Depends=mozilla-browser (= $$(dpkg-query -W --showformat='$${version}' mozilla-browser))" >> debian/webdvd.substvars
	mkdir -p -m755 debian/webdvd/usr/share/doc/webdvd
	cp COPYING debian/webdvd/usr/share/doc/webdvd/copyright
	dh_installchangelogs
	dh_installdocs
	dh_compress
	dh_installdeb
	dh_gencontrol
	dh_builddeb

binary-indep :

clean :
	make clean

svn-build :
	svn-buildpackage \
	--svn-builder='pdebuild-dist $(if $(DIST),$(DIST),sid)'

.PHONY : build binary binary-arch binary-dep clean svn-build
