#!/usr/bin/make -f

PKGDIR=debian/apt-proxy

build: build-stamp
build-stamp:
	dh_testdir

	$(MAKE) -C doc apt-proxy-import.8
	po4a doc/po4a.cfg
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f doc/*.??.*
	$(MAKE) -C doc clean
	rm -f build-stamp install-stamp AptProxy-shutdown-2.tap
	find . -name "*.pyc" |xargs -r rm
	find . -name "*.tmlc" |xargs -r rm
	#debconf-updatepo
	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_install
	#dh_installdebconf
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_installchangelogs
	dh_installlogrotate
	dh_pycentral
	dh_python
	dh_installinit
	
	touch install-stamp

binary-arch: build install

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
