]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- backends splitted
[packages/pdns.git] / pdns.spec
1 %define name            pdns
2 %define version         2.9.4
3 %define release         0.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
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
99 %build
100
101 %configure \
102     --libexecdir=%{_libexecdir} \
103     --libdir=%{_libdir}/%{name} \
104     --bindir=%{_sbindir} \
105     --sbindir=%{_sbindir} \
106     --sysconfdir=%{_sysconfdir}/%{name} \
107     --with-socketdir=/var/run \
108     --with-dynmodules="gmysql gpgsql pipe" \
109     --with-modules="" \
110     --with-pgsql-includes=/usr/include \
111     --enable-mysql \
112     --enable-pgsql 
113
114 %{__make}
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 %{__make} install \
120         DESTDIR="%{buildroot}" 
121
122 install -d %{buildroot}/%{_docdir}/%{name}-%{version}
123 install -d %{buildroot}/%{_initrddir}
124 install -d %{buildroot}/%{_sysconfdir}/%{name}
125 install -m644 %{SOURCE1} %{buildroot}/%{_docdir}/%{name}-%{version}/%{name}.pdf
126 install -m754 %{SOURCE2} %{buildroot}/%{_initrddir}/%{name}
127 install -m600 %{SOURCE3} %{buildroot}/%{_sysconfdir}/%{name}/%{name}.conf
128
129 %pre
130 if [ -n "`getgid djbdns`" ]; then
131         if [ "`getgid djbdns`" != "32" ]; then
132                 echo "Error: group djbdns doesn't have gid=32. Correct this before installing pdns." 1>&2
133                 exit 1
134         fi
135 else
136         /usr/sbin/groupadd -g 32 -r -f djbdns
137 fi
138 if [ -n "`id -u pdns 2>/dev/null`" ]; then
139         if [ "`id -u pdns`" != "30" ]; then
140                 echo "Error: user pdns doesn't have uid=30. Correct this before installing pdns." 1>&2
141                 exit 1
142         fi
143 else
144         /usr/sbin/useradd -u 30 -r -d /dev/null -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
145 fi
146
147 %post
148 /sbin/chkconfig --add pdns
149
150 %preun
151 /sbin/chkconfig --del pdns
152
153 %postun
154 if [ "$1" = "0" ]; then
155         /usr/sbin/userdel pdns
156 fi
157
158 %clean
159 [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
160
161 %files
162 %defattr(644,root,root,755)
163 %doc ChangeLog HACKING INSTALL README TODO WARNING 
164 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}/%{name}.conf
165 %config(noreplace) %attr(0754,root,root) %{_initrddir}/%{name}
166 %dir %{_sysconfdir}/%{name}
167 %attr(755,root,root) %{_sbindir}/*
168 %{_mandir}/man8/*
169
170 %files backend-mysql
171 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so
172 %attr(644,root,root) %{_libdir}/%{name}/*mysql*.la
173
174 %files backend-pgsql
175 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so
176 %attr(644,root,root) %{_libdir}/%{name}/*pgsql*.la
177
178 %files backend-pipe
179 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so
180 %attr(644,root,root) %{_libdir}/%{name}/*pipe*.la
181
182 %files static
183 %attr(644,root,root) %{_libdir}/%{name}/*.a
This page took 0.109927 seconds and 4 git commands to generate.