3b6db966f26881222c7885fdac7f277771c79ed3
[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.1.0
8 Release: %{cvsver}
9 License: GPL
10 Group: Applications/Databases
11 Source: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/beta/rrdtool-cvs-snap.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 %prep
46 %setup -q -n rrdtool-%{cvsdate}
47
48 %define deffont %{_datadir}/%{name}/fonts/VeraMono.ttf
49
50 %build
51 CPPFLAGS="-I/usr/include/libart-2.0 -I/usr/include/freetype2"
52 export CPPFLAGS
53 aclocal > /tmp/aclocal.out 2>&1
54 automake
55 autoconf
56 %configure
57 make
58
59 %install
60 rm -rf %{buildroot}
61 %makeinstall
62
63 # Install the font
64 mkdir -p %{buildroot}%{_datadir}/fonts
65 install -m 644 src/VeraMono.ttf %{buildroot}%{deffont}
66
67 # Fix up the documentation
68 [ -d docs ] && mv docs docs.src
69 mv %{buildroot}/usr/doc docs
70 rm -f docs/*.pod
71 [ -d examples ] && mv examples examples.src
72 mv %{buildroot}/usr/examples examples
73 [ -d html ] && mv html html.src
74 mv %{buildroot}/usr/html html
75
76 # Fix up the perl
77 %define perlsite %(perl -MConfig -e 'print $Config{"installsitearch"}')
78 mkdir -p %{buildroot}%{perlsite}
79 mv %{buildroot}%{_libdir}/perl/* %{buildroot}%{perlsite}
80 rmdir %{buildroot}%{_libdir}/perl
81 rm -f %{buildroot}/%{perlsite}/auto/RRDs/RRDs.bs
82
83 # Fix up the man pages
84 if [ "%{_mandir}" != "/usr/share/man" ]; then
85         mkdir -p %{buildroot}%{_mandir}
86         mv %{buildroot}/usr/man/* %{buildroot}%{_mandir}/
87 fi
88
89 %post
90 /sbin/ldconfig
91
92 %postun
93 /sbin/ldconfig
94
95 %clean
96 rm -rf %{buildroot}
97
98 %files
99 %defattr (-, root, root)
100 %doc 00README CONTRIBUTORS COPYING COPYRIGHT ChangeLog NEWS PROJECTS
101 %doc README THREADS TODO
102 %doc docs/[a-z]* html/[a-z]*
103 %doc examples/*.cgi
104 %{_bindir}/rrdcgi
105 %{_bindir}/rrdtool
106 %{_bindir}/rrdupdate
107 %{_libdir}/librrd.so.%{sover}
108 %{_libdir}/librrd_th.so.%{sover}
109 %{_mandir}/man1/[a-z]*
110 %{deffont}
111
112 %files devel
113 %defattr (-, root, root)
114 %{_includedir}/rrd.h
115 %{_libdir}/librrd.a
116 %{_libdir}/librrd.la
117 %{_libdir}/librrd.so
118 %{_libdir}/librrd_th.a
119 %{_libdir}/librrd_th.la
120 %{_libdir}/librrd_th.so
121
122 %files perl
123 %doc examples/*.pl
124 %doc docs/RRD* html/RRD*
125 %defattr (-, root, root)
126 %{perlsite}/RRDp.pm
127 %{perlsite}/RRDs.pm
128 %dir %{perlsite}/auto/RRDs
129 %{perlsite}/auto/RRDs/RRDs.so
130 %{_mandir}/man1/RRDp.1*
131 %{_mandir}/man1/RRDs.1*
132
133 %changelog
134 * Thu Apr 29 2004 Chris Adams <cmadams@hiwaay.net> 1.1.0-0.1.20040430
135 - initial build