#!/usr/bin/make -f
# -*- makefile -*-

clean:
	dh_testdir
	dh_clean
	rm -f debian/files || true

build:

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	
	$(eval sys_arch=$(shell dpkg --print-architecture))
	if [ -d rootfs ]; then cp -a rootfs/* debian/opsipxeconfd/; fi;
	if [ -d rootfs-$(sys_arch) ]; then cp -a rootfs-$(sys_arch)/* debian/opsipxeconfd/; fi;
	
	dh_install

binary-indep: install
	dh_testdir -i
	dh_installdebconf
	dh_installchangelogs
	dh_installdocs
	dh_systemd_enable
	dh_systemd_start
	dh_md5sums
	dh_gencontrol
	dh_installdeb
	dh_builddeb

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