rules 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/usr/bin/make -f
  2. package=file
  3. build:
  4. $(checkdir)
  5. ./configure --prefix=/usr '--datadir=$${prefix}/share/misc' \
  6. '--mandir=$${prefix}/share/man'
  7. make
  8. touch build
  9. clean:
  10. $(checkdir)
  11. rm -f build changelog.tmp debian/copyright
  12. if [ -r Makefile ]; then \
  13. make distclean; \
  14. fi
  15. rm -f config.{log,cache,status} Makefile
  16. find . -name "*~" | xargs rm -f
  17. rm -rf debian/tmp debian/files* core debian/substvars
  18. dh_clean
  19. binary-indep: checkroot build
  20. $(checkdir)
  21. # There are no architecture-independent files to be uploaded
  22. # generated by this package. If there were any they would be
  23. # made here.
  24. binary-arch: checkroot build
  25. $(checkdir)
  26. rm -rf debian/tmp
  27. install -d debian/tmp/usr/bin debian/tmp/etc debian/tmp/usr/share/man/man1 debian/tmp/usr/share/man/man5
  28. make install prefix=`pwd`/debian/tmp/usr \
  29. INSTALL="/usr/bin/install -p" # DESTDIR=`pwd`/debian/tmp
  30. install -m644 -p magic.local `pwd`/debian/tmp/etc/magic
  31. cat debian/copyright-prolog LEGAL.NOTICE > debian/copyright
  32. dh_installdirs
  33. dh_installdocs README
  34. dh_installchangelogs patchlevel.h
  35. dh_installmanpages
  36. dh_strip
  37. dh_compress
  38. dh_fixperms
  39. dh_shlibdeps
  40. dh_gencontrol
  41. dh_installdeb
  42. dh_md5sums
  43. dh_builddeb
  44. rm -f debian/copyright
  45. define checkdir
  46. test -f debian/rules
  47. endef
  48. # Below here is fairly generic really
  49. binary: binary-indep binary-arch
  50. source diff:
  51. @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
  52. checkroot:
  53. $(checkdir)
  54. test root = "`whoami`"
  55. .PHONY: binary binary-arch binary-indep clean checkroot