#!/usr/bin/make -f
# debian/rules that uses debhelper and alien
# GNU copyright 1997 by Joey Hess.

DH_COMPAT=3

build:
	dh_testdir
	# Nothing to do.
clean:
	dh_testdir
	dh_testroot
	dh_clean

# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean -k
	mkdir -p debian/tmp/etc
	mkdir -p debian/tmp/usr/share/doc/sysprofile
	mkdir -p debian/tmp/usr/share/man/man8
	mkdir -p debian/syslogout/etc
	mkdir -p debian/syslogout/usr/share/doc/syslogout
	mkdir -p debian/syslogout/usr/share/man/man8
	install -d debian/tmp
	# copying sysprofile files in place:
	cp -a etc/sysprofile* debian/tmp/etc
	cp -a usr/share/doc/sysprofile debian/tmp/usr/share/doc
	cp usr/share/man/man8/sysprofile.8 debian/tmp/usr/share/man/man8
	# copying syslogout files in place:
	cp -a etc/syslogout* debian/syslogout/etc
	cp -a usr/share/doc/syslogout debian/syslogout/usr/share/doc
	cp usr/share/man/man8/syslogout.8 debian/syslogout/usr/share/man/man8
	chmod 644 debian/tmp/etc/sysprofile.d/*
	chmod 644 debian/syslogout/etc/syslogout.d/*

# If you need to move files around in debian/tmp or do some
# binary patching ... Insert it here
#
	dh_installdocs
	#dh_installmanpages
	#dh_installexamples
	dh_installchangelogs
	dh_compress -X.Z
	dh_fixperms
	dh_installdeb
	-dh_shlibdeps
	dpkg-gencontrol -isp -psyslogout -Pdebian/syslogout
	dpkg-gencontrol -isp -psysprofile -Pdebian/tmp
	dh_makeshlibs
	dh_md5sums
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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