]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- no longer requires libpq++-static
[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.15
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
9 # Source0-md5:  3465694b9638c29f19a25dd5b0a77559
10 Source1:        http://downloads.powerdns.com/documentation/%{name}.pdf
11 # Source1-md5:  d7adf31d793735251c416d6ef5075cfa
12 Source2:        http://downloads.powerdns.com/documentation/%{name}.txt
13 Source3:        %{name}.init
14 Source4:        %{name}.conf
15 Source5:        %{name}.sysconfig
16 Patch0:         %{name}-unistd.patch
17 Patch1:         %{name}-ldap_utils.patch
18 URL:            http://www.powerdns.com/
19 BuildRequires:  bison
20 BuildRequires:  flex
21 BuildRequires:  libstdc++-devel
22 BuildRequires:  mysql-devel
23 BuildRequires:  zlib-devel
24 BuildRequires:  openldap-devel
25 PreReq:         rc-scripts
26 Requires(pre):  /bin/id
27 Requires(pre):  /usr/sbin/useradd
28 Requires(pre):  /usr/sbin/groupadd
29 Requires(post,preun):   /sbin/chkconfig
30 Requires(postun):       /usr/sbin/userdel
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Provides:       nameserver
33 Obsoletes:      powerdns
34
35 %description
36 PowerDNS is a versatile nameserver which supports a large number of
37 different backends ranging from simple zonefiles to relational
38 databases and load balancing/failover algorithms.
39
40 %description -l pl
41 PowerDNS to wielofunkcyjny serwer nazw posiadaj±cy du¿± liczbê wtyczek
42 od prostych stref (a'la BIND) pocz±wszy, a na relacyjnych bazach
43 danych skoñczywszy oraz zawieraj±cy algorytmy zrównowa¿enia obci±¿enia
44 i prze³±czania w wypadku awarii.
45
46 %package backend-pipe
47 Summary:        PowerDNS support for custom pipe backend
48 Summary(pl):    Wsparcie PowerDNS dla w³asnego mechanizmu przechowywania stref
49 Group:          Development/Libraries
50
51 %description backend-pipe
52 This package allows creation of own backend using simple STDIN/STDOUT
53 API. Example backend script in perl is provided in package
54 documentation.
55
56 %description backend-pipe -l pl
57 Ten pakiet pozwala na utworzenie w³asnego mechanizmu przechowywania
58 stref za pomoc¹ prostego interfejsu STDIN/STDOUT. Przyk³adowy skrypt w
59 perlu zosta³ do³±czony do dokumentacji pakietu.
60
61 %package backend-gpgsql
62 Summary:        PowerDNS support for PostgreSQL
63 Summary(pl):    Wsparcie PowerDNS dla baz PostgresQL
64 Group:          Development/Libraries
65 Requires:       postgresql
66
67 %description backend-gpgsql
68 This package allows zone storage in PostgreSQL relational db tables.
69
70 %description backend-gpgsql -l pl
71 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
72 relacyjnej bazy danych PostgreSQL.
73
74 %package backend-gmysql
75 Summary:        PowerDNS support for MySQL
76 Summary(pl):    Wsparcie PowerDNS dla baz MySQL
77 Group:          Development/Libraries
78 Requires:       mysql
79
80 %description backend-gmysql
81 This package allows zone storage in MySQL relational db tables.
82
83 %description backend-gmysql -l pl
84 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
85 relacyjnej bazy danych MySQL.
86
87 %package backend-ldap
88 Summary:        PowerDNS support for LDAP
89 Summary(pl):    Wsparcie PowerDNS dla baz LDAP
90 Group:          Development/Libraries
91 Requires:       openldap
92
93 %description backend-ldap
94 This package allows zone storage in LDAP directory.
95
96 %description backend-ldap -l pl
97 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu LDAP.
98
99 %prep
100 %setup -q
101 %patch0 -p1
102 %patch1 -p1
103 cp %{SOURCE1} .
104 cp %{SOURCE2} .
105
106 %build
107 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
108 %configure \
109         --libdir=%{_libdir}/%{name} \
110         --sysconfdir=%{_sysconfdir}/%{name} \
111         --with-socketdir=/var/run \
112         --with-dynmodules="gmysql gpgsql pipe ldap" \
113         --with-modules="" \
114         --enable-mysql \
115         --enable-pgsql \
116         --with-pgsql-lib=/usr/lib \
117         --with-pgsql-includes=%{_includedir} \
118         --enable-ldap \
119         --disable-static
120
121 %{__make}
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{%{_initrddir},%{_sysconfdir}/%{name},/etc/sysconfig}
126
127 %{__make} install \
128         DESTDIR=$RPM_BUILD_ROOT
129
130 install %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/%{name}
131 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
132 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
133
134 # useless - modules are dlopened by *.so
135 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
136
137 %clean
138 rm -rf $RPM_BUILD_ROOT
139
140 %pre
141 if [ -n "`getgid djbdns`" ]; then
142         if [ "`getgid djbdns`" != "32" ]; then
143                 echo "Error: group djbdns doesn't have gid=32. Correct this before installing pdns." 1>&2
144                 exit 1
145         fi
146 else
147         /usr/sbin/groupadd -g 32 -r -f djbdns
148 fi
149 if [ -n "`id -u pdns 2>/dev/null`" ]; then
150         if [ "`id -u pdns`" != "30" ]; then
151                 echo "Error: user pdns doesn't have uid=30. Correct this before installing pdns." 1>&2
152                 exit 1
153         fi
154 else
155         /usr/sbin/useradd -u 30 -r -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
156 fi
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/^ *//g' /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         /usr/sbin/userdel pdns
183 fi
184
185 %files
186 %defattr(644,root,root,755)
187 %doc ChangeLog HACKING INSTALL README TODO WARNING pdns.pdf pdns.txt
188 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}/%{name}.conf
189 %config(noreplace) %attr(0754,root,root) %{_initrddir}/%{name}
190 %attr(640,root,root)  %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/pdns
191 %dir %{_sysconfdir}/%{name}
192 %attr(755,root,root) %{_sbindir}/*
193 %attr(755,root,root) %{_bindir}/*
194 %{_mandir}/man8/*
195
196 %files backend-gmysql
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
199
200 %files backend-gpgsql
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
203
204 %files backend-pipe
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
207
208 %files backend-ldap
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.103967 seconds and 4 git commands to generate.