source: packages/net/bind/Makefile @ 9702

Last change on this file since 9702 was 9702, checked in by florian, 9 years ago

Fix bind installation

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1#
2# Copyright (C) 2006 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# $Id$
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=bind
12PKG_VERSION:=9.4.1
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:= \
17        ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
18        http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
19PKG_MD5SUM:=09b54d35036cb0423b2e618f21766285
20
21PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24PKG_BUILD_DEPENDS:=libopenssl
25
26include $(INCLUDE_DIR)/package.mk
27
28define Package/bind/Default
29  SECTION:=net
30  CATEGORY:=Network
31  DEPENDS:=+bind-libs
32  TITLE:=bind
33  URL:=http://www.isc.org/sw/bind/
34  SUBMENU:=dns
35endef
36
37define Package/bind-libs
38  SECTION:=net
39  CATEGORY:=Network
40  TITLE:=bind shared libraries
41  URL:=http://www.isc.org/sw/bind/
42  SUBMENU:=dns
43endef
44
45define Package/bind-server
46  $(call Package/bind/Default)
47  TITLE+= DNS server
48endef
49
50define Package/bind-client
51  $(call Package/bind/Default)
52  TITLE+= dynamic DNS client
53endef
54
55define Package/bind-tools
56  $(call Package/bind/Default)
57  TITLE+= administration tools (all)
58endef
59 
60define Package/bind-rndc
61  $(call Package/bind/Default)
62  TITLE+= administration tools (rndc and rndc-confgen only)
63endef
64
65define Package/bind-check
66  $(call Package/bind/Default)
67  TITLE+= administration tools (named-checkconf and named-checkzone only)
68endef
69
70define Package/bind-dnssec
71  $(call Package/bind/Default)
72  TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
73endef
74
75define Package/bind-host
76  $(call Package/bind/Default)
77  TITLE+= simple DNS client
78endef
79
80define Package/bind-dig
81  $(call Package/bind/Default)
82  TITLE+= DNS excavation tool
83endef
84
85export BUILD_CC="$(TARGET_CC)"
86
87CONFIGURE_ARGS += \
88                --enable-shared \
89                --enable-static \
90                --enable-ipv6 \
91                --with-randomdev="/dev/urandom" \
92                --disable-threads \
93                --with-openssl="$(STAGING_DIR)/usr" \
94                --with-libtool \
95                , \
96                BUILD_CC="$(TARGET_CC)" \
97
98define Build/Compile
99        rm -rf $(PKG_INSTALL_DIR)
100        mkdir -p $(PKG_INSTALL_DIR)
101        $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
102                BUILD_CC="$(HOSTCC)" \
103                CC="$(HOSTCC)" \
104                CFLAGS="-O2" \
105                LIBS="" \
106                gen
107        $(MAKE) -C $(PKG_BUILD_DIR) \
108        DESTDIR="$(PKG_INSTALL_DIR)" \
109                DESTDIR="$(PKG_INSTALL_DIR)" \
110                all install
111endef
112
113define Package/bind-libs/install
114        $(INSTALL_DIR) $(1)/usr/lib
115        $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
116endef
117
118define Package/bind-server/install
119        $(INSTALL_DIR) $(1)/usr/sbin
120        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
121        $(INSTALL_DIR) $(1)/etc
122        $(CP) ./files/bind $(1)/etc/
123        $(INSTALL_DIR) $(1)/etc/init.d
124        $(CP) ./files/named.init $(1)/etc/init.d/named
125        find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
126endef
127
128define Package/bind-client/install
129        $(INSTALL_DIR) $(1)/usr/bin
130        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
131endef
132
133define Package/bind-tools/install
134        $(INSTALL_DIR) $(1)/usr/bin
135        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
136        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
137        $(INSTALL_DIR) $(1)/usr/sbin
138        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
139        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
140        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
141        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
142        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
143        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
144endef
145
146define Package/bind-rndc/install
147        $(INSTALL_DIR) $(1)/usr/sbin
148        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
149        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
150endef
151
152define Package/bind-check/install
153        $(INSTALL_DIR) $(1)/usr/sbin
154        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
155        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
156endef
157
158define Package/bind-dnssec/install
159        $(INSTALL_DIR) $(1)/usr/sbin
160        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
161        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
162endef
163
164define Package/bind-host/install
165        $(INSTALL_DIR) $(1)/usr/bin
166        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
167endef
168
169define Package/bind-dig/install
170        $(INSTALL_DIR) $(1)/usr/bin
171        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
172endef
173
174$(eval $(call BuildPackage,bind-libs))
175$(eval $(call BuildPackage,bind-server))
176$(eval $(call BuildPackage,bind-client))
177$(eval $(call BuildPackage,bind-tools))
178$(eval $(call BuildPackage,bind-rndc))
179$(eval $(call BuildPackage,bind-check))
180$(eval $(call BuildPackage,bind-dnssec))
181$(eval $(call BuildPackage,bind-host))
182$(eval $(call BuildPackage,bind-dig))
Note: See TracBrowser for help on using the repository browser.