#!/usr/bin/make -f

PACKAGE		= procmail-lib
PKGDIR		= $(shell pwd)/debian/$(PACKAGE)
PKGDOCDIR       = $(PKGDIR)/usr/share/doc/$(PACKAGE)

install:
	# target: install
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# The *.1 might be regenerated by the Makefile. Save and
	# restore original to prevent it from appearing in a Debian
	# diff

	cp lib-stebbens/proclint.1 lib-stebbens/proclint.1.orig
	$(MAKE) DESTDIR=$(PKGDIR) prefix=/usr install
	mv lib-stebbens/proclint.1.orig lib-stebbens/proclint.1

	# Do not include standard GNU license files in Debian package

	rm -f $(PKGDOCDIR)/lib-stebbens/GNU-LICENSE*
	rm -f $(PKGDOCDIR)/lib-stebbens/Copyright

binary-indep: install
	# target: binary-indep - Build architecture-dependent files
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installchangelogs lib/ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

%:
	dh $@

binary: binary-indep

.PHONY: install
.PHONY: binary-indep binary-arch binary

# End of file
