rrdtool/rrdtool.spec

Wed, 08 Aug 2012 20:31:17 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 08 Aug 2012 20:31:17 +0200
changeset 491
ccaf26ae9b81
parent 490
615d51fb3fea
child 492
e66ba21516b4
permissions
-rw-r--r--

Resynchronize with upstream package maintainer version.

     1 ##
     2 ##  rrdtool.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package version
    25 %define       V_rrdtool          1.4.7
    26 %define       V_rrdtool_oo       0.32
    27 %define       V_rrdtool_creator  1.0
    28 %define       V_rrd_simple       1.44
    30 #   package information
    31 Name:         rrdtool
    32 Summary:      Round Robin Database
    33 URL:          http://www.rrdtool.org/
    34 Vendor:       Tobias Oetiker
    35 Packager:     OpenPKG Foundation e.V.
    36 Distribution: OpenPKG Community
    37 Class:        BASE
    38 Group:        Database
    39 License:      LGPL
    40 Version:      %{V_rrdtool}
    41 Release:      20120308
    43 #   package options
    44 %option       with_perl        no
    45 %option       with_python      no
    47 #   list of sources
    48 Source0:      http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{V_rrdtool}.tar.gz
    49 Source1:      http://www.cpan.org/authors/id/M/MS/MSCHILLI/RRDTool-OO-%{V_rrdtool_oo}.tar.gz
    50 Source2:      http://www.cpan.org/authors/id/J/JA/JACQUELIN/RRDTool-Creator-%{V_rrdtool_creator}.tar.gz
    51 Source3:      http://www.cpan.org/authors/id/N/NI/NICOLAW/RRD-Simple-%{V_rrd_simple}.tar.gz
    52 Patch0:       rrdtool.patch
    54 #   build information
    55 BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module, intltool
    56 PreReq:       OpenPKG, openpkg >= 20100101
    57 BuildPreReq:  png, zlib, freetype, pango, cairo, libxml
    58 PreReq:       png, zlib, freetype, pango, cairo, libxml
    59 %if "%{with_perl}" == "yes"
    60 BuildPreReq:  perl
    61 PreReq:       perl
    62 %endif
    63 %if "%{with_python}" == "yes"
    64 BuildPreReq:  python
    65 PreReq:       python
    66 %endif
    68 %description
    69     RRD is the Acronym for Round Robin Database. RRD is a system
    70     to store and display time-series data (i.e. network bandwidth,
    71     machine-room temperature, server load average). It stores the
    72     data in a very compact way that will not expand over time, and it
    73     presents useful graphs by processing the data to enforce a certain
    74     data density. It can be used either via simple wrapper scripts (from
    75     shell or Perl) or via frontends that poll network devices and put a
    76     friendly user interface on it.
    78 %track
    79     prog rrdtool = {
    80         version   = %{V_rrdtool}
    81         url       = http://oss.oetiker.ch/rrdtool/pub/
    82         regex     = rrdtool-(__VER__)\.tar\.gz
    83     }
    84     prog rrdtool:RRDTool-OO = {
    85         version   = %{V_rrdtool_oo}
    86         url       = http://www.cpan.org/authors/id/M/MS/MSCHILLI/
    87         regex     = RRDTool-OO-(__VER__)\.tar\.gz
    88     }
    89     prog rrdtool:RRDTool-Creator = {
    90         version   = %{V_rrdtool_creator}
    91         url       = http://www.cpan.org/authors/id/J/JA/JACQUELIN/
    92         regex     = RRDTool-Creator-(__VER__)\.tar\.gz
    93     }
    94     prog rrdtool:RRD-Simple = {
    95         version   = %{V_rrd_simple}
    96         url       = http://www.cpan.org/authors/id/N/NI/NICOLAW/
    97         regex     = RRD-Simple-(__VER__)\.tar\.gz
    98     }
   100 %prep
   101     %setup -q
   102     %setup -q -D -T -a 1
   103     %setup -q -D -T -a 2
   104     %setup -q -D -T -a 3
   105     %patch -p0
   106     rm -f bindings/perl-shared/ntmake.pl
   107     rm -rf RRDTool-Creator-*/_build
   109 %build
   110     #   configure package
   111     echo "ac_cv_path_PERL=no" >config.cache
   112     CC="%{l_cc}" \
   113     CPPFLAGS="%{l_cppflags}" \
   114     CFLAGS="%{l_cflags -O}" \
   115     LDLAGS="%{l_ldflags}" \
   116     LIBS="`pkg-config pangocairo --libs`" \
   117     ./configure \
   118         --cache-file=./config.cache \
   119         --prefix=%{l_prefix} \
   120         --mandir=%{l_prefix}/man \
   121 %if "%{with_python}" == "yes"
   122         --enable-python \
   123 %else
   124         --disable-python \
   125 %endif
   126         --disable-tcl \
   127         --disable-ruby \
   128         --disable-shared \
   129         --disable-nls \
   130         --enable-rrdcgi
   132     #   build package
   133     %{l_make} %{l_mflags}
   135     #   build Perl part
   136 %if "%{with_perl}" == "yes"
   137     %{l_prefix}/bin/perl-openpkg prepare
   138     %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped  configure build
   139     %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared configure build
   140     %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} configure build
   141     %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} configure build
   142     %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build
   143 %endif
   145 %install
   147     #   install package
   148     %{l_shtool} subst \
   149         -e 's/^\(install-data-am:\).*/\1/' \
   150         Makefile
   151     %{l_make} %{l_mflags} install \
   152         DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   154     #   install Perl part
   155 %if "%{with_perl}" == "yes"
   156     %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped  install
   157     %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install
   158     %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} install
   159     %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} install
   160     %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} install
   161 %endif
   163     #   strip down installation hierarchy
   164     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
   165 %if "%{with_python}" == "no"
   166     rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python
   167 %endif
   168     rm -rf $RPM_BUILD_ROOT%{l_prefix}/rrdtool-*
   169     rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/rrdtutorial.es.1
   170     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   171     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   173     #   post-process Perl part
   174 %if "%{with_perl}" == "yes"
   175     %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
   176 %else
   177     >perl-openpkg-files
   178 %endif
   180     #   determine installation files
   181     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   182         %{l_files_std} `cat perl-openpkg-files`
   184 %files -f files
   186 %clean

mercurial