123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- #
- # Copyright (C) 2006-2012 OpenWrt.org
- # 2014-2017 Noah Meyerhans <frodo@morgul.net>
- #
- # This is free software, licensed under the GNU General Public License v2.
- # See /LICENSE for more information.
- #
- include $(TOPDIR)/rules.mk
- PKG_NAME:=bind
- PKG_VERSION:=9.14.4
- PKG_RELEASE:=1
- USERID:=bind=57:bind=57
- PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
- PKG_LICENSE := MPL-2.0
- PKG_CPE_ID:=cpe:/a:isc:bind
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
- PKG_SOURCE_URL:= \
- https://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \
- https://ftp.isc.org/isc/bind9/$(PKG_VERSION)
- PKG_HASH:=312efb82a6889074f31ef2849af498b3ec97ca69acd5c4e5e4b4045a8fe6b83f
- PKG_FIXUP:=autoreconf
- PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
- PKG_INSTALL:=1
- PKG_USE_MIPS16:=0
- PKG_BUILD_PARALLEL:=1
- PKG_CONFIG_DEPENDS := \
- CONFIG_BIND_LIBJSON \
- CONFIG_BIND_LIBXML2
- ifdef CONFIG_BIND_LIBXML2
- PKG_BUILD_DEPENDS += libxml2
- endif
- ifdef CONFIG_BIND_LIBJSON
- PKG_BUILD_DEPENDS += libjson-c
- endif
- include $(INCLUDE_DIR)/package.mk
- define Package/bind/Default
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=+bind-libs +@OPENSSL_WITH_EC
- TITLE:=bind
- URL:=https://www.isc.org/software/bind
- SUBMENU:=IP Addresses and Names
- endef
- define Package/bind-libs
- SECTION:=libs
- CATEGORY:=Libraries
- DEPENDS:=+libopenssl +zlib +libpthread +libatomic
- TITLE:=bind shared libraries
- URL:=https://www.isc.org/software/bind
- ifdef CONFIG_BIND_LIBJSON
- DEPENDS+= +libjson-c
- endif
- ifdef CONFIG_BIND_LIBXML2
- DEPENDS+= +libxml2
- endif
- endef
- define Package/bind-server
- $(call Package/bind/Default)
- TITLE+= DNS server
- endef
- define Package/bind-server/config
- source "$(SOURCE)/Config.in"
- endef
- define Package/bind-server-filter-aaaa
- $(call Package/bind-server)
- DEPENDS:=+bind-server
- TITLE+= filter AAAA plugin
- endef
- define Package/bind-client
- $(call Package/bind/Default)
- TITLE+= dynamic DNS client
- endef
- define Package/bind-tools
- $(call Package/bind/Default)
- TITLE+= administration tools (all)
- DEPENDS:= \
- +bind-check \
- +bind-dig \
- +bind-dnssec \
- +bind-host \
- +bind-rndc
- endef
- define Package/bind-rndc
- $(call Package/bind/Default)
- TITLE+= administration tools (rndc and rndc-confgen only)
- endef
- define Package/bind-check
- $(call Package/bind/Default)
- TITLE+= administration tools (named-checkconf and named-checkzone only)
- endef
- define Package/bind-dnssec
- $(call Package/bind/Default)
- TITLE+= administration tools (dnssec-keygen, dnssec-settime and dnssec-signzone only)
- endef
- define Package/bind-host
- $(call Package/bind/Default)
- TITLE+= simple DNS client
- endef
- define Package/bind-dig
- $(call Package/bind/Default)
- TITLE+= DNS excavation tool
- endef
- export BUILD_CC="$(TARGET_CC)"
- TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
- CONFIGURE_ARGS += \
- --disable-linux-caps \
- --with-openssl="$(STAGING_DIR)/usr" \
- --with-libtool \
- --without-lmdb \
- --enable-epoll \
- --without-gssapi \
- --without-readline \
- --without-python \
- --sysconfdir=/etc/bind
- ifdef CONFIG_BIND_LIBJSON
- CONFIGURE_ARGS += \
- --with-libjson="$(STAGING_DIR)/usr"
- else
- CONFIGURE_ARGS += \
- --without-libjson
- endif
- ifdef CONFIG_BIND_LIBXML2
- CONFIGURE_ARGS += \
- --with-libxml2="$(STAGING_DIR)/usr"
- else
- CONFIGURE_ARGS += \
- --without-libxml2
- endif
- CONFIGURE_VARS += \
- BUILD_CC="$(TARGET_CC)" \
- define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
- BUILD_CC="$(HOSTCC)" \
- CC="$(HOSTCC)" \
- CFLAGS="-O2" \
- LIBS="" \
- gen
- $(call Build/Compile/Default)
- endef
- define Package/bind-libs/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
- endef
- define Package/bind-server/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
- $(INSTALL_DIR) $(1)/etc/bind
- $(CP) \
- ./files/bind/db.0 \
- ./files/bind/db.127 \
- ./files/bind/db.255 \
- ./files/bind/db.local \
- ./files/bind/db.root \
- ./files/bind/bind.keys \
- $(1)/etc/bind/
- $(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
- find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
- endef
- define Package/bind-server/conffiles
- /etc/bind/db.0
- /etc/bind/db.127
- /etc/bind/db.255
- /etc/bind/db.local
- /etc/bind/db.root
- /etc/bind/named.conf
- endef
- define Package/bind-server-filter-aaaa/install
- $(INSTALL_DIR) $(1)/usr/lib/named
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/named/filter-aaaa.so $(1)/usr/lib/named
- endef
- define Package/bind-client/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
- endef
- define Package/bind-tools/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/delv $(1)/usr/bin/
- endef
- define Package/bind-rndc/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
- endef
- define Package/bind-check/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
- endef
- define Package/bind-dnssec/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-settime $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
- endef
- define Package/bind-host/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
- endef
- define Package/bind-dig/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
- endef
- $(eval $(call BuildPackage,bind-libs))
- $(eval $(call BuildPackage,bind-server))
- $(eval $(call BuildPackage,bind-server-filter-aaaa))
- $(eval $(call BuildPackage,bind-client))
- $(eval $(call BuildPackage,bind-tools))
- $(eval $(call BuildPackage,bind-rndc))
- $(eval $(call BuildPackage,bind-check))
- $(eval $(call BuildPackage,bind-dnssec))
- $(eval $(call BuildPackage,bind-host))
- $(eval $(call BuildPackage,bind-dig))
|