view rules @ 36:02433fe53e6b

Added tag 0.2.21-8 for changeset 56c0c6807b0e
author meillo@marmaro.de
date Sat, 19 Jun 2010 10:48:02 +0200 (2010-06-19)
parents eae48d9839e4
children e7f8c0a161b6
line wrap: on
line source
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DOC = usr/doc
MAN = usr/man
DAT = usr/lib

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
# FOR AUTOCONF 2.52 AND NEWER ONLY
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  confflags += --build $(DEB_HOST_GNU_TYPE)
else
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

build: build-stamp
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	./configure $(confflags) \
		--prefix=/usr --mandir='$${prefix}/share/man' \
		--datadir='$${prefix}/share' \
		--with-logdir=/var/log/masqmail \
		--with-spooldir=/var/spool/masqmail \
		--with-user=mail --with-group=mail \
		--with-confdir=/etc/masqmail \
		--with-liblockfile \
		--enable-auth \
		--enable-ident \
		--enable-maildir
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	[ ! -f Makefile ] || $(MAKE) clean
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f tests/test.conf
	rm -f tests/local.sh
	rm -f tests/smtpout.sh
	# see /usr/share/doc/autotools-dev/README.Debian.gz
	-test -r /usr/share/misc/config.sub && \
		cp -f /usr/share/misc/config.sub config.sub
	-test -r /usr/share/misc/config.guess && \
		cp -f /usr/share/misc/config.guess config.guess
	rm -f config.log

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# Add here commands to install the package into debian/masqmail.
	$(MAKE) DESTDIR=`pwd`/debian/masqmail install
	rmdir debian/masqmail/var/spool/masqmail/input \
                debian/masqmail/var/spool/masqmail/lock \
                debian/masqmail/var/spool/masqmail/popuidl \
		debian/masqmail/var/spool/masqmail debian/masqmail/var/spool \
		debian/masqmail/var/log/masqmail debian/masqmail/var/log

	rm -f debian/masqmail/usr/bin/expandtest debian/masqmail/usr/bin/readtest
	install -m 755 debian/newaliases debian/masqmail/usr/bin/.
	install -m 755 debian/masqmail.ip-up debian/masqmail/etc/ppp/ip-up.d/1masqmail
	install -m 755 debian/masqmail.ip-up debian/masqmail/etc/network/if-up.d/1masqmail
	install -m 755 debian/masqmail.ip-up debian/masqmail/etc/ppp/ip-down.d/99masqmail
	install -m 755 debian/masqmail.ip-up debian/masqmail/etc/network/if-down.d/99masqmail

	install -m 644 debian/masqmail.logrotate debian/masqmail/etc/logrotate.d/masqmail


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

# Build architecture-dependent files here.
binary-arch: build install
	cp debian/masqmail.lintian debian/masqmail/usr/share/lintian/overrides/masqmail
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_installdebconf
	dh_installdocs
	rm -f debian/masqmail/usr/share/doc/masqmail/INSTALL
	##cp -r docs debian/masqmail/$(DOC)/masqmail/html
	dh_installexamples examples/* tests
#	dh_installmenu
#	dh_installemacsen
	dh_installinit
#	dh_installcron
	dh_installman debian/mailq.8 debian/mailrm.8 debian/newaliases.8 debian/sendmail.8
#	dh_undocumented
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms -X/usr/sbin/masqmail
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
#	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 install