packages: add missing conffiles define
[openwrt/svn-archive/archive.git] / net / djbdns / Makefile
1 #
2 # Copyright (C) 2007-2011 OpenWrt.org
3 # Original port by FreeWRT project.
4 #
5 # 2007 Alexander Tsvyashchenko Adapted FreeWRT port for OpenWRT (Trac ticket 2497)
6 # 2008 Some Danish guy Created a port for OpenWRT 7.09
7 # 20090403 jhalfmoon Modified and augmented existing packages to work on OpenWRT buildroot (v8.09)
8 #
9 # This is free software, licensed under the GNU General Public License v2.
10 # See /LICENSE for more information.
11 #
12
13 include $(TOPDIR)/rules.mk
14
15 PKG_NAME:=djbdns
16 PKG_VERSION:=1.05
17 PKG_RELEASE:=6
18
19 PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
20 PKG_SOURCE_URL:=http://cr.yp.to/djbdns/
21 PKG_MD5SUM:=3147c5cd56832aa3b41955c7a51cbeb2
22 PKG_BUILD_DEPENDS:=daemontools ucspi-tcp
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/djbdns/Default
27 SECTION:=net
28 CATEGORY:=Network
29 URL:=http://cr.yp.to/djbdns.html
30 SUBMENU:=IP Addresses and Names
31 # SUBMENU:=djbdns
32 endef
33
34 define Package/djbdns-base
35 $(call Package/djbdns/Default)
36 TITLE:=djbdns base configuration file
37 endef
38
39 define Package/djbdns-dnscache
40 $(call Package/djbdns/Default)
41 TITLE:=Recursive and forwarding caching name server
42 DEPENDS:= +djbdns-base
43 endef
44
45 define Package/djbdns-tinydns
46 $(call Package/djbdns/Default)
47 TITLE:=Authoritative name server
48 DEPENDS:= +djbdns-base
49 endef
50
51 define Package/djbdns-axfrdns
52 $(call Package/djbdns/Default)
53 TITLE:=Zone transfer server
54 DEPENDS:= +djbdns-base +djbdns-tinydns +ucspi-tcp
55 endef
56
57 define Package/djbdns-rbldns
58 $(call Package/djbdns/Default)
59 TITLE:=Real-time Block List name server
60 DEPENDS:= +djbdns-base
61 endef
62
63 define Package/djbdns-walldns
64 $(call Package/djbdns/Default)
65 TITLE:=Reverse DNS wall
66 DEPENDS:= +djbdns-base
67 endef
68
69 define Package/djbdns-tools
70 $(call Package/djbdns/Default)
71 TITLE:=Tools for testing and debugging DNS issues
72 endef
73
74 define Package/djdbns/description
75 djbdns is a collection of Domain Name System tools.
76 It includes software for all the fundamental DNS operations:
77 * DNS server: publishing addresses of Internet hosts.
78 * DNS cache: finding addresses of Internet hosts.
79 * DNS client: talking to a DNS cache.
80
81 Also included is a DNS client C library, several command-line
82 DNS client utilities, several DNS debugging tools.
83 endef
84
85 define Package/djbdns-base/description
86 The shared config file for the djbdns daemons.
87 endef
88
89 define Package/djbdns-dnscache/description
90 dnscache is a DNS cache.
91 It accepts recursive DNS queries from local clients such as web
92 browsers and mail transfer agents. It collects responses from
93 remote DNS servers. It caches the responses to save time later.
94 endef
95
96 define Package/djbdns-tinydns/description
97 tinydns is a DNS server.
98 It accepts iterative DNS queries from hosts around the Internet
99 and responds with locally configured information.
100 endef
101
102 define Package/djbdns-axfrdns/description
103 axfrdns is a DNS zone-transfer server.
104 It reads a zone-transfer request in DNS-over-TCP format
105 from its standard input and responds with locally configured
106 information.
107 endef
108
109 define Package/djbdns-rbldns/description
110 rbldns is an IP-address-listing DNS server.
111 It accepts iterative DNS queries from hosts around the Internet asking
112 about various IP addresses. It provides responses showing whether the
113 addresses are on a locally configured list, such as RBL or DUL.
114 endef
115
116 define Package/djbdns-walldns/description
117 walldns is a reverse DNS wall.
118 It accepts iterative DNS queries for in-addr.arpa domains from hosts
119 around the Internet and supplies generic responses that avoid
120 revealing local host information.
121 endef
122
123 define Package/djbdns-tools/description
124 Several command-line DNS client utilities and DNS debugging tools.
125 endef
126
127 define Build/Compile
128 TARGET_CC="$(TARGET_CC)" \
129 TARGET_CFLAGS="$(TARGET_CFLAGS)" \
130 TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
131 TARGET_RANLIB="$(TARGET_CROSS)ranlib" \
132 $(MAKE) -C $(PKG_BUILD_DIR)
133 endef
134
135 define Package/djbdns-base/install
136 $(INSTALL_DIR) $(1)/etc/config
137 $(INSTALL_DATA) ./files/djbdns.conf $(1)/etc/config/djbdns
138 endef
139
140 define Package/djbdns-base/conffiles
141 /etc/config/djbdns
142 endef
143
144 define Package/djbdns-dnscache/install
145 $(INSTALL_DIR) $(1)/usr/bin
146 (cd $(PKG_BUILD_DIR); \
147 $(INSTALL_BIN) dnscache pickdns pickdns-data $(1)/usr/bin)
148 $(INSTALL_DIR) $(1)/etc/init.d
149 $(INSTALL_BIN) ./files/dnscache.init $(1)/etc/init.d/dnscache
150 $(CP) -r ./files/dnscache $(1)/etc/
151 $(CP) $(PKG_BUILD_DIR)/dnsroots.global $(1)/etc/dnscache/
152 $(INSTALL_DIR) $(1)/etc/dnscache/ip
153 $(INSTALL_DIR) $(1)/etc/dnscache/servers
154 $(CP) $(PKG_BUILD_DIR)/dnsroots.global $(1)/etc/dnscache/servers/@
155 endef
156
157 define Package/djbdns-tinydns/install
158 $(INSTALL_DIR) $(1)/usr/bin
159 (cd $(PKG_BUILD_DIR); \
160 $(INSTALL_BIN) tinydns tinydns-data tinydns-edit tinydns-get $(1)/usr/bin)
161 $(INSTALL_DIR) $(1)/etc/init.d
162 $(INSTALL_BIN) ./files/tinydns.init $(1)/etc/init.d/tinydns
163 $(CP) -r ./files/tinydns $(1)/etc/
164 endef
165
166 define Package/djbdns-axfrdns/install
167 $(INSTALL_DIR) $(1)/usr/bin
168 (cd $(PKG_BUILD_DIR); \
169 $(INSTALL_BIN) axfrdns axfr-get $(1)/usr/bin)
170 $(INSTALL_DIR) $(1)/etc/init.d
171 $(INSTALL_BIN) ./files/axfrdns.init $(1)/etc/init.d/axfrdns
172 $(CP) -r ./files/axfrdns $(1)/etc/
173 endef
174
175 define Package/djbdns-rbldns/install
176 $(INSTALL_DIR) $(1)/usr/bin
177 (cd $(PKG_BUILD_DIR); \
178 $(INSTALL_BIN) rbldns rbldns-data $(1)/usr/bin)
179 $(INSTALL_DIR) $(1)/etc/init.d
180 $(INSTALL_BIN) ./files/rbldns.init $(1)/etc/init.d/rbldns
181 $(CP) -r ./files/rbldns $(1)/etc/
182 endef
183
184 define Package/djbdns-walldns/install
185 $(INSTALL_DIR) $(1)/usr/bin
186 (cd $(PKG_BUILD_DIR); \
187 $(INSTALL_BIN) walldns $(1)/usr/bin)
188 $(INSTALL_DIR) $(1)/etc/init.d
189 $(INSTALL_BIN) ./files/walldns.init $(1)/etc/init.d/walldns
190 endef
191
192 define Package/djbdns-tools/install
193 $(INSTALL_DIR) $(1)/usr/bin
194 (cd $(PKG_BUILD_DIR); \
195 $(INSTALL_BIN) dnsfilter dnsip dnsipq dnsmx dnsname dnsnamex dnsq \
196 dnsqr dnstrace dnstracesort dnstxt random-ip \
197 $(1)/usr/bin)
198 $(INSTALL_BIN) ./files/dnsroots-update $(1)/usr/bin/
199 $(INSTALL_BIN) ./files/dnsqrx $(1)/usr/bin/
200 endef
201
202 $(eval $(call BuildPackage,djbdns-base))
203 $(eval $(call BuildPackage,djbdns-tinydns))
204 $(eval $(call BuildPackage,djbdns-dnscache))
205 $(eval $(call BuildPackage,djbdns-axfrdns))
206 $(eval $(call BuildPackage,djbdns-rbldns))
207 $(eval $(call BuildPackage,djbdns-walldns))
208 $(eval $(call BuildPackage,djbdns-tools))
209