2
1

bind.mk 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #############################################################
  2. #
  3. # bind
  4. #
  5. #############################################################
  6. BIND_VERSION = 9.6-ESV-R5-P1
  7. BIND_SITE = ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION)
  8. BIND_MAKE = $(MAKE1)
  9. BIND_TARGET_SBINS = lwresd named named-checkconf named-checkzone
  10. BIND_TARGET_SBINS += named-compilezone rndc rndc-confgen dnssec-dsfromkey
  11. BIND_TARGET_SBINS += dnssec-keyfromlabel dnssec-keygen dnssec-signzone
  12. BIND_TARGET_BINS = dig host nslookup nsupdate
  13. BIND_TARGET_LIBS = libbind9.* libdns.* libisc.* libisccc.* libisccfg.* liblwres.*
  14. BIND_CONF_ENV = BUILD_CC="$(TARGET_CC)" \
  15. BUILD_CFLAGS="$(TARGET_CFLAGS)"
  16. BIND_CONF_OPT = --sysconfdir=/etc \
  17. --localstatedir=/var \
  18. --with-randomdev=/dev/urandom \
  19. --enable-epoll --with-libtool
  20. ifeq ($(BR2_PACKAGE_LIBXML2),y)
  21. BIND_CONF_OPT += --with-libxml2=$(STAGING_DIR)/usr
  22. BIND_DEPENDENCIES += libxml2
  23. else
  24. BIND_CONF_OPT += --with-libxml2=no
  25. endif
  26. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  27. BIND_DEPENDENCIES += openssl
  28. BIND_CONF_OPT += --with-openssl=$(STAGING_DIR)/usr
  29. else
  30. BIND_CONF_OPT += --with-openssl=no
  31. endif
  32. define BIND_TARGET_INSTALL_FIXES
  33. rm -f $(TARGET_DIR)/usr/bin/isc-config.sh
  34. $(INSTALL) -m 0755 -D package/bind/bind.sysvinit $(TARGET_DIR)/etc/init.d/S81named
  35. endef
  36. BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_INSTALL_FIXES
  37. define BIND_TARGET_REMOVE_SERVER
  38. rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SBINS))
  39. endef
  40. define BIND_TARGET_REMOVE_TOOLS
  41. rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS))
  42. endef
  43. ifneq ($(BR2_PACKAGE_BIND_SERVER),y)
  44. BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_SERVER
  45. endif
  46. ifneq ($(BR2_PACKAGE_BIND_TOOLS),y)
  47. BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_TOOLS
  48. endif
  49. define BIND_UNINSTALL_TARGET_CMDS
  50. $(BIND_TARGET_REMOVE_SERVER)
  51. $(BIND_TARGET_REMOVE_TOOLS)
  52. rm -rf $(addprefix $(TARGET_DIR)/usr/lib/, $(BIND_TARGET_LIBS))
  53. rm -f $(TARGET_DIR)/etc/init.d/S81named
  54. endef
  55. $(eval $(call AUTOTARGETS))