summaryrefslogtreecommitdiff
path: root/bind.spec
blob: acec60239a9050a00325b64ce3cb12c87465a2c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
Summary:	BIND - DNS name server
Summary(de):	BIND - DNS-Namenserver  
Summary(fr):	BIND - serveur de noms DNS
Summary(pl):	BIND - serwer nazw DNS
Summary(tr):	DNS alan adý sunucusu
Name:		bind
Version:	9.1.0
Release:	2
Epoch:		3
License:	Distributable
Group:		Networking/Daemons
Group(de):	Netzwerkwesen/Server
Group(pl):	Sieciowe/Serwery
Source0:	ftp://ftp.isc.org/isc/bind9/%{version}/%{name}-%{version}.tar.gz
Source1:	%{name}-conf.tar.gz
Source2:	named.init
Source3:	named.sysconfig
Source4:	named.logrotate
Source5:	nslookup.8
Source6:	resolver.5
BuildRequires:	sed
BuildRequires:	flex
BuildRequires:	openssl-devel
BuildRequires:	byacc
Prereq:		/sbin/chkconfig
Requires:	rc-scripts >= 0.2.0
Requires:	%{name}-libs = %{version}
Obsoletes:	caching-nameserver
Conflicts:	%{name}-chroot
Conflicts:	kernel < 2.2.18
URL:		http://www.isc.org/products/BIND/bind9.html
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
BIND (Berkeley Internet Name Domain) is an implementation of the DNS
(Domain Name System) protocols. BIND includes a DNS server (named),
which resolves host names to IP addresses, and a resolver library
(routines for applications to use when interfacing with DNS). A DNS
server allows clients to name resources or objects and share the
information with other network machines. The named DNS server can be
used on workstations as a caching name server, but is generally only
needed on one machine for an entire network. Note that the
configuration files for making BIND act as a simple caching nameserver
are included in the caching-nameserver package.

Install the bind package if you need a DNS server for your network. If
you want bind to act a caching name server, you will also need to
install the caching-nameserver package.

%description -l de
Enthält den Namen-Server, der zum Umwandeln von Host-Namen in
IP-Adressen und umgekehrt verwendet wird. Er kann auf Workstations als
caching Namen-Server verwendet werden, ist aber i.d.R. nur auf einem
Recher des Netzwerks erforderlich.

%description -l fr
Contient le serveur de noms named, utilisé pour définir les
traductions nom d'hôte vers adresse IP (et vice versa). Il peut ętre
utilisé sur les stations de travail comme serveur de nom en cache mais
n'est souvent nécessaire que sur une machine pour un réseau entier.

%description -l pl
Pakiet ten zawiera demona named, który służy do zmieniania nazw
komputerów na numery IP i odwrotnie. Może być on używany na stacjach
roboczych jako bufor odwołań do serwisu nazw (caching name server),
ale generalnie wystarczy tylko jedna jednostka wyposażona w ten
program na fragment sieci.

%description -l tr
Bu paket, makina adýný IP numarasýna (ya da tersi) çevirmek için
kullanýlan alan adý sunucusunu içerir. Ýţ istasyonlarýnda bir önbellek
isim sunucusu olarak da kullanýlabilir ama genellikle bütün bir ađ
için sadece bir makina üzerinde kurulur.

%package utils
Summary:	DNS utils - host, dig, dnsquery, nslookup
Summary(de):	DNS-Utils - Host, Dig, Dnsquery, Nslookup 
Summary(fr):	Utilitaires DNS - host, dig, dnsquery, nslookup
Summary(pl):	Narzędzia DNS - host, dig, dnsquery, nslookup
Summary(tr):	DNS araçlarý - host, dig, dnsquery, nslookup
Group:		Networking/Utilities
Group(de):	Netzwerkwesen/Werkzeuge
Group(pl):	Sieciowe/Narzędzia
Requires:	%{name}-libs = %{version}

%description utils
Bind-utils contains a collection of utilities for querying DNS (Domain
Name Service) name servers to find out information about Internet
hosts. These tools will provide you with the IP addresses for given
host names, as well as other information about registered domains and
network addresses.

