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