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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DST=$(CURDIR)/debian/fsprotect

configure:

build:

clean: 
	dh_testdir
	dh_testroot

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	dh_install initramfs-tools/hooks/fsprotect /usr/share/initramfs-tools/hooks
	dh_install initramfs-tools/scripts/local-bottom/fsprotect /usr/share/initramfs-tools/scripts/local-bottom
	dh_install sbin/is_aufs /sbin
	dh_install lib/fsprotect-protect /lib/fsprotect/
	chmod 755 $(DST)/lib/fsprotect/fsprotect-protect

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installdocs doc/fsprotect.pdf
	dh_installdebconf
	dh_installman debian/is_aufs.1
	dh_installinit --no-restart-on-upgrade --no-start \
		--update-rcd-params="start 37 S ."
	dh_lintian
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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