#!/usr/bin/make -f

package=dpkg-http
method_files= desc.http install names setup update

build:
	dh_testdir
	touch build

clean:
	dh_testdir
	-rm -f build
	-rm -rf debian/tmp debian/files* core debian/substvars *~ debian/*~

binary-indep: build
	dh_testroot
	dh_testdir
	-rm -rf debian/tmp
	mkdir -p debian/tmp/DEBIAN debian/tmp/usr/doc/dpkg-http
	cp debian/copyright debian/tmp/usr/doc/dpkg-http/copyright
	cp debian/changelog debian/tmp/usr/doc/dpkg-http/changelog.Debian
	cp debian/README.Debian debian/tmp/usr/doc/dpkg-http/README.Debian
	gzip debian/tmp/usr/doc/dpkg-http/changelog.Debian
	mkdir -p debian/tmp/var/lib/dpkg/methods/http
	mkdir -p debian/tmp/usr/lib/dpkg/methods/http
	cp $(method_files) debian/tmp/usr/lib/dpkg/methods/http
	dh_installdeb
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..


binary-arch: build
	dh_testroot


binary: binary-indep binary-arch


.PHONY: binary binary-arch binary-indep clean
