sync up with Dag Wieers version from http://dag.wieers.com/packages/rrdtool/rrdtool...
[rrdtool.git] / rrdtool.spec
1 # $Id$
2 # Authority: matthias
3 # Upstream: Tobi Oetiker <oetiker$ee,ethz,ch>
4
5 # Tag: test
6
7 %{?fc1:%define _without_python 1}
8 %{?el3:%define _without_python 1}
9 %{?rh9:%define _without_python 1}
10 %{?rh7:%define _without_python 1}
11 %{?el2:%define _without_python 1}
12
13 %define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)
14 %define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)
15 %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
16 %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]')
17
18 Summary: Round Robin Database Tool to store and display time-series data
19 Name: rrdtool
20 Version: 1.2.9
21 Release: 1.test
22 License: GPL
23 Group: Applications/Databases
24 URL: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
25
26 Packager: Dag Wieers <dag@wieers.com>
27 Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
28
29 Source: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-%{version}.tar.gz
30 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
31
32 BuildRequires: gcc-c++, openssl-devel, libart_lgpl-devel >= 2.0, cgilib-devel
33 BuildRequires: libpng-devel, zlib-devel, freetype-devel
34 %{!?_without_python:BuildRequires: python-devel >= 2.3}
35 Requires: perl >= %(rpm -q --qf '%%{epoch}:%%{version}' perl)
36
37 %description
38 RRD is the Acronym for Round Robin Database. RRD is a system to store and 
39 display time-series data (i.e. network bandwidth, machine-room temperature, 
40 server load average). It stores the data in a very compact way that will not 
41 expand over time, and it presents useful graphs by processing the data to 
42 enforce a certain data density. It can be used either via simple wrapper 
43 scripts (from shell or Perl) or via frontends that poll network devices and 
44 put a friendly user interface on it.
45
46 %package devel
47 Summary: RRDtool static libraries and header files
48 Group: Development/Libraries
49 Requires: %{name} = %{version}
50
51 %description devel
52 RRD is the Acronym for Round Robin Database. RRD is a system to store and
53 display time-series data (i.e. network bandwidth, machine-room temperature,
54 server load average). This package allow you to use directly this library.
55
56 %package -n perl-rrdtool
57 Summary: Perl RRDtool bindings
58 Group: Development/Languages
59 Requires: %{name} = %{version}
60 Obsoletes: rrdtool-perl <= %{version}
61
62 %description -n perl-rrdtool
63 The Perl RRDtool bindings
64
65 %package -n python-rrdtool
66 Summary: Python RRDtool bindings
67 Group: Development/Languages
68 BuildRequires: python
69 Requires: python >= %{python_version}
70 Requires: %{name} = %{version}
71
72 %description -n python-rrdtool
73 Python RRDtool bindings.
74
75 %package -n php-rrdtool
76 Summary: RRDtool module for PHP
77 Group: Development/Languages
78 Requires: %{name} = %{version}, php >= 4.0
79
80 %description -n php-rrdtool
81 The php-%{name} package includes a dynamic shared object (DSO) that adds
82 RRDtool bindings to the PHP HTML-embedded scripting language.
83
84 %prep
85 %setup
86
87 ### FIXME: Fixes to /usr/lib(64) for x86_64
88 %{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' configure Makefile.in
89
90 %build
91 %configure \
92         --enable-perl-site-install \
93         --with-perl-options='INSTALLDIRS="vendor"'
94 #       --with-tcllib="%{_libdir}"
95 %{__make} %{?_smp_mflags}
96
97 %install
98 %{__rm} -rf %{buildroot}
99 %{__make} install DESTDIR="%{buildroot}"
100
101 ### We only want .txt and .html files for the main documentation
102 %{__mkdir_p} rpm-doc/docs/
103 %{__cp} -ap doc/*.txt doc/*.html rpm-doc/docs/
104
105 %{__rm} -f examples/Makefile* examples/*.in
106
107 ### Clean up buildroot
108 %{__rm} -rf %{buildroot}%{perl_archlib} \
109                 %{buildroot}%{perl_vendorarch}/auto/*{,/*{,/*}}/.packlist
110 %{__rm} -f %{buildroot}%{perl_vendorarch}/ntmake.pl
111
112 %clean
113 %{__rm} -rf %{buildroot}
114  
115 %files
116 %defattr(-, root, root, 0755)
117 %doc CHANGES CONTRIBUTORS COPYING COPYRIGHT NEWS README THREADS TODO
118 %doc rpm-doc/docs/ examples/
119 %doc %{_mandir}/man1/*.1*
120 %{_bindir}/rrdcgi
121 %{_bindir}/rrdtool
122 %{_bindir}/rrdupdate
123 %{_libdir}/librrd.so.*
124 %{_libdir}/librrd_th.so.*
125 %{_datadir}/rrdtool/
126 %exclude %{_prefix}/shared/
127
128 %files devel
129 %defattr(-, root, root, 0755)
130 %{_includedir}/rrd.h
131 %{_libdir}/librrd.a
132 %{_libdir}/librrd_th.a
133 %exclude %{_libdir}/librrd.la
134 %exclude %{_libdir}/librrd_th.la
135 %{_libdir}/librrd.so
136 %{_libdir}/librrd_th.so
137
138 %files -n perl-rrdtool
139 %defattr(-, root, root, 0755)
140 %doc examples/
141 %doc %{_mandir}/man3/RRDp.3*
142 %doc %{_mandir}/man3/RRDs.3*
143 %{perl_vendorlib}/RRDp.pm
144 %{perl_vendorarch}/RRDs.pm
145 %{perl_vendorarch}/auto/RRDs/
146 %exclude %{_prefix}/examples/
147
148 %if %{!?_without_python:1}0
149 %files -n python-rrdtool
150 %defattr(-, root, root, 0755)
151 %{python_sitearch}/rrdtoolmodule.so
152 %endif
153
154 %changelog
155 * Sat Jun 04 2005 Dag Wieers <dag@wieers.com> - 1.2.9-1 - 3221+/dag
156 - Updated to release 1.2.9.
157
158 * Wed May 18 2005 Dag Wieers <dag@wieers.com> - 1.2.8-1
159 - Updated to release 1.2.8.
160
161 * Tue May 10 2005 Dag Wieers <dag@wieers.com> - 1.2.6-1
162 - Updated to release 1.2.6.
163
164 * Sat May 07 2005 Dag Wieers <dag@wieers.com> - 1.2.2-1
165 - Updated to release 1.2.2.
166
167 * Sat May 07 2005 Dag Wieers <dag@wieers.com> - 1.2.1-1
168 - Updated to release 1.2.1.
169
170 * Fri Apr 29 2005 Dag Wieers <dag@wieers.com> - 1.2.0-1
171 - Updated to release 1.2.0.
172
173 * Mon Apr 04 2005 Dag Wieers <dag@wieers.com> - 1.0.49-2
174 - Fix for the php-rrdtool patch. (Joe Pruett)
175
176 * Thu Aug 25 2004 Dag Wieers <dag@wieers.com> - 1.0.49-1
177 - Updated to release 1.0.49.
178
179 * Wed Aug 25 2004 Dag Wieers <dag@wieers.com> - 1.0.48-3
180 - Fixes for x86_64. (Garrick Staples)
181
182 * Fri Jul  2 2004 Matthias Saou <http://freshrpms.net/> 1.0.48-3
183 - Actually apply the patch for fixing the php module, doh!
184
185 * Thu May 27 2004 Matthias Saou <http://freshrpms.net/> 1.0.48-2
186 - Added php.d config entry to load the module once installed.
187
188 * Thu May 13 2004 Dag Wieers <dag@wieers.com> - 1.0.48-1
189 - Updated to release 1.0.48.
190
191 * Tue Apr 06 2004 Dag Wieers <dag@wieers.com> - 1.0.47-1
192 - Updated to release 1.0.47.
193
194 * Thu Mar  4 2004 Matthias Saou <http://freshrpms.net/> 1.0.46-2
195 - Change the strict dependency on perl to fix problem with the recent
196   update.
197
198 * Mon Jan  5 2004 Matthias Saou <http://freshrpms.net/> 1.0.46-1
199 - Update to 1.0.46.
200 - Use system libpng and zlib instead of bundled ones.
201 - Added php-rrdtool sub-package for the php4 module.
202
203 * Fri Dec  5 2003 Matthias Saou <http://freshrpms.net/> 1.0.45-4
204 - Added epoch to the perl dependency to work with rpm > 4.2.
205 - Fixed the %% escaping in the perl dep.
206
207 * Mon Nov 17 2003 Matthias Saou <http://freshrpms.net/> 1.0.45-2
208 - Rebuild for Fedora Core 1.
209
210 * Sun Aug  3 2003 Matthias Saou <http://freshrpms.net/>
211 - Update to 1.0.45.
212
213 * Wed Apr 16 2003 Matthias Saou <http://freshrpms.net/>
214 - Update to 1.0.42.
215
216 * Mon Mar 31 2003 Matthias Saou <http://freshrpms.net/>
217 - Rebuilt for Red Hat Linux 9.
218
219 * Wed Mar  5 2003 Matthias Saou <http://freshrpms.net/>
220 - Added explicit perl version dependency.
221
222 * Sun Feb 23 2003 Matthias Saou <http://freshrpms.net/>
223 - Update to 1.0.41.
224
225 * Fri Jan 31 2003 Matthias Saou <http://freshrpms.net/>
226 - Update to 1.0.40.
227 - Spec file cleanup.
228
229 * Fri Jul 05 2002 Henri Gomez <hgomez@users.sourceforge.net>
230 - 1.0.39
231
232 * Mon Jun 03 2002 Henri Gomez <hgomez@users.sourceforge.net>
233 - 1.0.38
234
235 * Fri Apr 19 2002 Henri Gomez <hgomez@users.sourceforge.net>
236 - 1.0.37
237
238 * Tue Mar 12 2002 Henri Gomez <hgomez@users.sourceforge.net>
239 - 1.0.34
240 - rrdtools include zlib 1.1.4 which fix vulnerabilities in 1.1.3
241