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