]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- updated to 2.9.10
[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.10
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 URL:            http://www.powerdns.com/
9 Source0:        http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
10 # Source0-md5:  a91f15c90f6551fb817cb708e29d5a37
11 Source1:        http://downloads.powerdns.com/documentation/%{name}.pdf
12 # Source1-md5:  e82b91120cf66f146283ca138025c9d3
13 Source2:        http://downloads.powerdns.com/documentation/%{name}.txt
14 Source3:        %{name}.init
15 Source4:        %{name}.conf
16 Source5:        %{name}.sysconfig
17
18 BuildRequires:  bison
19 BuildRequires:  flex
20 BuildRequires:  mysql-devel
21 BuildRequires:  postgresql-c++-devel
22 BuildRequires:  libstdc++-devel
23 BuildRequires:  zlib-devel
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/sbin/useradd
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(pre):  /bin/id
28 Requires(postun):       /usr/sbin/userdel
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Provides:       nameserver pdns powerdns
31 Obsoletes:      nameserver pdns 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 danych
41 skoñczywszy oraz zawieraj±cy algorytmy zrównowa¿enia obci±¿enia i 
42 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 documentation.
52
53 %description backend-pipe -l pl
54 Ten pakiet pozwala na utworzenie w³asnego mechanizmu przechowywania stref
55 za pomoc± prostego interfejsu STDIN/STDOUT. Przyk³adowy skrypt w perlu zosta³
56 do³±czony do dokumentacji pakietu.
57
58 %package backend-pgsql
59 Summary:        PowerDNS support for PostgreSQL
60 Summary(pl):    Wsparcie PowerDNS dla baz PostgresQL
61 Group:          Development/Libraries
62 Requires:       postgresql
63
64 %description backend-pgsql
65 This package allows zone storage in PostgreSQL relational db tables.
66
67 %description backend-pgsql -l pl
68 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach 
69 relacyjnej bazy danych PostgreSQL.
70
71 %package backend-mysql
72 Summary:        PowerDNS support for MySQL
73 Summary(pl):    Wsparcie PowerDNS dla baz MySQL
74 Group:          Development/Libraries
75 Requires:       mysql
76
77 %description backend-mysql
78 This package allows zone storage in MySQL relational db tables.
79
80 %description backend-mysql -l pl
81 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach 
82 relacyjnej bazy danych MySQL.
83
84 %package static
85 Summary:        PowerDNS static libs
86 Summary(pl):    Biblioteki statyczne PowerDNS
87 Group:          Development/Libraries
88
89 %description static
90 Static PowerDNS libraries.
91
92 %description static -l pl
93 Statyczne biblioteki PowerDNS.
94
95 %prep
96
97 %setup -q
98 cp %{SOURCE1} .
99 cp %{SOURCE2} .
100
101 %build
102
103 %configure \
104     --libexecdir=%{_libexecdir} \
105     --libdir=%{_libdir}/%{name} \
106     --bindir=%{_sbindir} \
107     --sbindir=%{_sbindir} \
108     --sysconfdir=%{_sysconfdir}/%{name} \
109     --with-socketdir=/var/run \
110     --with-dynmodules="gmysql gpgsql pipe" \
111     --with-modules="" \
112     --with-pgsql-includes=/usr/include \
113     --enable-mysql \
114     --enable-pgsql 
115
116 %{__make}
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120
121 %{__make} install \
122         DESTDIR="%{buildroot}" 
123
124 install -d %{buildroot}/%{_initrddir}
125 install -d %{buildroot}/%{_sysconfdir}/%{name}
126 install -d %{buildroot}/etc/sysconfig
127 install %{SOURCE3} %{buildroot}/%{_initrddir}/%{name}
128 install %{SOURCE4} %{buildroot}/%{_sysconfdir}/%{name}/%{name}.conf
129 install %{SOURCE5} %{buildroot}/etc/sysconfig/pdns
130
131 %pre
132 if [ -n "`getgid djbdns`" ]; then
133         if [ "`getgid djbdns`" != "32" ]; then
134                 echo "Error: group djbdns doesn't have gid=32. Correct this before installing pdns." 1>&2
135                 exit 1
136         fi
137 else
138         /usr/sbin/groupadd -g 32 -r -f djbdns
139 fi
140 if [ -n "`id -u pdns 2>/dev/null`" ]; then
141         if [ "`id -u pdns`" != "30" ]; then
142                 echo "Error: user pdns doesn't have uid=30. Correct this before installing pdns." 1>&2
143                 exit 1
144         fi
145 else
146         /usr/sbin/useradd -u 30 -r -d /dev/null -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
147 fi
148
149 %post
150 /sbin/chkconfig --add pdns
151 if [ -f %{_localstatedir}/lock/subsys/pdns ]; then
152         /etc/rc.d/init.d/pdns restart >&2
153 else
154         echo "Run \"/etc/rc.d/init.d/pdns start\" to start pdns." >&2
155 fi
156
157 %preun
158 if [ "$1" = "0" ]; then
159         if [ -f %{_localstatedir}/lock/subsys/pdns ]; then
160                 /etc/rc.d/init.d/pdns stop
161         fi
162         /sbin/chkconfig --del pdns
163 fi
164
165 %postun
166 if [ "$1" = "0" ]; then
167         /usr/sbin/userdel pdns
168 fi
169
170 %clean
171 [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
172
173 %files
174 %defattr(644,root,root,755)
175 %doc ChangeLog HACKING INSTALL README TODO WARNING pdns.pdf pdns.txt
176 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}/%{name}.conf
177 %config(noreplace) %attr(0754,root,root) %{_initrddir}/%{name}
178 %attr(640,root,root)  %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/pdns
179 %dir %{_sysconfdir}/%{name}
180 %attr(755,root,root) %{_sbindir}/*
181 %{_mandir}/man8/*
182
183 %files backend-mysql
184 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
185 %attr(644,root,root) %{_libdir}/%{name}/*mysql*.la
186
187 %files backend-pgsql
188 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
189 %attr(644,root,root) %{_libdir}/%{name}/*pgsql*.la
190
191 %files backend-pipe
192 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
193 %attr(644,root,root) %{_libdir}/%{name}/*pipe*.la
194
195 %files static
196 %attr(644,root,root) %{_libdir}/%{name}/*.a
This page took 0.086896 seconds and 4 git commands to generate.