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