#!/usr/bin/make -f # $HeadURL$ $LastChangedRevision$ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # # Where is aodms-helper? # #AODMS_HELPER_CMD = /home/alexis/dev/svnwcs/aodms/bin/aodms-helper AODMS_HELPER_CMD = aodms-helper # # --standalone is not passed because lintian complains about the aodms # script's use of 'TMPDIR=/var/tmp'. Okay; there may be a problem with # aodms's use of tempfiles, but then the same is true for the whole # of ADE. ADE cannot easily switch to using mktemp or tempfile commands # because these create files after delivering the name and not v.v. # which does not allow ADE's ade_tmp_register to *ensure* *absolutely* # that the file is cleaned up, because if a program is interrupted # *between* NAME=`mktemp` and ade_tmp_register then the file will not # be cleaned. # # Anyway, for now we revert to using aodms at package install time # i.e. make aodms a run-time dependency, not a build-time one to avoid # seeing this lintian error. # #AODMS_HELPER_FLAGS = --standalone configure: configure-stamp configure-stamp: dh_testdir $(AODMS_HELPER_CMD) $(AODMS_HELPER_FLAGS) $(CURDIR)/debian/app_functions @# Configure to install under / $(MAKE) \ ADECONF_FLAGS="\ --prefix=/ \ --bindir=/usr/bin \ --cfgdir=/etc \ --docdir=/usr/share/doc/mumc \ --incdir=/usr/include/mumc \ --lckdir=/var/run/mumc \ --libdir=/usr/lib/mumc \ --libdir=/var/log \ --mandir=/usr/share/man \ --sttdir=/var/lib/mumc \ " \ configure touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir $(MAKE) \ DOWNLOADDIR=/var/spool/mumc \ SHELL_CMD=/bin/bash \ PERL_CMD=/usr/bin/perl \ compile $(MAKE) tests touch build-stamp clean: dh_testdir dh_testroot $(AODMS_HELPER_CMD) --clean rm -f build-stamp configure-stamp $(MAKE) clean distclean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs @# Actually install under $(CURDIR) $(MAKE) \ DIR=$(CURDIR)/debian/mumc \ BINDIR=$(CURDIR)/debian/mumc/usr/bin \ CFGDIR=$(CURDIR)/debian/mumc/etc \ DOCDIR=$(CURDIR)/debian/mumc/usr/share/doc/mumc \ INCDIR=$(CURDIR)/debian/mumc/usr/include/mumc \ LCKDIR=$(CURDIR)/debian/mumc/var/run/mumc \ LIBDIR=$(CURDIR)/debian/mumc/usr/lib/mumc \ LOGDIR=$(CURDIR)/debian/mumc/var/log \ MANDIR=$(CURDIR)/debian/mumc/usr/share/man \ STTDIR=$(CURDIR)/debian/mumc/var/lib/mumc \ install @# 'COPYING' should not be installed; according to 'lintian' @# all copyright info should be collected in the 'copyright' @# file, and standard licenses should be referenced, but not @# actually included, and 'COPYING' is such a license. rm -f $(CURDIR)/debian/mumc/usr/share/doc/mumc/COPYING @# Remove the examples installed by the Makefile and install @# them instead using dh. rm -fr $(CURDIR)/debian/mumc/usr/share/doc/mumc/examples @# 'mumc.conf' is only distributed as an example in the @# sources. Now we use that as the actual config file. install -d $(CURDIR)/debian/mumc/etc/ install -m 644 doc/examples/mumc.conf $(CURDIR)/debian/mumc/etc/mumc.conf @# We also need a home for Debian. This is *NOT* done @# by aodms; the absolute minimum of stuff is to be done @# by aodms! If we make the home inside the package, then @# it will be removed for us (if empty). On top of that @# we will also need a '.mutella' directory in that home, @# and it's nicer if we do it here rather than letting @# mutella program itself create it. install -d $(CURDIR)/debian/mumc/var/lib/mutella/.mutella @# According to 'lintian -i', Debian policy says that @# 'ChangeLog' should be called 'changelog'. It also says @# that it should be compressed, but that happens @# automatically. mv $(CURDIR)/debian/mumc/usr/share/doc/mumc/ChangeLog $(CURDIR)/debian/mumc/usr/share/doc/mumc/changelog @# spool and lock and log directories are still missing, since @# mumc's Makefile's will not create these. We cannot @# correctly set the permissions and owner, so these @# are done by the 'app_fix_dirs' called by 'aodms'. @# (This creates /var/spool/mumc and /var/spool/mumc/part @# in one command.) install -d $(CURDIR)/debian/mumc/var/spool/mumc/part install -d $(CURDIR)/debian/mumc/var/run/mumc install -d $(CURDIR)/debian/mumc/var/log/mumc #PS1="post-install> " bash --norc # Build architecture-dependent files here. binary-indep: build install echo "doing binary-indep ..." dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples # dh_install # dh_installmenu # dh_installdebconf dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime @# dh_installinit passes 'defaults' as par to update-rc.d(8) but @# it has to be respecified if I want also to pass '95' to change @# the default run sequence number. dh_installinit -- defaults 95 # dh_installcron # dh_installinfo dh_installman dh_link # dh_strip dh_compress dh_fixperms # dh_perl # dh_python # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums @#PS1="pre-builddeb> " bash --norc dh_builddeb binary: binary-indep .PHONY: build clean binary-indep binary install configure