]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- pdns.init adopted to suit PLD convention
[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 %{SOURCE1} %{buildroot}/%{_docdir}/%{name}-%{version}/%{name}.pdf
127 install %{SOURCE2} %{buildroot}/%{_initrddir}/%{name}
128 install %{SOURCE3} %{buildroot}/%{_sysconfdir}/%{name}/%{name}.conf
129 install %{SOURCE3} %{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
152 %preun
153 /sbin/chkconfig --del pdns
154
155 %postun
156 if [ "$1" = "0" ]; then
157         /usr/sbin/userdel pdns
158 fi
159
160 %clean
161 [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
162
163 %files
164 %defattr(644,root,root,755)
165 %doc ChangeLog HACKING INSTALL README TODO WARNING 
166 %{_docdir}/%{name}-%{version}/%{name}.pdf
167 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}/%{name}.conf
168 %config(noreplace) %attr(0754,root,root) %{_initrddir}/%{name}
169 %attr(640,root,root)  %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/pdns
170 %dir %{_sysconfdir}/%{name}
171 %attr(755,root,root) %{_sbindir}/*
172 %{_mandir}/man8/*
173
174 %files backend-mysql
175 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so
176 %attr(644,root,root) %{_libdir}/%{name}/*mysql*.la
177
178 %files backend-pgsql
179 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so
180 %attr(644,root,root) %{_libdir}/%{name}/*pgsql*.la
181
182 %files backend-pipe
183 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so
184 %attr(644,root,root) %{_libdir}/%{name}/*pipe*.la
185
186 %files static
187 %attr(644,root,root) %{_libdir}/%{name}/*.a
This page took 0.045591 seconds and 4 git commands to generate.