rules 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/make -f
  2. export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
  3. export DEB_BUILD_MAINT_OPTIONS = hardening=+all
  4. ifeq ($(SOURCE_DATE_EPOCH),)
  5. # workaround until SOURCE_DATE_EPOCH is available
  6. $(info SOURCE_DATE_EPOCH is not set, using changelog date instead)
  7. export CFLAGS += -DBIRTHDATE=$(shell date --date="$$(dpkg-parsechangelog --count 1 --show-field Date)" +%s)
  8. else
  9. export CFLAGS += -DBIRTHDATE=$(SOURCE_DATE_EPOCH)
  10. endif
  11. %:
  12. dh $@ --with systemd
  13. override_dh_auto_configure:
  14. dh_auto_configure -- \
  15. --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
  16. --prefix=/usr \
  17. --mandir=\$${prefix}/share/man \
  18. --infodir=\$${prefix}/share/info \
  19. --sysconfdir=/etc/ngircd \
  20. --with-gnutls \
  21. --with-ident \
  22. --with-pam \
  23. --enable-ipv6
  24. override_dh_auto_install:
  25. dh_auto_install
  26. # install config and sample motd file
  27. install -m 640 -D $(CURDIR)/debian/ngircd.conf \
  28. $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
  29. install -m 640 -D $(CURDIR)/debian/ngircd.motd \
  30. $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
  31. # make lintian happy
  32. rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING
  33. mv $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/ChangeLog \
  34. $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/changelog
  35. # Commands.txt is read by the daemon
  36. override_dh_compress:
  37. dh_compress -XCommands.txt