rules 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/usr/bin/make -f
  2. include /usr/share/dpatch/dpatch.make
  3. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  4. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  5. CFLAGS = -Wall -g
  6. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  7. CFLAGS += -O0
  8. else
  9. CFLAGS += -O2
  10. endif
  11. config.status: patch configure
  12. dh_testdir
  13. ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc/ngircd --without-epoll --with-gnutls
  14. build: build-stamp
  15. build-stamp: config.status
  16. dh_testdir
  17. $(MAKE)
  18. touch build-stamp
  19. clean: unpatch
  20. dh_testdir
  21. dh_testroot
  22. rm -f build-stamp
  23. [ ! -f Makefile ] || $(MAKE) distclean
  24. ifneq "$(wildcard /usr/share/misc/config.sub)" ""
  25. cp -f /usr/share/misc/config.sub config.sub
  26. endif
  27. ifneq "$(wildcard /usr/share/misc/config.guess)" ""
  28. cp -f /usr/share/misc/config.guess config.guess
  29. endif
  30. dh_clean
  31. install: build
  32. dh_testdir
  33. dh_testroot
  34. dh_clean -k
  35. dh_installdirs
  36. $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
  37. rm -rf $(CURDIR)/debian/ngircd/etc
  38. install -m 640 -D $(CURDIR)/debian/ngircd.conf $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
  39. install -m 640 -D $(CURDIR)/debian/ngircd.motd $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
  40. rm -rf $(CURDIR)/debian/ngircd/usr/share
  41. binary-indep: build install
  42. binary-arch: build install
  43. dh_testdir
  44. dh_testroot
  45. dh_installchangelogs ChangeLog
  46. dh_installexamples doc/sample-ngircd.conf
  47. dh_installdocs
  48. dh_installinit
  49. dh_installman man/ngircd.8 man/ngircd.conf.5
  50. dh_compress
  51. dh_strip
  52. dh_fixperms
  53. dh_installdeb
  54. dh_shlibdeps
  55. dh_gencontrol
  56. dh_md5sums
  57. dh_builddeb
  58. binary: binary-indep binary-arch
  59. .PHONY: build clean binary-indep binary-arch binary install