]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- cleanup databases doc install
[packages/pdns.git] / pdns.spec
1 Summary:        PowerDNS is a Versatile Database Driven Nameserver
2 Summary(pl.UTF-8):      PowerDNS to wielofunkcyjny serwer nazw korzystający z relacyjnych baz danych
3 Name:           pdns
4 Version:        3.4.1
5 Release:        2
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
9 # Source0-md5:  3259505caeaae2a5e9baf3255be437ff
10 Source1:        http://downloads.powerdns.com/documentation/%{name}.pdf
11 # Source1-md5:  cb69cd9655e4cb319c66adb2c733314d
12 Source2:        http://downloads.powerdns.com/documentation/%{name}.txt
13 Source3:        %{name}.init
14 Source4:        %{name}.conf
15 Source5:        %{name}.sysconfig
16 Patch0:         %{name}-int16.patch
17 Patch1:         %{name}-openldap-2.3.patch
18 URL:            http://www.powerdns.com/
19 BuildRequires:  autoconf >= 2.61
20 BuildRequires:  automake >= 1.11
21 BuildRequires:  bison
22 BuildRequires:  boost-devel >= 1.35.0
23 BuildRequires:  flex
24 BuildRequires:  libpq++-devel
25 BuildRequires:  libstdc++-devel
26 BuildRequires:  libtool
27 BuildRequires:  lua-devel >= 5.1
28 BuildRequires:  mysql-devel
29 BuildRequires:  openldap-devel >= 2.4.6
30 BuildRequires:  polarssl-devel >= 1.1
31 BuildRequires:  rpmbuild(macros) >= 1.268
32 BuildRequires:  sed >= 4.0
33 BuildRequires:  sqlite3-devel
34 BuildRequires:  zlib-devel
35 Requires(post): sed >= 4.0
36 Requires(post,preun):   /sbin/chkconfig
37 Requires(postun):       /usr/sbin/groupdel
38 Requires(postun):       /usr/sbin/userdel
39 Requires(pre):  /bin/id
40 Requires(pre):  /usr/bin/getgid
41 Requires(pre):  /usr/sbin/groupadd
42 Requires(pre):  /usr/sbin/useradd
43 Requires:       rc-scripts
44 Provides:       group(djbdns)
45 Provides:       nameserver
46 Provides:       user(pdns)
47 Obsoletes:      powerdns
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 PowerDNS is a versatile nameserver which supports a large number of
52 different backends ranging from simple zonefiles to relational
53 databases and load balancing/failover algorithms.
54
55 %description -l pl.UTF-8
56 PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
57 od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
58 danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
59 i przełączania w wypadku awarii.
60
61 %package backend-pipe
62 Summary:        PowerDNS support for custom pipe backend
63 Summary(pl.UTF-8):      Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
64 Group:          Development/Libraries
65 Requires:       %{name} = %{version}-%{release}
66
67 %description backend-pipe
68 This package allows creation of own backend using simple STDIN/STDOUT
69 API. Example backend script in Perl is provided in package
70 documentation.
71
72 %description backend-pipe -l pl.UTF-8
73 Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
74 stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
75 Perlu został dołączony do dokumentacji pakietu.
76
77 %package backend-gpgsql
78 Summary:        PowerDNS support for PostgreSQL
79 Summary(pl.UTF-8):      Obsługa baz PostgreSQL dla PowerDNS-a
80 Group:          Development/Libraries
81 Requires:       %{name} = %{version}-%{release}
82
83 %description backend-gpgsql
84 This package allows zone storage in PostgreSQL relational db tables.
85
86 %description backend-gpgsql -l pl.UTF-8
87 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
88 relacyjnej bazy danych PostgreSQL.
89
90 %package backend-gmysql
91 Summary:        PowerDNS support for MySQL
92 Summary(pl.UTF-8):      Obsługa baz MySQL dla PowerDNS-a
93 Group:          Development/Libraries
94 Requires:       %{name} = %{version}-%{release}
95
96 %description backend-gmysql
97 This package allows zone storage in MySQL relational db tables.
98
99 %description backend-gmysql -l pl.UTF-8
100 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
101 relacyjnej bazy danych MySQL.
102
103 %package backend-gsqlite3
104 Summary:        PowerDNS support for SQLite 3
105 Summary(pl.UTF-8):      Obsługa baz SQLite 3 dla PowerDNS-a
106 Group:          Development/Libraries
107 Requires:       %{name} = %{version}-%{release}
108
109 %description backend-gsqlite3
110 This package allows zone storage in SQLite 3 relational db tables.
111
112 %description backend-gsqlite3 -l pl.UTF-8
113 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
114 relacyjnej bazy danych SQLite 3.
115
116 %package backend-ldap
117 Summary:        PowerDNS support for LDAP
118 Summary(pl.UTF-8):      Obsługa LDAP dla PowerDNS-a
119 Group:          Development/Libraries
120 Requires:       %{name} = %{version}-%{release}
121
122 %description backend-ldap
123 This package allows zone storage in LDAP directory.
124
125 %description backend-ldap -l pl.UTF-8
126 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
127 LDAP.
128
129 %prep
130 %setup -q
131 %patch0 -p1
132 %patch1 -p1
133 cp %{SOURCE1} .
134 cp %{SOURCE2} .
135 cp %{SOURCE4} .
136
137 %if "%{_lib}" != "lib"
138 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
139 %endif
140
141 %build
142 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
143 %{__libtoolize}
144 %{__aclocal} -I .
145 %{__autoconf}
146 %{__automake}
147 %configure \
148         --sysconfdir=%{_sysconfdir}/%{name} \
149         --disable-static \
150         --with-lua \
151         --with-pgsql-includes=%{_includedir} \
152         --with-pgsql-lib=%{_libdir} \
153         --with-mysql-includes=%{_includedir} \
154         --with-mysql-lib=%{_libdir} \
155         --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
156         --with-modules="" \
157         --with-system-polarssl \
158         --with-socketdir=/var/run
159
160 %{__make}
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
165
166 %{__make} install \
167         DESTDIR=$RPM_BUILD_ROOT
168
169 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
170 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
171 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
172
173 # useless - modules are dlopened by *.so
174 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
175
176 # we put that in using %doc
177 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %pre
183 %groupadd -g 32 djbdns
184 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
185
186 %post
187 # dirty hack so the config file is processed correctly, and server does not respawn
188 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
189
190 /sbin/chkconfig --add pdns
191 %service pdns restart
192
193 %preun
194 if [ "$1" = "0" ]; then
195         %service pdns stop
196         /sbin/chkconfig --del pdns
197 fi
198
199 %postun
200 if [ "$1" = "0" ]; then
201         %userremove pdns
202         %groupremove djbdns
203 fi
204
205 %files
206 %defattr(644,root,root,755)
207 %doc INSTALL README pdns.pdf pdns.txt
208 %attr(754,root,root) /etc/rc.d/init.d/%{name}
209 %dir %{_sysconfdir}/%{name}
210 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
211 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
212 %attr(755,root,root) %{_sbindir}/*
213 %attr(755,root,root) %{_bindir}/*
214 %dir %{_libdir}/%{name}
215 %{_mandir}/man8/*
216
217 %files backend-gmysql
218 %defattr(644,root,root,755)
219 %doc modules/gmysqlbackend/*schema.mysql.sql
220 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
221
222 %files backend-gpgsql
223 %defattr(644,root,root,755)
224 %doc modules/gpgsqlbackend/*schema.pgsql.sql
225 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
226
227 %files backend-gsqlite3
228 %defattr(644,root,root,755)
229 %doc modules/gsqlite3backend/*schema.sqlite3.sql
230 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
231
232 %files backend-pipe
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
235
236 %files backend-ldap
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.068028 seconds and 3 git commands to generate.