1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = Networking/Tools
11 url = http://www.isc.org/products/BIND/
13 summary = BIND provides tools for the DNS.
16 BIND (Berkeley Internet Name Domain or named) is the most commonly used
17 DNS server on the Internet, especially on Unix-like systems.
20 source_dl = ftp://ftp.isc.org/isc/bind/%{version}/
26 # Apply patches in a special order.
30 bind-9.3.2-redhat_doc.patch \
32 bind98-rh725741.patch \
33 bind-9.5-overflow.patch \
34 bind-9.5-dlz-64bit.patch \
35 bind-9.5-libidn.patch \
36 bind-9.5-libidn2.patch \
37 bind-9.5-libidn3.patch \
38 bind-9.5-parallel-build.patch \
39 bind95-rh461409.patch\
40 bind-96-libtool2.patch \
41 bind-95-rh452060.patch \
42 bind97-dist-pkcs11.patch \
43 bind97-rh478718.patch \
44 bind97-rh570851.patch \
45 bind97-exportlib.patch \
46 bind97-rh645544.patch \
47 bind97-rh699951.patch \
48 bind97-rh693982.patch \
49 bind97-rh700097.patch \
50 bind97-rh714049.patch \
51 bind98-dlz_buildfix.patch \
67 configure_options += \
70 --localstatedir=/var \
75 --disable-openssl-version-check \
77 --with-export-libdir=/lib/ \
78 --with-export-includedir=/usr/include/ \
79 --includedir=/usr/include/bind9/ \
80 --with-pkcs11=/usr/lib/pkcs11/PKCS11_API.so \
85 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz
87 # Create m4 directory.
88 cd %{DIR_APP} && mkdir -pv m4
94 sed -i -e 's/RELEASEVER=\(.*\)/RELEASEVER=\1-%{DISTRO_NAME}-%{version}-%{release}/' version
96 # Regenerate build environment
103 # Compress doc files.
106 # Create directory layout.
107 mkdir -pv %{BUILDROOT}/usr/lib/bind
108 mkdir -pv %{BUILDROOT}/var/named/{slaves,data,dynamic}
109 mkdir -pv %{BUILDROOT}/usr/share/man/{man1,man5,man8}
110 mkdir -pv %{BUILDROOT}/run/named
111 mkdir -pv %{BUILDROOT}/var/log
113 # Create named chroot environment.
114 mkdir -pv %{BUILDROOT}/var/named/chroot/{dev,etc,var}
115 mkdir -pv %{BUILDROOT}/var/named/chroot/var/{log,named,run/named,tmp}
116 mkdir -pv %{BUILDROOT}/var/named/chroot/etc/{pki/dnssec-keys,named}
117 mkdir -pv %{BUILDROOT}/var/named/chroot/usr/lib/bind
118 mkdir -pv %{BUILDROOT}/var/named/chroot/dev/null
119 mkdir -pv %{BUILDROOT}/var/named/chroot/dev/random
120 mkdir -pv %{BUILDROOT}/var/named/chroot/dev/zero
121 mkdir -pv %{BUILDROOT}/var/named/chroot/etc/localtime
123 touch %{BUILDROOT}/var/named/chroot/etc/named.conf
126 make DESTDIR=%{BUILDROOT} install
128 # Remove RPATH from libraries.
129 chrpath --delete %{BUILDROOT}/lib*/*export*.so.*
131 # Remove unwanted files
132 rm -rvf %{BUILDROOT}/etc/bind.keys
134 # Create ghost config files
135 touch %{BUILDROOT}/var/log/named.log
137 # Configuration files
138 tar -C %{BUILDROOT} -xaf %{DIR_DL}/bind-config-8.tar.bz2
139 touch %{BUILDROOT}/etc/rndc.key
140 touch %{BUILDROOT}/etc/rndc.conf
142 mkdir %{BUILDROOT}/etc/named
143 install -m 644 bind.keys %{BUILDROOT}/etc/named.iscdlv.key
144 install -m 644 %{DIR_SOURCE}/trusted-key.key %{BUILDROOT}/etc/trusted-key.key
146 # Recreate symlinks for export libraries
147 rm -rf %{BUILDROOT}/lib/lib*-export.so
149 ln -svf ../../lib/libdns-export.so.81 %{BUILDROOT}/usr/lib/libdns-export.so
150 ln -svf ../../lib/libirs-export.so.80 %{BUILDROOT}/usr/lib/libirs-export.so
151 ln -svf ../../lib/libisccfg-export.so.82 %{BUILDROOT}/usr/lib/libisccfg-export.so
152 ln -svf ../../lib/libisc-export.so.83 %{BUILDROOT}/usr/lib/libisc-export.so
163 prerequires += shadow-utils
166 # Create unprivileged user and group.
167 getent group named > /dev/null || groupadd -r named
168 getent passwd named > /dev/null || \
169 useradd -r -g named -d /var/named -s /sbin/nologin \
170 -c "User for bind DNS server" named
174 # XXX Add systemd scriptlet if a service file becomes available
177 package %{name}-utils
178 summary = Utilities for querying bind DNS name server.
179 description = %{summary}
186 /usr/share/man/man1/dig.1*
187 /usr/share/man/man1/host.1*
188 /usr/share/man/man1/nslookup.1*
189 /usr/share/man/man1/nsupdate.1*
193 package %{name}-chroot
194 summary = Chroot environment for bind DNS servers.
195 description = %{summary}
206 package %{name}-devel