| 1 | #! /usr/bin/make -f |
| 2 | |
| 3 | export DH_COMPAT = 4 |
| 4 | |
| 5 | build: |
| 6 | rm -rf build deb-build |
| 7 | mkdir deb-build |
| 8 | cd deb-build; ../configure --prefix=/usr --mandir=/usr/share/man |
| 9 | make -C deb-build |
| 10 | touch build |
| 11 | |
| 12 | clean: |
| 13 | dh_clean |
| 14 | rm -rf deb-build build |
| 15 | |
| 16 | install: build |
| 17 | dh_clean |
| 18 | make -C deb-build install DESTDIR=`pwd`/debian/checkpath |
| 19 | mkdir -p debian/libcheckpath1/usr debian/libcheckpath-dev/usr |
| 20 | mv debian/checkpath/usr/lib debian/libcheckpath1/usr/lib |
| 21 | mkdir -p debian/libcheckpath-dev/usr/lib |
| 22 | mv debian/libcheckpath1/usr/lib/*.a debian/libcheckpath-dev/usr/lib |
| 23 | mv debian/libcheckpath1/usr/lib/*.so debian/libcheckpath-dev/usr/lib |
| 24 | mv debian/libcheckpath1/usr/lib/*.la debian/libcheckpath-dev/usr/lib |
| 25 | mkdir -p debian/libcheckpath-dev/usr/share/man |
| 26 | mv debian/checkpath/usr/share/man/man3 \ |
| 27 | debian/libcheckpath-dev/usr/share/man |
| 28 | mkdir -p debian/libcheckpath-dev/usr/bin |
| 29 | mv debian/checkpath/usr/bin/checkpath-config \ |
| 30 | debian/libcheckpath-dev/usr/bin |
| 31 | |
| 32 | binary-indep: |
| 33 | |
| 34 | binary-arch: install |
| 35 | dh_testdir -a |
| 36 | dh_testroot -a |
| 37 | dh_compress -a |
| 38 | dh_installdocs -a |
| 39 | dh_strip -a |
| 40 | dh_makeshlibs -a -V |
| 41 | dh_shlibdeps -a |
| 42 | dh_gencontrol -a |
| 43 | dh_fixperms -a |
| 44 | dh_installdeb -a |
| 45 | dh_md5sums -a |
| 46 | dh_builddeb -a |
| 47 | |
| 48 | binary: binary-indep binary-arch |
| 49 | |
| 50 | source: |
| 51 | rm -rf deb-build/*.tar.gz deb-build/=deb= |
| 52 | make -C deb-build dist PACKAGE=checkpath |
| 53 | mkdir deb-build/=deb= |
| 54 | cd deb-build/=deb=; tar xvfz ../*.tar.gz |
| 55 | d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/* |
| 56 | rm -rf deb-build/=deb= |
| 57 | |
| 58 | .PHONY: binary binary-arch binary-indep clean install source |