updated spec file -- Chris Adams <cmadams@hiwaay.net>
[rrdtool.git] / rrdtool.spec
1 %define cvsdate 2004-04-30
2 %define cvsver %(echo %{cvsdate} | tr -d -)
3 %define sover 1.0.2
4
5 Summary: Round Robin Database Tools
6 Name: rrdtool
7 Version: 1.1.0
8 Release: 0.1.%{cvsver}
9 License: GPL
10 Group: Applications/Networking
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
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: rrdtool = %{version}-%{release}
33
34 %description devel
35 The RRD Tools development library.
36
37 %package perl
38 Summary: RRD Tool Perl interface
39 Group: Applications/Networking
40 Requires: rrdtool = %{version}-%{release}
41
42 %description perl
43 The RRD Tools Perl modules.
44
45 %prep
46 %setup -q -n rrdtool-%{cvsdate}
47
48 mkdir config
49 cd config
50 ln -s ../mkinstalldirs .
51 cd ..
52
53 %define deffont %{_datadir}/fonts/VeraMono.ttf
54 perl -pi -e 's!^(#define\s+RRD_DEFAULT_FONT\s+).*!$1"%{deffont}"!' src/rrd_graph.c
55
56 %build
57 CPPFLAGS="-I/usr/include/libart-2.0 -I/usr/include/freetype2"
58 export CPPFLAGS
59 %configure
60 make
61
62 %install
63 rm -rf %{buildroot}
64 %makeinstall
65
66 # Install the font
67 mkdir -p %{buildroot}%{_datadir}/fonts
68 install -m 644 src/VeraMono.ttf %{buildroot}%{deffont}
69
70 # Fix up the documentation
71 [ -d docs ] && mv docs docs.src
72 mv %{buildroot}/usr/doc docs
73 [ -d examples ] && mv examples examples.src
74 mv %{buildroot}/usr/examples examples
75 [ -d html ] && mv html html.src
76 mv %{buildroot}/usr/html html
77
78 # Fix up the perl
79 %define perlsite %(perl -MConfig -e 'print $Config{"installsitearch"}')
80 mkdir -p %{buildroot}%{perlsite}
81 mv %{buildroot}%{_libdir}/perl/* %{buildroot}%{perlsite}
82 rmdir %{buildroot}%{_libdir}/perl
83
84 # Fix up the man pages
85 if [ "%{_mandir}" != "/usr/man" ]; then
86         mkdir -p %{buildroot}%{_mandir}
87         mv %{buildroot}/usr/man/* %{buildroot}%{_mandir}/
88 fi
89
90 %post
91 /sbin/ldconfig
92
93 %postun
94 /sbin/ldconfig
95
96 %clean
97 rm -rf %{buildroot}
98
99 %files
100 %defattr (-, root, root)
101 %doc 00README CONTRIBUTORS COPYING COPYRIGHT ChangeLog NEWS PROJECTS
102 %doc README THREADS TODO examples
103 %doc docs examples html
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 %defattr (-, root, root)
124 %{perlsite}/RRDp.pm
125 %{perlsite}/RRDs.pm
126 %dir %{perlsite}/auto/RRDs
127 %{perlsite}/auto/RRDs/RRDs.bs
128 %{perlsite}/auto/RRDs/RRDs.so
129 %{_mandir}/man1/RRDp.1*
130 %{_mandir}/man1/RRDs.1*
131
132 %changelog
133 * Thu Apr 29 2004 Chris Adams <cmadams@hiwaay.net> 1.1.0-0.1.20040430
134 - initial build