]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- LDAP backend by Zbigniew Krzystolik <zbyniu at altus geocarbon pl>
[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.13
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
9 # Source0-md5:  ffd80b49f553cbaaa089a02a90df7729
10 Source1:        http://downloads.powerdns.com/documentation/%{name}.pdf
11 # Source1-md5:  0d71bf412024d04d6a0fca10f2714c22
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:  libpq++-devel
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  mysql-devel
22 BuildRequires:  zlib-devel
23 PreReq:         rc-scripts
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/sbin/useradd
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(post,preun):   /sbin/chkconfig
28 Requires(postun):       /usr/sbin/userdel
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Provides:       nameserver
31 Provides:       powerdns
32 Obsoletes:      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 cp %{SOURCE1} .
102 cp %{SOURCE2} .
103
104 %build
105 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
106 %configure \
107         --libdir=%{_libdir}/%{name} \
108         --sysconfdir=%{_sysconfdir}/%{name} \
109         --with-socketdir=/var/run \
110         --with-dynmodules="gmysql gpgsql pipe ldap" \
111         --with-modules="" \
112         --with-pgsql-includes=%{_includedir} \
113         --enable-mysql \
114         --enable-pgsql \
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 /dev/null -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
153 fi
154
155 %post
156 /sbin/chkconfig --add pdns
157 if [ -f /var/lock/subsys/pdns ]; then
158         /etc/rc.d/init.d/pdns restart >&2
159 else
160         echo "Run \"/etc/rc.d/init.d/pdns start\" to start pdns." >&2
161 fi
162
163 %preun
164 if [ "$1" = "0" ]; then
165         if [ -f /var/lock/subsys/pdns ]; then
166                 /etc/rc.d/init.d/pdns stop
167         fi
168         /sbin/chkconfig --del pdns
169 fi
170
171 %postun
172 if [ "$1" = "0" ]; then
173         /usr/sbin/userdel pdns
174 fi
175
176 %files
177 %defattr(644,root,root,755)
178 %doc ChangeLog HACKING INSTALL README TODO WARNING pdns.pdf pdns.txt
179 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}/%{name}.conf
180 %config(noreplace) %attr(0754,root,root) %{_initrddir}/%{name}
181 %attr(640,root,root)  %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/pdns
182 %dir %{_sysconfdir}/%{name}
183 %attr(755,root,root) %{_sbindir}/*
184 %attr(755,root,root) %{_bindir}/*
185 %{_mandir}/man8/*
186
187 %files backend-gmysql
188 %defattr(644,root,root,755)
189 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
190
191 %files backend-gpgsql
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
194
195 %files backend-pipe
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
198
199 %files backend-ldap
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.037625 seconds and 4 git commands to generate.