meillo@0: #!/usr/bin/make -f meillo@0: meillo@0: # Uncomment this to turn on verbose mode. meillo@0: #export DH_VERBOSE=1 meillo@0: DOC = usr/doc meillo@0: MAN = usr/man meillo@0: DAT = usr/lib meillo@0: meillo@0: export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) meillo@0: export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) meillo@0: # FOR AUTOCONF 2.52 AND NEWER ONLY meillo@0: ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) meillo@0: confflags += --build $(DEB_HOST_GNU_TYPE) meillo@0: else meillo@0: confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) meillo@0: endif meillo@0: meillo@0: build: build-stamp meillo@0: build-stamp: meillo@0: dh_testdir meillo@0: meillo@0: # Add here commands to compile the package. meillo@0: ./configure $(confflags) \ meillo@0: --prefix=/usr --mandir='$${prefix}/share/man' \ meillo@0: --with-logdir=/var/log/masqmail \ meillo@0: --with-spooldir=/var/spool/masqmail \ meillo@0: --with-user=mail --with-group=mail \ meillo@0: --with-confdir=/etc/masqmail \ meillo@0: --with-liblockfile \ meillo@0: --enable-auth \ meillo@0: --enable-ident \ meillo@0: --enable-maildir meillo@0: $(MAKE) meillo@0: meillo@0: touch build-stamp meillo@0: meillo@0: clean: meillo@0: dh_testdir meillo@0: dh_testroot meillo@0: rm -f build-stamp meillo@0: meillo@0: # Add here commands to clean up after the build process. meillo@1: [ ! -f Makefile ] || $(MAKE) clean meillo@1: [ ! -f Makefile ] || $(MAKE) distclean meillo@0: rm -f tests/test.conf meillo@0: rm -f tests/local.sh meillo@0: rm -f tests/smtpout.sh meillo@0: # see /usr/share/doc/autotools-dev/README.Debian.gz meillo@0: -test -r /usr/share/misc/config.sub && \ meillo@0: cp -f /usr/share/misc/config.sub config.sub meillo@0: -test -r /usr/share/misc/config.guess && \ meillo@0: cp -f /usr/share/misc/config.guess config.guess meillo@0: rm -f config.log meillo@0: meillo@0: dh_clean meillo@0: meillo@0: install: build meillo@0: dh_testdir meillo@0: dh_testroot meillo@23: dh_prep meillo@0: dh_installdirs meillo@0: meillo@0: # Add here commands to install the package into debian/masqmail. meillo@0: $(MAKE) DESTDIR=`pwd`/debian/masqmail install meillo@0: rmdir debian/masqmail/var/spool/masqmail/input \ meillo@0: debian/masqmail/var/spool/masqmail/lock \ meillo@0: debian/masqmail/var/spool/masqmail/popuidl \ meillo@0: debian/masqmail/var/spool/masqmail debian/masqmail/var/spool \ meillo@0: debian/masqmail/var/log/masqmail debian/masqmail/var/log meillo@0: meillo@0: rm -f debian/masqmail/usr/bin/expandtest debian/masqmail/usr/bin/readtest meillo@0: install -m 755 debian/newaliases debian/masqmail/usr/bin/. meillo@0: install -m 755 debian/masqmail.ip-up debian/masqmail/etc/ppp/ip-up.d/1masqmail meillo@0: install -m 755 debian/masqmail.ip-up debian/masqmail/etc/network/if-up.d/1masqmail meillo@0: install -m 755 debian/masqmail.ip-up debian/masqmail/etc/ppp/ip-down.d/99masqmail meillo@0: install -m 755 debian/masqmail.ip-up debian/masqmail/etc/network/if-down.d/99masqmail meillo@0: meillo@0: install -m 644 debian/masqmail.logrotate debian/masqmail/etc/logrotate.d/masqmail meillo@0: meillo@0: meillo@0: # Build architecture-independent files here. meillo@0: binary-indep: build install meillo@0: # We have nothing to do by default. meillo@0: meillo@0: # Build architecture-dependent files here. meillo@0: binary-arch: build install meillo@0: cp debian/masqmail.lintian debian/masqmail/usr/share/lintian/overrides/masqmail meillo@0: # dh_testversion meillo@0: dh_testdir meillo@0: dh_testroot meillo@1: dh_installdebconf meillo@0: dh_installdocs meillo@0: rm -f debian/masqmail/usr/share/doc/masqmail/INSTALL meillo@0: ##cp -r docs debian/masqmail/$(DOC)/masqmail/html meillo@0: dh_installexamples examples/* tests meillo@0: # dh_installmenu meillo@0: # dh_installemacsen meillo@0: dh_installinit meillo@0: # dh_installcron meillo@0: dh_installman debian/mailq.8 debian/mailrm.8 debian/newaliases.8 debian/sendmail.8 meillo@0: # dh_undocumented meillo@0: dh_installchangelogs ChangeLog meillo@0: dh_link meillo@0: dh_strip meillo@0: dh_compress meillo@0: dh_fixperms -X/usr/sbin/masqmail meillo@0: dh_installdeb meillo@0: dh_shlibdeps meillo@0: dh_gencontrol meillo@0: # dh_makeshlibs meillo@0: dh_md5sums meillo@0: dh_builddeb meillo@0: meillo@1: source diff: meillo@0: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false meillo@0: meillo@0: binary: binary-indep binary-arch meillo@0: .PHONY: build clean binary-indep binary-arch binary install