You should install bind-utils if you need to get information from DNS
name servers.

%description -l de utils
Dienstprogrammsammlung zum Abfragen von Namen-Servern und Hosts. Diese
Tools bestimmen die IP-Adresse eines angegebenen Host-Namen und finden
Informationen über registrierte Domains und Netzwerk-Adressen.

%description -l fr utils
Ensemble d'utilitaires pour interroger les serveurs de noms et
rechercher des hôtes. Ces outils vous permettent de déterminer les
adresses IP pour des noms d'hôtes donnés, et trouver des informations
sur les noms de domaine déclarés et les adresses réseau.

%description -l pl utils
Pakiet ten zawiera zbiór aplikacji umożliwiających odpytywanie
serwerów nazw z innych domen w celu uzyskania informacji o komupterach
i ich adresach IP.

%description -l tr utils
Bu pakette isim sunucularýný sorgulamak ve makina adreslerini çözmek
için kullanýlan araçlar bulunmaktadýr.

%package libs
Summary:	DNS libraries
Summary(pl):	Biblioteki DNS
Group:		Libraries
Group(de):	Libraries
Group(fr):	Librairies
Group(pl):	Biblioteki

%description libs
The bind-libs package contains all libraries required for
running BIND and bind utils.

%package devel
Summary:	DNS development includes and libs
Summary(pl):	Pliki nagłówkowe i biblioteka statyczna
Group:		Development/Libraries
Group(de):	Entwicklung/Libraries
Group(fr):	Development/Librairies
Group(pl):	Programowanie/Biblioteki
Requires:	%{name}-libs = %{version}

%description devel
The bind-devel package contains all the include files and the library
required for DNS (Domain Name Service) development for BIND.

You should install bind-devel if you want to develop bind DNS
applications. If you install bind-devel, you'll also need to install
bind.

%description -l pl devel
Pakiet zawiera pliki nagłówkowe i bibliotekę statyczną. Jeżeli
będziesz pisał programy pod binda, lub kompilował kod źródłowy
oprogramowania korzystającego z tych plików nagłówkowych czy
biblioteki powinieneś zainstalować ten pakiet.

%package static
Summary:	DNS static libs
Summary(pl):	Biblioteka statyczna
Group:		Development/Libraries
Group(de):	Entwicklung/Libraries
Group(fr):	Development/Librairies
Group(pl):	Programowanie/Biblioteki

%description static
Static bind libraries.

%description -l pl static
Statyczne biblioteki binda.

%prep
%setup -q -a1

%build
autoconf
%configure \
	--with-openssl=%{_prefix} \
	--with-libtool \
	--enable-ipv6
%{__make}

