python bindings add -- Alan Milligan alan from balclutha.org
[rrdtool.git] / rrdtool.spec
1 %define cvsdate cvs-snap
2 %define cvsver %(echo %{cvsdate} | tr -d -)
3 %define sover 1.0.0
4
5 Summary: Round Robin Database Tools
6 Name: rrdtool
7 Version: 1.2.6
8 Release: %{cvsver}
9 License: GPL
10 Group: Applications/Databases
11 Source: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/beta/rrdtool-1.2rc1.tar.gz
12 URL: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
13 Buildroot: /tmp/%{name}-root
14
15 BuildRequires: perl
16 BuildRequires: cgilib-devel
17 BuildRequires: freetype-devel libart_lgpl-devel libpng-devel zlib-devel
18
19 %description
20 It is pretty easy to gather status information from all sorts of things,
21 ranging from the temperature in your office to the number of octets which
22 have passed through the FDDI interface of your router. But it is not so
23 trivial to store this data in a efficient and systematic manner. This is
24 where RRDtool kicks in. It lets you log and analyze the data you gather from
25 all kinds of data-sources (DS). The data analysis part of RRDtool is based
26 on the ability to quickly generate graphical representations of the data
27 values collected over a definable time period.
28
29 %package devel
30 Summary: RRD Tool development libraries and header files
31 Group: Development/Libraries
32 Requires: %{name} = %{version}
33
34 %description devel
35 The RRD Tools development library.
36
37 %package perl
38 Summary: RRD Tool Perl interface
39 Group: Applications/Databases
40 Requires: %{name} = %{version}
41
42 %description perl
43 The RRD Tools Perl modules.
44
45 %package python
46 Summary: RRD Tool Python interface
47 Group: Applications/Databases
48 Requires: %{name} = %{version} python >= 2.3
49
50 %description python
51 The RRD Tools Python modules.
52
53 %prep
54 %setup -q -n rrdtool-%{cvsdate}
55 %prep
56 %setup -q -n rrdtool-%{cvsdate}
57
58 %define deffont %{_datadir}/%{name}/fonts/VeraMono.ttf
59
60 %build
61 CPPFLAGS="-I/usr/include/libart-2.0 -I/usr/include/freetype2"
62 export CPPFLAGS
63 %configure
64 make
65
66 %install
67 rm -rf %{buildroot}
68 %makeinstall
69
70 # Install the font
71 mkdir -p %{buildroot}%{_datadir}/fonts
72 install -m 644 src/VeraMono.ttf %{buildroot}%{deffont}
73
74 # Fix up the documentation
75 [ -d docs ] && mv docs docs.src
76 mv %{buildroot}/usr/doc docs
77 rm -f docs/*.pod
78 [ -d examples ] && mv examples examples.src
79 mv %{buildroot}/usr/examples examples
80 [ -d html ] && mv html html.src
81 mv %{buildroot}/usr/html html
82
83 # Fix up the perl
84 %define perlsite %(perl -MConfig -e 'print $Config{"installsitearch"}')
85 mkdir -p %{buildroot}%{perlsite}
86 mv %{buildroot}%{_libdir}/perl/* %{buildroot}%{perlsite}
87 rmdir %{buildroot}%{_libdir}/perl
88 rm -f %{buildroot}/%{perlsite}/auto/RRDs/RRDs.bs
89
90 # Fix up the man pages
91 if [ "%{_mandir}" != "/usr/share/man" ]; then
92         mkdir -p %{buildroot}%{_mandir}
93         mv %{buildroot}/usr/man/* %{buildroot}%{_mandir}/
94 fi
95
96 %post
97 /sbin/ldconfig
98
99 %postun
100 /sbin/ldconfig
101
102 %clean
103 rm -rf %{buildroot}
104
105 %files
106 %defattr (-, root, root)
107 %doc 00README CONTRIBUTORS COPYING COPYRIGHT NEWS PROJECTS
108 %doc README THREADS TODO
109 %doc docs/[a-z]* html/[a-z]*
110 %doc examples/*.cgi
111 %{_bindir}/rrdcgi
112 %{_bindir}/rrdtool
113 %{_bindir}/rrdupdate
114 %{_libdir}/librrd.so.%{sover}
115 %{_libdir}/librrd_th.so.%{sover}
116 %{_mandir}/man1/[a-z]*
117 %{deffont}
118
119 %files devel
120 %defattr (-, root, root)
121 %{_includedir}/rrd.h
122 %{_libdir}/librrd.a
123 %{_libdir}/librrd.la
124 %{_libdir}/librrd.so
125 %{_libdir}/librrd_th.a
126 %{_libdir}/librrd_th.la
127 %{_libdir}/librrd_th.so
128
129 %files perl
130 %doc examples/*.pl
131 %doc docs/RRD* html/RRD*
132 %defattr (-, root, root)
133 %{perlsite}/RRDp.pm
134 %{perlsite}/RRDs.pm
135 %dir %{perlsite}/auto/RRDs
136 %{perlsite}/auto/RRDs/RRDs.so
137 %{_mandir}/man1/RRDp.1*
138 %{_mandir}/man1/RRDs.1*
139
140 %files python
141 %{_libdir}/python*/site-packages/*
142
143 %changelog
144 * Wed May 11 2005 Alan Milligan <alan.milligan@last-bastion.net> 
145 - python support
146 * Wed May 26 2004 Mike Slifcak <slif@bellsouth.net> 1.1.0-0.1.20040526
147 - package examples with rrdtool-perl (decouple Perl from main package)
148 * Thu Apr 29 2004 Chris Adams <cmadams@hiwaay.net> 1.1.0-0.1.20040430
149 - initial build