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