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