#!/usr/bin/make -f

DEB_DH_INSTALLINIT_ARGS := -- defaults 95 5
DEB_BUILD_PARALLEL=yes

include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

clean::
	rm -f src/preload.8	# generated at build time by help2man
	rm -f config.log

binary-post-install/preload::
# Looks like Redhat to me.  Done our way elsewhere.
	rm -r debian/preload/etc/rc.d debian/preload/etc/sysconfig
# Hmm.  Why?
	rm debian/preload/var/log/preload.log
# Thanks but no thanks.
	rm -fr debian/preload/usr/share/doc/preload-*
# Install and compress it manually, to be safe
	rm -f debian/preload/usr/share/man/man8/preload.8.gz
	cp src/preload.8 debian/preload/usr/share/man/man8/
	gzip -9 debian/preload/usr/share/man/man8/preload.8
# Don't put files that are modified at run time to the binary package
	rm debian/preload/var/lib/preload/preload.state
