rules 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/usr/bin/make -f
  2. package=file
  3. CFLAGS = -O2 -DHOWMANY=0x18000
  4. ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  5. CFLAGS += -g
  6. endif
  7. build:
  8. dh_testdir
  9. ./configure --prefix=/usr '--datadir=$${prefix}/share/misc' \
  10. '--mandir=$${prefix}/share/man' \
  11. --enable-fsect-man5
  12. make "CFLAGS=$(CFLAGS)"
  13. touch build
  14. clean:
  15. dh_testdir
  16. rm -f build changelog.tmp debian/copyright
  17. if [ -r Makefile ]; then \
  18. make distclean; \
  19. fi
  20. rm -f config.{log,cache,status} Makefile
  21. find . -name "*~" | xargs rm -f
  22. rm -rf debian/tmp debian/files* core debian/substvars
  23. dh_clean
  24. binary-indep: build
  25. dh_testroot
  26. dh_testdir
  27. # There are no architecture-independent files to be uploaded
  28. # generated by this package. If there were any they would be
  29. # made here.
  30. binary-arch: build
  31. dh_testroot
  32. dh_testdir
  33. rm -rf debian/tmp
  34. install -d debian/tmp/usr/bin debian/tmp/etc debian/tmp/usr/share/man/man1 debian/tmp/usr/share/man/man5
  35. make install prefix=`pwd`/debian/tmp/usr \
  36. INSTALL="/usr/bin/install -p" # DESTDIR=`pwd`/debian/tmp
  37. install -m644 -p magic.local `pwd`/debian/tmp/etc/magic
  38. cat debian/copyright-prolog LEGAL.NOTICE > debian/copyright
  39. dh_installdirs
  40. dh_installdocs README
  41. dh_installchangelogs patchlevel.h
  42. dh_installmanpages
  43. dh_strip
  44. dh_compress
  45. dh_fixperms
  46. dh_shlibdeps
  47. dh_gencontrol
  48. dh_installdeb
  49. dh_md5sums
  50. dh_builddeb
  51. rm -f debian/copyright
  52. binary: binary-indep binary-arch
  53. .PHONY: binary binary-arch binary-indep clean checkroot