#! /usr/bin/make -f
# -*- make -*-
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

build:
	dh_testdir
	$(MAKE) -C doc
	# feel free to put dc=debian,dc=org and debian.org into some config file so that this is easier on others who
	# also use userdir-ldap.
	sed -e 's/@@DN@@/dc=debian,dc=org/g; s/@@DOMAIN@@/debian.org/g' < userdir-ldap-slapd.conf.in > userdir-ldap-slapd.conf
	touch build

clean:
	dh_testdir
	rm -f build
	find . -name '*.py[co]' -print0 | xargs -0 --no-run-if-empty rm -f
	$(MAKE) -C doc clean
	rm -f userdir-ldap-slapd.conf
	dh_clean

binary-indep: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_install
	dh_installcron --name=ud-replicate
	dh_installdocs
	dh_installchangelogs
	dh_installman
	dh_fixperms
	dh_compress
	dh_python2 --no-shebang-rewrite
	dh_python3 --no-shebang-rewrite
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: build
# There are no architecture-dependent files to be uploaded
# generated by this package.  If there were any they would be
# made here.


# Below here is fairly generic really

binary:	binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean
