1*d5c9a868SElliott Hughes#!/usr/bin/make -f 2*d5c9a868SElliott Hughes# rules for mtools package 3*d5c9a868SElliott Hughes# by Luis Bustamante ([email protected]) 4*d5c9a868SElliott Hughes 5*d5c9a868SElliott Hughesexport DH_VERBOSE=1 6*d5c9a868SElliott HughesDEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) 7*d5c9a868SElliott HughesDEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) 8*d5c9a868SElliott Hughes 9*d5c9a868SElliott Hughesconfigure: configure-stamp 10*d5c9a868SElliott Hughesconfigure-stamp: 11*d5c9a868SElliott Hughes dh_testdir 12*d5c9a868SElliott Hughes cp -f /usr/share/misc/config.sub /usr/share/misc/config.guess . 13*d5c9a868SElliott Hughes ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \ 14*d5c9a868SElliott Hughes --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc 15*d5c9a868SElliott Hughes touch configure-stamp 16*d5c9a868SElliott Hughes 17*d5c9a868SElliott Hughesbuild: patch build-stamp 18*d5c9a868SElliott Hughesbuild-stamp: configure-stamp 19*d5c9a868SElliott Hughes dh_testdir 20*d5c9a868SElliott Hughes $(MAKE) 21*d5c9a868SElliott Hughes touch build-stamp 22*d5c9a868SElliott Hughes 23*d5c9a868SElliott Hughesclean: unpatch 24*d5c9a868SElliott Hughes dh_testdir 25*d5c9a868SElliott Hughes dh_testroot 26*d5c9a868SElliott Hughes rm -rf build-stamp configure-stamp 27*d5c9a868SElliott Hughes rm -rf config.sub config.guess 28*d5c9a868SElliott Hughes [ ! -f Makefile ] || $(MAKE) distclean 29*d5c9a868SElliott Hughes dh_clean config.cache config.log config.status .#patchlevel.c.1.18 .#mtools.spec.1.4 .#mtools.texi.1.11 .#fat_size_calculation.tex.1.1 30*d5c9a868SElliott Hughes 31*d5c9a868SElliott Hughesinstall: build 32*d5c9a868SElliott Hughes dh_testdir 33*d5c9a868SElliott Hughes dh_testroot 34*d5c9a868SElliott Hughes dh_prep 35*d5c9a868SElliott Hughes dh_installdirs 36*d5c9a868SElliott Hughes $(MAKE) install prefix=$$( pwd )/debian/tmp/usr 37*d5c9a868SElliott Hughes [ -d debian/mtools/etc/ ] || mkdir -p debian/mtools/etc 38*d5c9a868SElliott Hughes install -m 644 debian/mtools.conf debian/mtools/etc/ 39*d5c9a868SElliott Hughes dh_movefiles 40*d5c9a868SElliott Hughes 41*d5c9a868SElliott Hughesbinary-indep: 42*d5c9a868SElliott Hughesbinary-arch: mtools 43*d5c9a868SElliott Hughesbinary: binary-indep binary-arch 44*d5c9a868SElliott Hughes 45*d5c9a868SElliott Hughesmtools: build install 46*d5c9a868SElliott Hughes dh_testdir 47*d5c9a868SElliott Hughes dh_testroot 48*d5c9a868SElliott Hughes dh_installdocs 49*d5c9a868SElliott Hughes dh_installexamples -pmtools mtools.conf 50*d5c9a868SElliott Hughes dh_installman 51*d5c9a868SElliott Hughes dh_installinfo -pmtools mtools.info 52*d5c9a868SElliott Hughes dh_installchangelogs 53*d5c9a868SElliott Hughes dh_strip 54*d5c9a868SElliott Hughes dh_link -pmtools /usr/share/man/man5/mtools.5 /usr/share/man/man5/mtools.conf.5 55*d5c9a868SElliott Hughes dh_compress 56*d5c9a868SElliott Hughes dh_fixperms 57*d5c9a868SElliott Hughes dh_installdeb 58*d5c9a868SElliott Hughes dh_shlibdeps 59*d5c9a868SElliott Hughes dh_gencontrol 60*d5c9a868SElliott Hughes dh_md5sums 61*d5c9a868SElliott Hughes dh_builddeb 62*d5c9a868SElliott Hughes 63*d5c9a868SElliott Hughes.PHONY: build clean binary-indep binary-arch binary install \ 64*d5c9a868SElliott Hughes mtools patch clean-build unpatch configure 65