%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT{%{_includedir},%{_bindir},%{_sbindir},%{_includedir}}
install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,logrotate.d,sysconfig}
install -d $RPM_BUILD_ROOT%{_mandir}/man{1,3,5,8}
install -d $RPM_BUILD_ROOT%{_var}/{lib/named/{M,S,dev,etc},run,log}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install doc/man/bin/*.1			$RPM_BUILD_ROOT%{_mandir}/man1
install doc/man/bin/*.5			$RPM_BUILD_ROOT%{_mandir}/man5
install %{SOURCE6}			$RPM_BUILD_ROOT%{_mandir}/man5
install doc/man/{bin/*.8,dnssec/*.8}	$RPM_BUILD_ROOT%{_mandir}/man8
install %{SOURCE5}			$RPM_BUILD_ROOT%{_mandir}/man8

install conf-pld/*.zone			$RPM_BUILD_ROOT%{_var}/lib/named/M
install conf-pld/*.hint			$RPM_BUILD_ROOT%{_var}/lib/named
install conf-pld/*.conf			$RPM_BUILD_ROOT%{_var}/lib/named/etc
install bin/tests/named.conf		EXAMPLE-CONFIG-named
install bin/tests/ndc.conf		EXAMPLE-CONFIG-ndc
install %{SOURCE2}			$RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/named
install %{SOURCE3}			$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/named
install %{SOURCE4}			$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/named
ln -s %{_var}/lib/named/etc/named.conf	$RPM_BUILD_ROOT%{_sysconfdir}/named.conf
ln -s %{_var}/lib/named/named.log	$RPM_BUILD_ROOT%{_var}/log/named
touch		$RPM_BUILD_ROOT%{_var}/lib/named/{named.log,dev/{random,null}}

gzip -9nf README EXAMPLE-CONFIG-* doc/misc/*

%pre
if [ -f %{_sysconfdir}/named.boot ]; then
	cp %{_sysconfdir}/named.boot /etc/named.boot.2conf
	mv -f %{_sysconfdir}/named.boot /etc/named.rpmsave
	echo "Warrnig:%{_sysconfdir}/named.boot saved as /etc/named.rpmsave" 1>&2
fi
if ! id -g named > /dev/null 2>&1 ; then
	%{_sbindir}/groupadd -g 58 named
fi
if ! id -u named > /dev/null 2>&1 ; then
	%{_sbindir}/useradd -u 58 -g 58 -d /dev/null -s /bin/false -c "BIND user" named
fi

%post
/sbin/chkconfig --add named

if [ -f /var/lock/subsys/named ]; then
	%{_sysconfdir}/rc.d/init.d/named restart 1>&2
else
	echo "Type \"%{_sysconfdir}/rc.d/init.d/named start\" to start named" 1>&2
fi
umask 117
/bin/touch		%{_var}/lib/named/named.log
chown named.named	%{_var}/lib/named/named.log
ln -sf %{_var}/lib/named/named.log	%{_var}/log/named

umask 022
/bin/mknod -m u+rw,go+r		%{_var}/lib/named/dev/random c 1 8 > /dev/null 2>&1
/bin/mknod -m a+rw		%{_var}/lib/named/dev/null c 1 3 > /dev/null 2>&1

%preun
if [ "$1" = "0" ]; then
	if [ -f /var/lock/subsys/named ]; then
		%{_sysconfdir}/rc.d/init.d/named stop 1>&2
	fi
	/sbin/chkconfig --del named
fi    

%postun
if [ "$1" = "0" ]; then
	%{_sbindir}/userdel named
	%{_sbindir}/groupdel named
fi

%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc *.gz doc/misc/*.gz doc/arm/*

%attr(754,root,root)  %{_sysconfdir}/rc.d/init.d/named
%attr(640,root,root)  %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/named
%attr(640,root,named) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/named.conf
%attr(640,root,root)  %config %verify(not size mtime md5) %{_sysconfdir}/logrotate.d/named

%attr(755,root,root) %{_sbindir}/*
%attr(755,root,root) %{_bindir}/nsupdate

%{_mandir}/man8/dns*
%{_mandir}/man8/lwres*
%{_mandir}/man8/named*
%{_mandir}/man8/rndc*
%{_mandir}/man5/rndc*
%{_mandir}/man8/nsupdate*

%attr(770,root,named) %dir %{_var}/lib/named
%attr(750,root,named) %dir %{_var}/lib/named/M
%attr(770,root,named) %dir %{_var}/lib/named/S
%attr(770,root,named) %dir %{_var}/lib/named/dev

%{_var}/lib/named/M/*
%{_var}/lib/named/root.*
%{_var}/lib/named/etc/*

%ghost %{_var}/lib/named/dev/*
%attr(660,named,named) %ghost %{_var}/log/named

%files utils
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/dig
%attr(755,root,root) %{_bindir}/host
%attr(755,root,root) %{_bindir}/nslookup
%{_mandir}/man1/dig.1*
%{_mandir}/man1/host.1*
%{_mandir}/man8/nslookup.8*

%files libs
%defattr(644,root,root,755)
%attr(755,root,root)  %{_libdir}/*.so.*.*

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/*.sh
%{_includedir}/*
%{_libdir}/*.so

%files static
%defattr(644,root,root,755)
%{_libdir}/*.a