#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DK_PKGNAME=dkimproxy config.status: configure dh_testdir cp -f /usr/share/misc/config.sub . cp -f /usr/share/misc/config.guess . # Note: this is quite hackish, but this is the most simple way that # I have found to have this package install in /usr/share/perl5 # directly without too much trouble. ./configure --prefix=/usr --sysconfdir=/etc clean: dh_testdir dh_testroot dh_clean [ ! -f Makefile ] || $(MAKE) distclean rm -f config.sub config.guess rm -f build-stamp debian/files config.status config.cache config.log install: config.status dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/$DK_PKGNAME. $(MAKE) DESTDIR=$(CURDIR)/debian/$(DK_PKGNAME) install # Remove double-defined man pages, since the upstream author generate some # since version 1.2 rm debian/dkimproxy/usr/share/man/man8/dkimproxy_in.8 debian/dkimproxy/usr/share/man/man8/dkimproxy_out.8 # I send these config files in /etc/dkimproxy even if BY DEFAULT the # init script doesn't use them (just in case somebody wants to # modify the init script) mv $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy_in.conf.example $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_in.conf mv $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy_out.conf.example $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf # Set the port numbers as it used to be in Lenny, and as it is for # Amavisd compatibility by default. sed -i "s/10026/10024/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_in.conf sed -i "s/10025/10026/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_in.conf sed -i "s/10028/10029/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf sed -i "s/10027/10028/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf # Default in Lenny was postfix as selector name, so we keep it sed -i "s/selector1/postfix/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf # The key is given as parameter, so we don't want it in the config file AS WELL. sed -i "s/keyfile/#keyfile/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf # The perl libs have nothing to do in usr/lib ... mv $(CURDIR)/debian/$(DK_PKGNAME)/usr/lib/* $(CURDIR)/debian/$(DK_PKGNAME)/usr/share/perl5 rmdir $(CURDIR)/debian/$(DK_PKGNAME)/usr/lib mv $(CURDIR)/debian/$(DK_PKGNAME)/usr/bin/dkim_responder.pl $(CURDIR)/debian/$(DK_PKGNAME)/usr/bin/dkim_responder # These are deamons, they have nothing to do in /usr/bin !!! mv $(CURDIR)/debian/$(DK_PKGNAME)/usr/bin/dkimproxy.in $(CURDIR)/debian/$(DK_PKGNAME)/usr/sbin mv $(CURDIR)/debian/$(DK_PKGNAME)/usr/bin/dkimproxy.out $(CURDIR)/debian/$(DK_PKGNAME)/usr/sbin # Install the dkim default file install -D -m 0644 debian/defaults $(CURDIR)/debian/$(DK_PKGNAME)/etc/default/dkimproxy binary-indep: install dh_testdir dh_testroot dh_installchangelogs NEWS dh_installdocs dh_installexamples dh_installinit dh_installman --language=C dh_link var/lib/dkimproxy/private.key etc/ssl/private/dkimproxy.key dh_strip dh_compress dh_fixperms dh_perl dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary-arch: install binary: binary-indep binary-arch .PHONY: build clean binary-indep binary install