]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - bind/bind.nm
bind: Fix typo in scriptlet.
[people/ms/ipfire-3.x.git] / bind / bind.nm
CommitLineData
d918082a 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
d918082a
MT
4###############################################################################
5
802ea3af 6name = bind
ac29baf9 7version = 9.8.1
f0a33aeb 8release = 2
d918082a 9
802ea3af
MT
10groups = Networking/Tools
11url = http://www.isc.org/products/BIND/
12license = Proprietary
13summary = BIND provides tools for the DNS.
d918082a 14
802ea3af
MT
15description
16 BIND (Berkeley Internet Name Domain or named) is the most commonly used
d918082a 17 DNS server on the Internet, especially on Unix-like systems.
802ea3af 18end
d918082a 19
802ea3af 20source_dl = ftp://ftp.isc.org/isc/bind/%{version}/
d918082a 21
ac29baf9
SS
22sources = \
23 bind-9.8.1.tar.gz \
24 bind-config-8.tar.bz2
25
26# Apply patches in a special order.
27patches = \
28 bind-nonexec.patch \
29 bind-9.5-PIE.patch \
30 bind-9.3.2-redhat_doc.patch \
31 bind-96-dyndb.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 \
52 bind98-rh735103.patch
53
802ea3af
MT
54build
55 requires
ac29baf9
SS
56 autoconf
57 automake
58 chrpath
802ea3af 59 db4-devel
ac29baf9
SS
60 libtool
61 libcap-devel
62 libidn-devel
63 pkg-config
802ea3af
MT
64 openssl-devel
65 end
e698b321 66
ac29baf9
SS
67 configure_options += \
68 --with-libtool \
69 --sysconfdir=/etc \
70 --localstatedir=/var \
71 --enable-threads \
72 --enable-ipv6 \
73 --with-pic \
74 --disable-static \
75 --disable-openssl-version-check \
76 --enable-exportlib \
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 \
81 --with-gssapi=yes \
82 --disable-isc-spnego
83
84 prepare
85 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz
86
87 # Create m4 directory.
88 cd %{DIR_APP} && mkdir -pv m4
d918082a 89
ac29baf9
SS
90 # Apply all patches.
91 %{MACRO_PATCHES}
92
93 # Branding.
94 sed -i -e 's/RELEASEVER=\(.*\)/RELEASEVER=\1-%{DISTRO_NAME}-%{version}-%{release}/' version
95
96 # Regenerate build environment
97 libtoolize -c -f
98 aclocal -I m4 --force
99 autoconf -f
802ea3af
MT
100 end
101
102 install
ac29baf9
SS
103 # Compress doc files.
104 gzip -9 doc/rfc/*
105
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
112
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
122
123 touch %{BUILDROOT}/var/named/chroot/etc/named.conf
124
125 # Run make install
126 make DESTDIR=%{BUILDROOT} install
127
128 # Remove RPATH from libraries.
129 chrpath --delete %{BUILDROOT}/lib*/*export*.so.*
130
131 # Remove unwanted files
132 rm -rvf %{BUILDROOT}/etc/bind.keys
133
134 # Create ghost config files
135 touch %{BUILDROOT}/var/log/named.log
136
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
141
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
145
146 # Recreate symlinks for export libraries
147 rm -rf %{BUILDROOT}/lib/lib*-export.so
148
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
802ea3af
MT
153 end
154end
155
156packages
ac29baf9
SS
157 package %{name}
158 requires
159 bind-utils
160 bind-chroot
161 end
162
163 prerequires += shadow-utils
164
165 script prein
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
f0a33aeb 171 exit 0
ac29baf9
SS
172 end
173
174 # XXX Add systemd scriptlet if a service file becomes available
175 end
176
802ea3af 177 package %{name}-utils
ac29baf9
SS
178 summary = Utilities for querying bind DNS name server.
179 description = %{summary}
180
181 files
182 /usr/bin/dig
183 /usr/bin/host
184 /usr/bin/nslookup
185 /usr/bin/nsupdate
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*
190 end
191 end
192
193 package %{name}-chroot
194 summary = Chroot environment for bind DNS servers.
195 description = %{summary}
196
197 files
198 /var/named/chroot
199 end
200 end
201
202 package %{name}-libs
203 template LIBS
204 end
205
206 package %{name}-devel
207 template DEVEL
802ea3af
MT
208 end
209end