SHA256
1
0
forked from pool/rrdtool
Pascal Bleser
2010-12-28 03:02:19 +00:00
committed by Git OBS Bridge
parent 2841d93f63
commit ac5285b28c
8 changed files with 128 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
#
# spec file for package rrdtool (Version 1.4.4)
# spec file for package rrdtool (Version 1.4.5)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,14 +20,21 @@
Name: rrdtool
BuildRequires: cairo-devel freetype2-devel gettext-tools glib2-devel intltool libart_lgpl-devel libpng-devel libxml2-devel pango-devel python-devel tcl-devel
BuildRequires: ruby-devel
BuildRequires: lua-devel
BuildRequires: autoconf automake libtool
BuildRequires: tcpd-devel
License: GPLv2+
Group: Productivity/Scientific/Math
AutoReqProv: on
Requires: perl = %{perl_version}
Version: 1.4.4
Release: 2
Version: 1.4.5
%define cgilib_version 0.7
Release: 1
# http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{version}.tar.gz
Source: %{name}-%{version}.tar.bz2
Source1: cgilib-0.5.tar.bz2
Patch1: rrdtool-lua_lib64.patch
# http://www.infodrom.org/projects/cgilib/download/cgilib-%{cgilib_version}.tar.gz
Source1: cgilib-%{cgilib_version}.tar.bz2
Patch11: cgilib-fix_automake.patch
Url: http://oss.oetiker.ch/rrdtool/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: A tool for data logging and analysis
@@ -41,27 +48,45 @@ definable time period.
%prep
%setup -q -a1
%if %{_lib}==lib64
%patch1
%endif
pushd "cgilib-%{cgilib_version}"
%patch11
popd #cgilib
%build
# first prepare cgilib
cd cgilib*
make CC=gcc CFLAGS="$RPM_OPT_FLAGS -fPIC -I. -fexcess-precision=fast"
mkdir -p ../lb/include
cp *.h ../lb/include
mkdir -p ../lb/lib
cp libcgi* ../lb/lib
cd ..
pushd cgilib-%{cgilib_version}
echo -n > NEWS
aclocal --force
autoreconf -fiv
CFLAGS="%{optflags} -fPIC -I. -fexcess-precision=fast" \
%configure
make %{?jobs:-j %jobs}
%__mkdir_p ../lb/include
%__cp *.h ../lb/include/
%__mkdir_p ../lb/lib/
%__cp -a .libs/libcgi.so* ../lb/lib/
popd #cgilib
# build rrdtool
%{suse_update_config}
if [ ! -d m4 ]; then mkdir m4; fi
# we need getext 0.18
#autoreconf -i -f
%if %{_lib}==lib64
# don't pass -i to autoreconf, that'll run autopoint which will go
# nuts because of the supposedly outdated gettext version:
autoreconf -fv
%endif
export LDFLAGS="-L`pwd`/lb/lib" CPPFLAGS="-I`pwd`/lb/include" \
%configure --disable-static --with-pic --enable-shared \
--with-tcllib=%{_libdir} \
--with-gnu-ld \
--disable-rpath \
--with-rrd-default-font="monospace"
make %{?jobs:-j %jobs}
make %{?jobs:-j %jobs} V=1
%install
#eval `perl -V:installarchlib`
@@ -94,7 +119,7 @@ popd
#mv tmp $RPM_BUILD_ROOT/%{_libdir}/librrd.la
#sed 's/[[:space:]]*-L\/usr\/src\/packages\/BUILD\/%{name}-%{version}\/lb\/lib[[:space:]]*/ /' $RPM_BUILD_ROOT/%{_libdir}/librrd_th.la > tmp
#mv tmp $RPM_BUILD_ROOT/%{_libdir}/librrd_th.la
rm $RPM_BUILD_ROOT/%{_libdir}/*.la
find "%{buildroot}" -type f -name '*.la' -exec %__rm {} \;
# documentation
install -m 644 CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO $RPM_BUILD_ROOT/%{_docdir}/%{name}
# Script libraries for Tcl extensions should be in a package-specific
@@ -167,4 +192,23 @@ This package contains the Python bindings
%defattr(-, root, root)
%{py_sitedir}/*
%package -n lua-rrdtool
License: GPLv2+
Summary: Lua bindings for rrdtool
Group: Productivity/Scientific/Math
Requires: %name = %version
%description -n lua-rrdtool
A tool to log and analyze data gathered from all kinds of data sources.
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.
This package contains the Lua bindings
%files -n lua-rrdtool
%defattr(-, root, root)
%{_libdir}/lua/*/rrd.so
%{_libdir}/lua/*/rrd.so.*
%changelog