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