michael@166: ## michael@166: ## rrdtool.spec -- OpenPKG RPM Package Specification michael@166: ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. michael@166: ## michael@166: ## Permission to use, copy, modify, and distribute this software for michael@166: ## any purpose with or without fee is hereby granted, provided that michael@166: ## the above copyright notice and this permission notice appear in all michael@166: ## copies. michael@166: ## michael@166: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@166: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@166: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@166: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@166: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@166: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@166: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@166: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@166: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@166: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@166: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@166: ## SUCH DAMAGE. michael@166: ## michael@166: michael@166: # package version michael@166: %define V_rrdtool 1.3.7 michael@166: %define V_rrdtool_oo 0.24 michael@166: %define V_rrdtool_creator 0.9 michael@166: %define V_rrd_simple 1.44 michael@166: michael@166: # package information michael@166: Name: rrdtool michael@166: Summary: Round Robin Database michael@166: URL: http://www.rrdtool.org/ michael@166: Vendor: Tobias Oetiker michael@166: Packager: OpenPKG Foundation e.V. michael@166: Distribution: OpenPKG Community michael@166: Class: BASE michael@166: Group: Database michael@166: License: LGPL michael@166: Version: %{V_rrdtool} michael@167: Release: 20090416 michael@166: michael@166: # package options michael@166: %option with_perl no michael@166: %option with_python no michael@166: michael@166: # list of sources michael@166: Source0: http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{V_rrdtool}.tar.gz michael@166: Source1: http://www.cpan.org/authors/id/M/MS/MSCHILLI/RRDTool-OO-%{V_rrdtool_oo}.tar.gz michael@166: Source2: http://www.cpan.org/authors/id/J/JA/JACQUELIN/RRDTool-Creator-%{V_rrdtool_creator}.tar.gz michael@166: Source3: http://www.cpan.org/authors/id/N/NI/NICOLAW/RRD-Simple-%{V_rrd_simple}.tar.gz michael@166: Patch0: rrdtool.patch michael@166: michael@166: # build information michael@166: Prefix: %{l_prefix} michael@166: BuildRoot: %{l_buildroot} michael@166: BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module michael@166: PreReq: OpenPKG, openpkg >= 20040130 michael@166: BuildPreReq: png, zlib, freetype, pango, cairo, libxml michael@166: PreReq: png, zlib, freetype, pango, cairo, libxml michael@166: %if "%{with_perl}" == "yes" michael@166: BuildPreReq: perl michael@166: PreReq: perl michael@166: %endif michael@166: %if "%{with_python}" == "yes" michael@166: BuildPreReq: python michael@166: PreReq: python michael@166: %endif michael@166: AutoReq: no michael@166: AutoReqProv: no michael@166: michael@166: %description michael@166: RRD is the Acronym for Round Robin Database. RRD is a system michael@166: to store and display time-series data (i.e. network bandwidth, michael@166: machine-room temperature, server load average). It stores the michael@166: data in a very compact way that will not expand over time, and it michael@166: presents useful graphs by processing the data to enforce a certain michael@166: data density. It can be used either via simple wrapper scripts (from michael@166: shell or Perl) or via frontends that poll network devices and put a michael@166: friendly user interface on it. michael@166: michael@166: %track michael@166: prog rrdtool = { michael@166: version = %{V_rrdtool} michael@166: url = http://oss.oetiker.ch/rrdtool/pub/ michael@166: regex = rrdtool-(__VER__)\.tar\.gz michael@166: } michael@166: prog rrdtool:RRDTool-OO = { michael@166: version = %{V_rrdtool_oo} michael@166: url = http://www.cpan.org/authors/id/M/MS/MSCHILLI/ michael@166: regex = RRDTool-OO-(__VER__)\.tar\.gz michael@166: } michael@166: prog rrdtool:RRDTool-Creator = { michael@166: version = %{V_rrdtool_creator} michael@166: url = http://www.cpan.org/authors/id/J/JA/JACQUELIN/ michael@166: regex = RRDTool-Creator-(__VER__)\.tar\.gz michael@166: } michael@166: prog rrdtool:RRD-Simple = { michael@166: version = %{V_rrd_simple} michael@166: url = http://www.cpan.org/authors/id/N/NI/NICOLAW/ michael@166: regex = RRD-Simple-(__VER__)\.tar\.gz michael@166: } michael@166: michael@166: %prep michael@166: %setup -q michael@166: %setup -q -D -T -a 1 michael@166: %setup -q -D -T -a 2 michael@166: %setup -q -D -T -a 3 michael@166: %patch -p0 michael@167: %{l_shtool} subst \ michael@167: -e 's;\-std=c99 *;;g' \ michael@167: configure michael@166: rm -f bindings/perl-shared/ntmake.pl michael@166: rm -rf RRDTool-Creator-*/_build michael@166: michael@166: %build michael@166: # configure package michael@167: ( echo "ac_cv_path_PERL=no" michael@167: echo "ac_cv_have_broken_isfinite=yes" michael@167: ) >config.cache michael@166: CC="%{l_cc}" \ michael@166: CPPFLAGS="%{l_cppflags}" \ michael@166: CFLAGS="%{l_cflags -O}" \ michael@166: LDLAGS="%{l_ldflags}" \ michael@166: LIBS="`pkg-config pangocairo --libs`" \ michael@166: ./configure \ michael@166: --cache-file=./config.cache \ michael@166: --prefix=%{l_prefix} \ michael@166: --mandir=%{l_prefix}/man \ michael@166: %if "%{with_python}" == "yes" michael@166: --enable-python \ michael@166: %else michael@166: --disable-python \ michael@166: %endif michael@166: --disable-tcl \ michael@166: --disable-ruby \ michael@166: --disable-shared \ michael@166: --enable-local-libpng \ michael@166: --enable-local-zlib \ michael@166: --enable-rrdcgi michael@166: michael@166: # build package michael@166: %{l_make} %{l_mflags} michael@166: michael@166: # build Perl part michael@166: %if "%{with_perl}" == "yes" michael@166: %{l_prefix}/bin/perl-openpkg prepare michael@166: %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped configure build michael@166: %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared configure build michael@166: %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} configure build michael@166: %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} configure build michael@166: %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build michael@166: %endif michael@166: michael@166: %install michael@166: rm -rf $RPM_BUILD_ROOT michael@166: michael@166: # install package michael@166: %{l_shtool} subst \ michael@166: -e 's/^\(install-data-am:\).*/\1/' \ michael@166: Makefile michael@166: %{l_make} %{l_mflags} install \ michael@166: DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" michael@166: michael@166: # install Perl part michael@166: %if "%{with_perl}" == "yes" michael@166: %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped install michael@166: %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install michael@166: %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} install michael@166: %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} install michael@166: %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} install michael@166: %endif michael@166: michael@166: # strip down installation hierarchy michael@166: rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc michael@166: %if "%{with_python}" == "no" michael@166: rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python michael@166: %endif michael@166: rm -rf $RPM_BUILD_ROOT%{l_prefix}/rrdtool-* michael@166: rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/rrdtutorial.es.1 michael@166: rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale michael@166: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true michael@166: michael@166: # post-process Perl part michael@166: %if "%{with_perl}" == "yes" michael@166: %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup michael@166: %else michael@166: >perl-openpkg-files michael@166: %endif michael@166: michael@166: # determine installation files michael@166: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@166: %{l_files_std} `cat perl-openpkg-files` michael@166: michael@166: %files -f files michael@166: michael@166: %clean michael@166: rm -rf $RPM_BUILD_ROOT michael@166: