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