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