From: oetiker Date: Tue, 4 May 2004 20:54:47 +0000 (+0000) Subject: updated spec file -- Chris Adams X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=45b476d7b011e39e4c8486ded2c8b2edd52f4e6b;p=rrdtool.git updated spec file -- Chris Adams git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@246 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/rrdtool.spec b/rrdtool.spec index 9053da4..e1df5ba 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -1,18 +1,20 @@ -%define name rrdtool -%define ver 1.0.21 -%define extension tar.gz +%define cvsdate 2004-04-30 +%define cvsver %(echo %{cvsdate} | tr -d -) +%define sover 1.0.2 Summary: Round Robin Database Tools -Name: %name -Version: %{ver} -Release: 2 -Copyright: GPL +Name: rrdtool +Version: 1.1.0 +Release: 0.1.%{cvsver} +License: GPL Group: Applications/Networking -Source: %{name}-%{ver}.%{extension} -Patch0: rrdtool-perldestdir.patch -Patch1: rrdtool-tcldestdir.patch -URL: http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/ -Buildroot: /tmp/%{name}-%{ver}-root +Source: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/beta/rrdtool-cvs-snap.tar.gz +URL: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ +Buildroot: /tmp/%{name}-root + +BuildRequires: perl +BuildRequires: cgilib +BuildRequires: freetype-devel libart_lgpl-devel libpng-devel zlib-devel %description It is pretty easy to gather status information from all sorts of things, @@ -24,31 +26,109 @@ all kinds of data-sources (DS). The data analysis part of RRDtool is based on the ability to quickly generate graphical representations of the data values collected over a definable time period. +%package devel +Summary: RRD Tool development libraries and header files +Group: Development/Libraries +Requires: rrdtool = %{version}-%{release} + +%description devel +The RRD Tools development library. + +%package perl +Summary: RRD Tool Perl interface +Group: Applications/Networking +Requires: rrdtool = %{version}-%{release} + +%description perl +The RRD Tools Perl modules. + %prep -%setup -%patch0 -p1 -%patch1 -p1 +%setup -q -n rrdtool-%{cvsdate} + +mkdir config +cd config +ln -s ../mkinstalldirs . +cd .. + +%define deffont %{_datadir}/fonts/VeraMono.ttf +perl -pi -e 's!^(#define\s+RRD_DEFAULT_FONT\s+).*!$1"%{deffont}"!' src/rrd_graph.c + %build -./configure --with-tcllib=/usr/lib --prefix=/usr +CPPFLAGS="-I/usr/include/libart-2.0 -I/usr/include/freetype2" +export CPPFLAGS +%configure make %install -make install DESTDIR=${RPM_BUILD_ROOT} -# install tcl interface... -make site-tcl-install DESTDIR=${RPM_BUILD_ROOT} -# rpm uses /doc for its file restructuring... -mv ${RPM_BUILD_ROOT}/usr/doc ${RPM_BUILD_ROOT}/usr/txt +rm -rf %{buildroot} +%makeinstall + +# Install the font +mkdir -p %{buildroot}%{_datadir}/fonts +install -m 644 src/VeraMono.ttf %{buildroot}%{deffont} + +# Fix up the documentation +[ -d docs ] && mv docs docs.src +mv %{buildroot}/usr/doc docs +[ -d examples ] && mv examples examples.src +mv %{buildroot}/usr/examples examples +[ -d html ] && mv html html.src +mv %{buildroot}/usr/html html + +# Fix up the perl +%define perlsite %(perl -MConfig -e 'print $Config{"installsitearch"}') +mkdir -p %{buildroot}%{perlsite} +mv %{buildroot}%{_libdir}/perl/* %{buildroot}%{perlsite} +rmdir %{buildroot}%{_libdir}/perl + +# Fix up the man pages +if [ "%{_mandir}" != "/usr/man" ]; then + mkdir -p %{buildroot}%{_mandir} + mv %{buildroot}/usr/man/* %{buildroot}%{_mandir}/ +fi + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files -%doc CHANGES CONTRIBUTORS COPYING COPYRIGHT NT-BUILD-TIPS.txt README TODO -%doc ${RPM_BUILD_ROOT}/usr/contrib/ -%doc ${RPM_BUILD_ROOT}/usr/txt/ -%doc ${RPM_BUILD_ROOT}/usr/examples/ -%doc ${RPM_BUILD_ROOT}/usr/html/ -/usr/man/ -/usr/bin/ -/usr/lib/ +%defattr (-, root, root) +%doc 00README CONTRIBUTORS COPYING COPYRIGHT ChangeLog NEWS PROJECTS +%doc README THREADS TODO examples +%doc docs examples html +%{_bindir}/rrdcgi +%{_bindir}/rrdtool +%{_bindir}/rrdupdate +%{_libdir}/librrd.so.%{sover} +%{_libdir}/librrd_th.so.%{sover} +%{_mandir}/man1/[a-z]* +%{deffont} + +%files devel +%defattr (-, root, root) +%{_includedir}/rrd.h +%{_libdir}/librrd.a +%{_libdir}/librrd.la +%{_libdir}/librrd.so +%{_libdir}/librrd_th.a +%{_libdir}/librrd_th.la +%{_libdir}/librrd_th.so + +%files perl +%defattr (-, root, root) +%{perlsite}/RRDp.pm +%{perlsite}/RRDs.pm +%dir %{perlsite}/auto/RRDs +%{perlsite}/auto/RRDs/RRDs.bs +%{perlsite}/auto/RRDs/RRDs.so +%{_mandir}/man1/RRDp.1* +%{_mandir}/man1/RRDs.1* +%changelog +* Thu Apr 29 2004 Chris Adams 1.1.0-0.1.20040430 +- initial build