new trunk based on current 1.2
[rrdtool.git] / rrdtool.spec
1 Summary: Round Robin Database Tool to store and display time-series data
2 Name: rrdtool
3 Version: 1.2.23
4 Release: 3%{?dist}
5 License: GPL
6 Group: Applications/Databases
7 URL: http://oss.oetiker.ch/%{name}/
8 Source: http://oss.oetiker.ch/%{name}/pub/%{name}-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
10 BuildRequires: gcc-c++, openssl-devel
11 BuildRequires: libpng-devel, zlib-devel, libart_lgpl-devel >= 2.0
12 BuildRequires: freetype-devel, python-devel >= 2.3
13 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
14
15 %{!?python_sitearch: %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')}
16 %{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]')}
17
18 %description
19 RRD is the Acronym for Round Robin Database. RRD is a system to store and
20 display time-series data (i.e. network bandwidth, machine-room temperature,
21 server load average). It stores the data in a very compact way that will not
22 expand over time, and it presents useful graphs by processing the data to
23 enforce a certain data density. It can be used either via simple wrapper
24 scripts (from shell or Perl) or via frontends that poll network devices and
25 put a friendly user interface on it.
26
27 %package devel
28 Summary: RRDtool libraries and header files
29 Group: Development/Libraries
30 Requires: %{name} = %{version}-%{release}
31
32 %description devel
33 RRD is the Acronym for Round Robin Database. RRD is a system to store and
34 display time-series data (i.e. network bandwidth, machine-room temperature,
35 server load average). This package allow you to use directly this library.
36
37 %package doc
38 Summary: RRDtool documentation
39 Group: Documentation
40
41 %description doc
42 RRD is the Acronym for Round Robin Database. RRD is a system to store and
43 display time-series data (i.e. network bandwidth, machine-room temperature,
44 server load average). This package contains documentation on using RRD.
45
46 %package -n perl-%{name}
47 Summary: Perl RRDtool bindings
48 Group: Development/Languages
49 Requires: %{name} = %{version}-%{release}
50 Obsoletes: %{name}-perl <= %{version}
51 Provides: %{name}-perl = %{version}
52
53 %description -n perl-%{name}
54 The Perl RRDtool bindings
55
56 %package -n python-%{name}
57 Summary: Python RRDtool bindings
58 Group: Development/Languages
59 BuildRequires: python
60 Requires: python >= %{python_version}
61 Requires: %{name} = %{version}-%{release}
62
63 %description -n python-%{name}
64 Python RRDtool bindings.
65
66 %prep
67 %setup
68
69 # Fix to find correct python dir on lib64
70 %{__perl} -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \
71     configure
72
73 # Shouldn't be necessary when using --libdir, but
74 # introduces hardcoded rpaths where it shouldn't,
75 # if not done...
76 %{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' \
77     configure Makefile.in
78
79 %build
80 %configure \
81     --program-prefix="%{?_program_prefix}" \
82     --libdir=%{_libdir} \
83     --disable-static \
84     --with-pic \
85     --with-perl-options='INSTALLDIRS="vendor"'
86
87 # Fix another rpath issue
88 %{__perl} -pi.orig -e 's|-Wl,--rpath -Wl,\$rp||g' \
89     bindings/perl-shared/Makefile.PL
90
91 # Force RRDp bits where we want 'em, not sure yet why the
92 # --with-perl-options and --libdir don't take
93 pushd bindings/perl-piped/
94 %{__perl} Makefile.PL INSTALLDIRS=vendor
95 %{__perl} -pi.orig -e 's|/lib/perl|/%{_lib}/perl|g' Makefile
96 popd
97
98 %{__make} %{?_smp_mflags}
99
100 # Fix @perl@ and @PERL@
101 find examples/ -type f \
102     -exec %{__perl} -pi -e 's|^#! \@perl\@|#!%{__perl}|gi' {} \;
103 find examples/ -name "*.pl" \
104     -exec %{__perl} -pi -e 's|\015||gi' {} \;
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 make DESTDIR="$RPM_BUILD_ROOT" install
109
110 # Pesky RRDp.pm...
111 %{__mv} $RPM_BUILD_ROOT%{perl_vendorarch}/../RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/
112
113 # We only want .txt and .html files for the main documentation
114 %{__mkdir_p} doc2/html doc2/txt
115 %{__cp} -a doc/*.txt doc2/txt/
116 %{__cp} -a doc/*.html doc2/html/
117
118 # Put perl docs in perl package
119 %{__mkdir_p} doc3/html
120 %{__mv} doc2/html/RRD*.html doc3/html/
121
122 # Clean up the examples
123 %{__rm} -f examples/Makefile* examples/*.in
124
125 # This is so rpm doesn't pick up perl module dependencies automatically
126 find examples/ -type f -exec chmod 0644 {} \;
127
128 # Clean up the buildroot
129 %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}/{txt,html}/ \
130         $RPM_BUILD_ROOT%{perl_vendorarch}/ntmake.pl \
131         $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \
132         $RPM_BUILD_ROOT%{_datadir}/%{name}/examples \
133         $RPM_BUILD_ROOT%{perl_vendorarch}/auto/*/{.packlist,*.bs}
134
135 %clean
136 %{__rm} -rf $RPM_BUILD_ROOT
137
138 %post -p /sbin/ldconfig
139
140 %postun -p /sbin/ldconfig
141
142 %files
143 %{_bindir}/*
144 %{_libdir}/*.so.*
145 %{_libdir}/rrdtool/*
146 %{_datadir}/%{name}/fonts/*
147 %{_mandir}/man1/*
148
149 %files devel
150 %defattr(-,root,root,-)
151 %{_includedir}/*.h
152 %exclude %{_libdir}/*.la
153 %{_libdir}/*.so
154
155 %files doc
156 %defattr(-,root,root,-)
157 %doc CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO NEWS THREADS doc2/html doc2/txt
158 %doc examples
159
160 %files -n perl-%{name}
161 %defattr(-,root,root,-)
162 %doc doc3/html
163 %{_mandir}/man3/*
164 %{perl_vendorarch}/*.pm
165 %attr(0755,root,root) %{perl_vendorarch}/auto/RRDs/*
166
167 %files -n python-%{name}
168 %defattr(-,root,root,-)
169 %doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README
170 %{python_sitearch}/rrdtoolmodule.so
171
172 %changelog
173 * Mon Jun 05 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-3
174 - Merge spec fixes from bz 185909
175
176 * Sun Jun 04 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-2
177 - Remove explicit perl dep, version grabbing using rpm during
178   rpmbuild not guaranteed to work (fails on ppc in plague),
179   and auto-gen perl deps are sufficient
180
181 * Sat Jun 03 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-1
182 - Update to release 1.2.13
183 - Merge spec changes from dag, atrpms and mdk builds
184 - Additional hacktastic contortions for lib64 & rpath messiness
185 - Add missing post/postun ldconfig
186 - Fix a bunch of rpmlint errors
187 - Disable static libs, per FE guidelines
188 - Split off docs
189
190 * Wed Apr 19 2006 Chris Ricker <kaboom@oobleck.net> 1.2.12-1
191 - Rev to 1.2
192
193 * Fri May 20 2005 Matthias Saou <http://freshrpms.net/> 1.0.49-5
194 - Include patch from Michael to fix perl module compilation on FC4 (#156242).
195
196 * Fri May 20 2005 Matthias Saou <http://freshrpms.net/> 1.0.49-4
197 - Fix for the php module patch (Joe Pruett, Dag Wieers), #156716.
198 - Update source URL to new location since 1.2 is now the default stable.
199 - Don't (yet) update to 1.0.50, as it introduces some changes in the perl
200   modules install.
201
202 * Mon Jan 31 2005 Matthias Saou <http://freshrpms.net/> 1.0.49-3
203 - Put perl modules in vendor_perl and not site_perl. #146513
204
205 * Thu Jan 13 2005 Matthias Saou <http://freshrpms.net/> 1.0.49-2
206 - Minor cleanups.
207
208 * Thu Aug 25 2004 Dag Wieers <dag@wieers.com> - 1.0.49-1
209 - Updated to release 1.0.49.
210
211 * Wed Aug 25 2004 Dag Wieers <dag@wieers.com> - 1.0.48-3
212 - Fixes for x86_64. (Garrick Staples)
213
214 * Fri Jul  2 2004 Matthias Saou <http://freshrpms.net/> 1.0.48-3
215 - Actually apply the patch for fixing the php module, doh!
216
217 * Thu May 27 2004 Matthias Saou <http://freshrpms.net/> 1.0.48-2
218 - Added php.d config entry to load the module once installed.
219
220 * Thu May 13 2004 Dag Wieers <dag@wieers.com> - 1.0.48-1
221 - Updated to release 1.0.48.
222
223 * Tue Apr 06 2004 Dag Wieers <dag@wieers.com> - 1.0.47-1
224 - Updated to release 1.0.47.
225
226 * Thu Mar  4 2004 Matthias Saou <http://freshrpms.net/> 1.0.46-2
227 - Change the strict dependency on perl to fix problem with the recent
228   update.
229
230 * Mon Jan  5 2004 Matthias Saou <http://freshrpms.net/> 1.0.46-1
231 - Update to 1.0.46.
232 - Use system libpng and zlib instead of bundled ones.
233 - Added php-rrdtool sub-package for the php4 module.
234
235 * Fri Dec  5 2003 Matthias Saou <http://freshrpms.net/> 1.0.45-4
236 - Added epoch to the perl dependency to work with rpm > 4.2.
237 - Fixed the %% escaping in the perl dep.
238
239 * Mon Nov 17 2003 Matthias Saou <http://freshrpms.net/> 1.0.45-2
240 - Rebuild for Fedora Core 1.
241
242 * Sun Aug  3 2003 Matthias Saou <http://freshrpms.net/>
243 - Update to 1.0.45.
244
245 * Wed Apr 16 2003 Matthias Saou <http://freshrpms.net/>
246 - Update to 1.0.42.
247
248 * Mon Mar 31 2003 Matthias Saou <http://freshrpms.net/>
249 - Rebuilt for Red Hat Linux 9.
250
251 * Wed Mar  5 2003 Matthias Saou <http://freshrpms.net/>
252 - Added explicit perl version dependency.
253
254 * Sun Feb 23 2003 Matthias Saou <http://freshrpms.net/>
255 - Update to 1.0.41.
256
257 * Fri Jan 31 2003 Matthias Saou <http://freshrpms.net/>
258 - Update to 1.0.40.
259 - Spec file cleanup.
260
261 * Fri Jul 05 2002 Henri Gomez <hgomez@users.sourceforge.net>
262 - 1.0.39
263
264 * Mon Jun 03 2002 Henri Gomez <hgomez@users.sourceforge.net>
265 - 1.0.38
266
267 * Fri Apr 19 2002 Henri Gomez <hgomez@users.sourceforge.net>
268 - 1.0.37
269
270 * Tue Mar 12 2002 Henri Gomez <hgomez@users.sourceforge.net>
271 - 1.0.34
272 - rrdtools include zlib 1.1.4 which fix vulnerabilities in 1.1.3
273