]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
0e1627ebe4f5beee08632572d92c9fddbc5c372e
[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.16
5 Release:        2
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
9 # Source0-md5:  7e9a859a5a21996dbf7b31cd61731dbc
10 Source1:        http://downloads.powerdns.com/documentation/%{name}.pdf
11 # Source1-md5:  72cce8fb180c3a70437187ff0912c2a3
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 URL:            http://www.powerdns.com/
18 BuildRequires:  bison
19 BuildRequires:  flex
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  libpq++-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 cp %{SOURCE1} .
103 cp %{SOURCE2} .
104
105 %build
106 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
107 %configure \
108         --libdir=%{_libdir}/%{name} \
109         --sysconfdir=%{_sysconfdir}/%{name} \
110         --with-socketdir=/var/run \
111         --with-dynmodules="gmysql gpgsql pipe ldap" \
112         --with-modules="" \
113         --enable-mysql \
114         --enable-pgsql \
115         --with-pgsql-lib=%{_libdir} \
116         --with-pgsql-includes=%{_includedir} \
117         --with-mysql-lib=%{_libdir} \
118         --with-mysql-includes=%{_includedir} \
119         --enable-ldap \
120         --disable-static
121
122 %{__make}
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126 install -d $RPM_BUILD_ROOT{%{_initrddir},%{_sysconfdir}/%{name},/etc/sysconfig}
127
128 %{__make} install \
129         DESTDIR=$RPM_BUILD_ROOT
130
131 install %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/%{name}
132 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
133 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
134
135 # useless - modules are dlopened by *.so
136 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %pre
142 if [ -n "`getgid djbdns`" ]; then
143         if [ "`getgid djbdns`" != "32" ]; then
144                 echo "Error: group djbdns doesn't have gid=32. Correct this before installing pdns." 1>&2
145                 exit 1
146         fi
147 else
148         /usr/sbin/groupadd -g 32 -r -f djbdns
149 fi
150 if [ -n "`id -u pdns 2>/dev/null`" ]; then
151         if [ "`id -u pdns`" != "30" ]; then
152                 echo "Error: user pdns doesn't have uid=30. Correct this before installing pdns." 1>&2
153                 exit 1
154         fi
155 else
156         /usr/sbin/useradd -u 30 -r -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
157 fi
158
159 %post
160 # dirty hack so the config file is processed correctly, and server does not respawn
161 TMP=`mktemp /tmp/pdns.install-tmp.XXXXXX`
162 sed 's/^ *//g' /etc/pdns/pdns.conf > $TMP
163 cp /etc/pdns/pdns.conf /etc/pdns/pdns.conf.rpmsave
164 mv $TMP /etc/pdns/pdns.conf
165
166 /sbin/chkconfig --add pdns
167 if [ -f /var/lock/subsys/pdns ]; then
168         /etc/rc.d/init.d/pdns restart >&2
169 else
170         echo "Run \"/etc/rc.d/init.d/pdns start\" to start pdns." >&2
171 fi
172
173 %preun
174 if [ "$1" = "0" ]; then
175         if [ -f /var/lock/subsys/pdns ]; then
176                 /etc/rc.d/init.d/pdns stop
177         fi
178         /sbin/chkconfig --del pdns
179 fi
180
181 %postun
182 if [ "$1" = "0" ]; then
183         /usr/sbin/userdel pdns
184 fi
185
186 %files
187 %defattr(644,root,root,755)
188 %doc ChangeLog HACKING INSTALL README TODO WARNING pdns.pdf pdns.txt
189 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}/%{name}.conf
190 %config(noreplace) %attr(0754,root,root) %{_initrddir}/%{name}
191 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/pdns
192 %dir %{_sysconfdir}/%{name}
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.055189 seconds and 3 git commands to generate.