#! /usr/bin/make -f

tmp = $(CURDIR)/debian/oem-config

build:

clean:
	dh_testdir
	dh_testroot
	find -type f -name '*.pyc' -print0 | xargs -0r rm -f
	dh_clean

binary-arch:

binary-indep: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -i
	dh_install -i
	set -e; for x in menu/*.templates; do \
		po2debconf --podir=debian/po $$x \
			> $(tmp)/usr/lib/oem-config/menu/$${x##*/}; \
	done
	cp debian/lintian-override $(tmp)/usr/share/lintian/overrides/oem-config
	dh_installdebconf -i
	dh_installdocs
	dh_installchangelogs
	dh_installinit -n
	dh_compress -i
	dh_fixperms -i
	dh_python
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary: binary-arch binary-indep

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