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