#! /usr/bin/make -f # # debian/exmh.conf contains configuration information taken from # exmh.install. debian/exmh.conf must be manually generated and # verified before building the exmh package and updated with each # new upstream release of exmh. SHELL = /bin/sh INSTALL = /usr/bin/install INSTALL_PROGRAM = $(INSTALL) -m 755 -o root -g root INSTALL_DATA = $(INSTALL) -m 644 -o root -g root INSTALL_DIR = $(INSTALL) -d -m 755 -o root -g root # name and version number of the package PACKAGE=exmh VERSION=$(shell sed -n '1s/^.*(\(.*\)).*$$/\1/p' debian/changelog) DSTDIR=debian/tmp/ BUILD_DATE := $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p') config: $(checkdir) touch stamp-config build: $(checkdir) test -f stamp-config || make -f debian/rules config touch stamp-build clean: $(checkdir) -rm -f stamp-config stamp-build -rm -rf $(DSTDIR) debian/files* binary-arch: checkroot binary-indep: checkroot $(checkdir) test -f stamp-build || make -f debian/rules build -rm -rf $(DSTDIR) # make all directories in one go $(INSTALL_DIR) $(DSTDIR)/DEBIAN $(DSTDIR)/usr/bin/ $(DSTDIR)/etc/ $(INSTALL_DIR) $(DSTDIR)/usr/share/menu $(DSTDIR)/usr/lib/exmh $(INSTALL_DIR) $(DSTDIR)/usr/share/doc/exmh/html $(DSTDIR)/usr/share/doc/exmh/misc $(DSTDIR)/usr/share/doc/exmh/examples $(DSTDIR)/usr/share/man/man1 $(DSTDIR)/usr/share/exmh/bitmaps/ # the maintainer stuff first $(INSTALL_PROGRAM) debian/preinst debian/postinst debian/postrm $(DSTDIR)/DEBIAN/ $(INSTALL_DATA) debian/conffiles $(DSTDIR)/DEBIAN/ # configuration file, but vith our current version substituted sed -e s/MYVERSION/$(VERSION)/g $(DSTDIR)/etc/exmh.conf chown root:root $(DSTDIR)/etc/exmh.conf chmod 644 $(DSTDIR)/etc/exmh.conf # binaries. in upstream scheme, the install script massages .MASTER versions $(INSTALL_PROGRAM) exmh.MASTER $(DSTDIR)/usr/bin/exmh $(INSTALL_PROGRAM) exmh-async.MASTER $(DSTDIR)/usr/share/exmh/exmh-async $(INSTALL_PROGRAM) exmh-bg.MASTER $(DSTDIR)/usr/share/exmh/exmh-bg $(INSTALL_PROGRAM) ftp.expect.MASTER $(DSTDIR)/usr/share/exmh/ftp.expect $(INSTALL_PROGRAM) inc.expect.MASTER $(DSTDIR)/usr/share/exmh/inc.expect # libraries $(INSTALL_DATA) debian/menu $(DSTDIR)/usr/share/menu/exmh # everything from lib but the docs, the images, the # tclindex (built by postinst), and also not the mime.type (use main one in etc) $(INSTALL_DATA) lib/*.tcl lib/app-defaults* lib/*.au lib/PgpDecryptExpect lib/*.exp $(DSTDIR)/usr/lib/exmh/ $(INSTALL_DATA) lib/*.gif lib/*.bitmap lib/*.mask lib/*.ppm lib/bitmaps/* $(DSTDIR)/usr/share/exmh/bitmaps/ $(INSTALL_PROGRAM) exmh-strip.MASTER $(DSTDIR)/usr/share/doc/exmh/examples/exmh-strip $(INSTALL_PROGRAM) exmhcomp $(DSTDIR)/usr/share/doc/exmh/examples/ # man pages $(INSTALL_DATA) exmh.l $(DSTDIR)/usr/share/man/man1/exmh.1 -gzip -9frn $(DSTDIR)/usr/share/man/man1 # html documentation goes into html dir, extras go into misc subdir # others go into main docs area $(INSTALL_DATA) lib/html/* $(DSTDIR)/usr/share/doc/exmh/html/ # all misc except RPM info $(INSTALL_DATA) misc/README* misc/Par150* misc/archiveoldmail misc/cite* misc/comp* misc/exmhwrapper misc/gbuffy* misc/jpilot* misc/locked* misc/mh* misc/netscape-remote* misc/ns* misc/query* $(DSTDIR)/usr/share/doc/exmh/misc/ $(INSTALL_DATA) debian/copyright $(DSTDIR)/usr/share/doc/exmh/copyright $(INSTALL_DATA) debian/changelog $(DSTDIR)/usr/share/doc/exmh/changelog.Debian $(INSTALL_DATA) exmh.CHANGES $(DSTDIR)/usr/share/doc/exmh/changelog $(INSTALL_DATA) debian/README.Debian debian/NEWS.Debian $(DSTDIR)/usr/share/doc/exmh $(INSTALL_DATA) exmh.README $(DSTDIR)/usr/share/doc/exmh/README gzip -9n $(DSTDIR)/usr/share/doc/exmh/changelog* $(DSTDIR)/usr/share/doc/exmh/NEWS.Debian # build the run-time package dpkg-gencontrol -isp find '$(DSTDIR)' -depth -newermt '$(BUILD_DATE)' -print0 | \ xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg --build $(DSTDIR) .. define checkdir test -f exmh.MASTER -a -f debian/rules endef binary: binary-indep binary-arch build-arch: build build-indep: build checkroot: $(checkdir) test root = "`whoami`" .PHONY: binary binary-arch binary-indep clean