| 1 | #! /usr/bin/make -f |
| 2 | |
| 3 | export DH_COMPAT = 4 |
| 4 | |
| 5 | mdw-setup: |
| 6 | upstream=`git-describe idx | sed 's:^idx/::'`; \ |
| 7 | dir=ezmlm-idx_$$upstream.orig; \ |
| 8 | git-tar-tree idx $$dir | gzip -9c >../$$dir.tar.gz |
| 9 | |
| 10 | clean: |
| 11 | make clean std |
| 12 | dh_clean |
| 13 | rm -f build |
| 14 | |
| 15 | build: |
| 16 | make pgsql |
| 17 | make it install man |
| 18 | touch build |
| 19 | |
| 20 | install: build |
| 21 | dh_clean |
| 22 | mkdir -p debian/ezmlm-idx/usr/bin debian/ezmlm-idx/usr/share/man |
| 23 | ./install debian/ezmlm-idx/usr/bin <BIN |
| 24 | ./install debian/ezmlm-idx/usr/share/man <MAN |
| 25 | rm -rf debian/ezmlm-idx/usr/share/man/cat* |
| 26 | mkdir -p debian/ezmlm-idx/usr/share/ezmlm |
| 27 | find debian/ezmlm-idx/usr/bin ! -perm +111 -print0 | \ |
| 28 | xargs -0ri mv {} debian/ezmlm-idx/usr/share/ezmlm |
| 29 | mkdir -p debian/ezmlm-cgi/usr/lib/cgi-bin |
| 30 | mkdir -p debian/ezmlm-cgi/usr/share/man/man1 |
| 31 | cp ezmlm-cgi debian/ezmlm-cgi/usr/lib/cgi-bin |
| 32 | cp ezmlm-cgi.1 debian/ezmlm-cgi/usr/share/man/man1 |
| 33 | |
| 34 | binary-indep: |
| 35 | |
| 36 | binary-arch: install |
| 37 | dh_testdir -a |
| 38 | dh_testroot -a |
| 39 | dh_installman -a |
| 40 | dh_compress -a |
| 41 | dh_installdocs -a |
| 42 | dh_makeshlibs -a |
| 43 | dh_fixperms -a |
| 44 | dh_strip -a |
| 45 | dh_shlibdeps -a |
| 46 | dh_gencontrol -a |
| 47 | dh_installdeb -a |
| 48 | dh_md5sums -a |
| 49 | dh_builddeb -a |
| 50 | |
| 51 | binary: binary-arch binary-indep |
| 52 | |
| 53 | source: clean mdw-setup |
| 54 | dir=`pwd | sed 's:^.*/::'`; \ |
| 55 | upstream=`git-describe idx | sed 's:^idx/::'`; \ |
| 56 | tarball=ezmlm-idx_$$upstream.orig.tar.gz; \ |
| 57 | cd ..; \ |
| 58 | dpkg-source -b -i'(?:^|/)\.git(?:$$|/)' $$dir $$tarball |
| 59 | |
| 60 | .PHONY: clean binary-indep binary-arch binary source mdw-setup |