#!/usr/bin/make -f

clean:
	dh_testdir
	dh_testroot
	dh_clean
	rm -f conf/config.inc.php

build:
	cp conf/config.inc.php-dist conf/config.inc.php

install: build
	dh_testdir
	dh_testroot

	dh_installchangelogs 
	dh_installdirs
	dh_installdocs
	dh_install

	rm debian/phppgadmin/usr/share/phppgadmin/libraries/adodb/*.txt
	rm debian/phppgadmin/usr/share/phppgadmin/lang/convert.awk
	rm debian/phppgadmin/usr/share/phppgadmin/lang/langcheck
	rm debian/phppgadmin/usr/share/phppgadmin/lang/php2po
	rm debian/phppgadmin/usr/share/phppgadmin/lang/po2php
	rm debian/phppgadmin/usr/share/phppgadmin/lang/synch

binary-arch:

# Build architecture-independent files here.
binary-indep: install
	dh_testdir
	dh_testroot

	dh_link
	dh_compress
	dh_fixperms
	find debian/phppgadmin/usr/share/phppgadmin -not -type l -name '*.php' -exec chmod a-x '{}' +
	dh_installdeb

	dh_gencontrol
	dh_md5sums
	dh_builddeb

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