rules 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/make -f
  2. export DEB_BUILD_MAINT_OPTIONS = hardening=+all
  3. # HOWMANY is the number of bytes looked at by file
  4. CFLAGS += -DHOWMANY=0x18000
  5. ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
  6. export PATH := $(CURDIR)/debian/run-file:$(PATH)
  7. export CURDIR
  8. endif
  9. %:
  10. dh $@
  11. override_dh_auto_configure:
  12. dh_auto_configure -- \
  13. --prefix=/usr \
  14. --datadir=\$${prefix}/share \
  15. --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
  16. --mandir=\$${prefix}/share/man \
  17. --enable-fsect-man5 \
  18. --enable-static \
  19. --disable-libseccomp \
  20. --disable-silent-rules CFLAGS="$(CFLAGS)"
  21. override_dh_auto_install:
  22. dh_auto_install
  23. mv debian/tmp/usr/share/misc debian/tmp/usr/share/file
  24. install -D -m 0644 magic/magic.local debian/tmp/etc/magic
  25. install -D -m 0644 magic/magic.local debian/tmp/etc/magic.mime
  26. # Install additional headers
  27. mkdir -p debian/libmagic-dev/usr/include/file
  28. cp src/file.h debian/libmagic-dev/usr/include/file
  29. # Remove useless files
  30. rm -f debian/tmp/usr/lib/*/*.la
  31. override_dh_missing:
  32. dh_missing --fail-missing
  33. override_dh_shlibdeps:
  34. dh_shlibdeps -Llibmagic1 -ldebian/libmagic1/usr/lib