]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- 2.9.13 by Marcin Kurzyna pld at nius waw pl
[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.13
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
9 # Source0-md5:  ffd80b49f553cbaaa089a02a90df7729
10 Source1:        http://downloads.powerdns.com/documentation/%{name}.pdf
11 # Source1-md5:  0d71bf412024d04d6a0fca10f2714c22
12 Source2:        http://downloads.powerdns.com/documentation/%{name}.txt
13 Source3:        %{name}.init
14 Source4:        %{name}.conf
15 Source5:        %{name}.sysconfig
16 URL:            http://www.powerdns.com/
17 BuildRequires:  bison
18 BuildRequires:  flex
19 BuildRequires:  libpq++-devel
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  mysql-devel
22 BuildRequires:  zlib-devel
23 PreReq:         rc-scripts
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/sbin/useradd
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(post,preun):   /sbin/chkconfig
28 Requires(postun):       /usr/sbin/userdel
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Provides:       nameserver
31 Provides:       powerdns
32 Obsoletes:      nameserver
33 Obsoletes:      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 %prep
87 %setup -q
88 cp %{SOURCE1} .
89 cp %{SOURCE2} .
90
91 %build
92 %configure \
93         --libdir=%{_libdir}/%{name} \
94         --sysconfdir=%{_sysconfdir}/%{name} \
95         --with-socketdir=/var/run \
96         --with-dynmodules="gmysql gpgsql pipe" \
97         --with-modules="" \
98         --with-pgsql-includes=/usr/include \
99         --enable-mysql \
100         --enable-pgsql \
101         --disable-static
102
103 %{__make}
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT{%{_initrddir},%{_sysconfdir}/%{name},/etc/sysconfig}
108
109 %{__make} install \
110         DESTDIR=$RPM_BUILD_ROOT
111
112 install %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/%{name}
113 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
114 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
115
116 # useless - modules are dlopened by *.so
117 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %pre
123 if [ -n "`getgid djbdns`" ]; then
124         if [ "`getgid djbdns`" != "32" ]; then
125                 echo "Error: group djbdns doesn't have gid=32. Correct this before installing pdns." 1>&2
126                 exit 1
127         fi
128 else
129         /usr/sbin/groupadd -g 32 -r -f djbdns
130 fi
131 if [ -n "`id -u pdns 2>/dev/null`" ]; then
132         if [ "`id -u pdns`" != "30" ]; then
133                 echo "Error: user pdns doesn't have uid=30. Correct this before installing pdns." 1>&2
134                 exit 1
135         fi
136 else
137         /usr/sbin/useradd -u 30 -r -d /dev/null -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
138 fi
139
140 %post
141 /sbin/chkconfig --add pdns
142 if [ -f /var/lock/subsys/pdns ]; then
143         /etc/rc.d/init.d/pdns restart >&2
144 else
145         echo "Run \"/etc/rc.d/init.d/pdns start\" to start pdns." >&2
146 fi
147
148 %preun
149 if [ "$1" = "0" ]; then
150         if [ -f /var/lock/subsys/pdns ]; then
151                 /etc/rc.d/init.d/pdns stop
152         fi
153         /sbin/chkconfig --del pdns
154 fi
155
156 %postun
157 if [ "$1" = "0" ]; then
158         /usr/sbin/userdel pdns
159 fi
160
161 %files
162 %defattr(644,root,root,755)
163 %doc ChangeLog HACKING INSTALL README TODO WARNING pdns.pdf pdns.txt
164 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}/%{name}.conf
165 %config(noreplace) %attr(0754,root,root) %{_initrddir}/%{name}
166 %attr(640,root,root)  %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/pdns
167 %dir %{_sysconfdir}/%{name}
168 %attr(755,root,root) %{_sbindir}/*
169 %attr(755,root,root) %{_bindir}/*
170 %{_mandir}/man8/*
171
172 %files backend-mysql
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
175
176 %files backend-pgsql
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
179
180 %files backend-pipe
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
This page took 0.067844 seconds and 4 git commands to generate.