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