rrdtool/rrdtool.spec

Sat, 18 Apr 2009 18:41:04 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 18 Apr 2009 18:41:04 +0200
changeset 166
5802a00cd337
child 167
ac03bde00b0e
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

     1 ##
     2 ##  rrdtool.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2009 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.3.7
    26 %define       V_rrdtool_oo       0.24
    27 %define       V_rrdtool_creator  0.9
    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:      20090407
    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 Prefix:       %{l_prefix}
    56 BuildRoot:    %{l_buildroot}
    57 BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module
    58 PreReq:       OpenPKG, openpkg >= 20040130
    59 BuildPreReq:  png, zlib, freetype, pango, cairo, libxml
    60 PreReq:       png, zlib, freetype, pango, cairo, libxml
    61 %if "%{with_perl}" == "yes"
    62 BuildPreReq:  perl
    63 PreReq:       perl
    64 %endif
    65 %if "%{with_python}" == "yes"
    66 BuildPreReq:  python
    67 PreReq:       python
    68 %endif
    69 AutoReq:      no
    70 AutoReqProv:  no
    72 %description
    73     RRD is the Acronym for Round Robin Database. RRD is a system
    74     to store and display time-series data (i.e. network bandwidth,
    75     machine-room temperature, server load average). It stores the
    76     data in a very compact way that will not expand over time, and it
    77     presents useful graphs by processing the data to enforce a certain
    78     data density. It can be used either via simple wrapper scripts (from
    79     shell or Perl) or via frontends that poll network devices and put a
    80     friendly user interface on it.
    82 %track
    83     prog rrdtool = {
    84         version   = %{V_rrdtool}
    85         url       = http://oss.oetiker.ch/rrdtool/pub/
    86         regex     = rrdtool-(__VER__)\.tar\.gz
    87     }
    88     prog rrdtool:RRDTool-OO = {
    89         version   = %{V_rrdtool_oo}
    90         url       = http://www.cpan.org/authors/id/M/MS/MSCHILLI/
    91         regex     = RRDTool-OO-(__VER__)\.tar\.gz
    92     }
    93     prog rrdtool:RRDTool-Creator = {
    94         version   = %{V_rrdtool_creator}
    95         url       = http://www.cpan.org/authors/id/J/JA/JACQUELIN/
    96         regex     = RRDTool-Creator-(__VER__)\.tar\.gz
    97     }
    98     prog rrdtool:RRD-Simple = {
    99         version   = %{V_rrd_simple}
   100         url       = http://www.cpan.org/authors/id/N/NI/NICOLAW/
   101         regex     = RRD-Simple-(__VER__)\.tar\.gz
   102     }
   104 %prep
   105     %setup -q
   106     %setup -q -D -T -a 1
   107     %setup -q -D -T -a 2
   108     %setup -q -D -T -a 3
   109     %patch -p0
   110     rm -f bindings/perl-shared/ntmake.pl
   111     rm -rf RRDTool-Creator-*/_build
   113 %build
   114     #   configure package
   115     echo "ac_cv_path_PERL=no" >config.cache
   116     CC="%{l_cc}" \
   117     CPPFLAGS="%{l_cppflags}" \
   118     CFLAGS="%{l_cflags -O}" \
   119     LDLAGS="%{l_ldflags}" \
   120     LIBS="`pkg-config pangocairo --libs`" \
   121     ./configure \
   122         --cache-file=./config.cache \
   123         --prefix=%{l_prefix} \
   124         --mandir=%{l_prefix}/man \
   125 %if "%{with_python}" == "yes"
   126         --enable-python \
   127 %else
   128         --disable-python \
   129 %endif
   130         --disable-tcl \
   131         --disable-ruby \
   132         --disable-shared \
   133         --enable-local-libpng \
   134         --enable-local-zlib \
   135         --enable-rrdcgi
   137     #   build package
   138     %{l_make} %{l_mflags}
   140     #   build Perl part
   141 %if "%{with_perl}" == "yes"
   142     %{l_prefix}/bin/perl-openpkg prepare
   143     %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped  configure build
   144     %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared configure build
   145     %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} configure build
   146     %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} configure build
   147     %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build
   148 %endif
   150 %install
   151     rm -rf $RPM_BUILD_ROOT
   153     #   install package
   154     %{l_shtool} subst \
   155         -e 's/^\(install-data-am:\).*/\1/' \
   156         Makefile
   157     %{l_make} %{l_mflags} install \
   158         DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   160     #   install Perl part
   161 %if "%{with_perl}" == "yes"
   162     %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped  install
   163     %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install
   164     %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} install
   165     %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} install
   166     %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} install
   167 %endif
   169     #   strip down installation hierarchy
   170     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
   171 %if "%{with_python}" == "no"
   172     rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python
   173 %endif
   174     rm -rf $RPM_BUILD_ROOT%{l_prefix}/rrdtool-*
   175     rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/rrdtutorial.es.1
   176     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   177     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   179     #   post-process Perl part
   180 %if "%{with_perl}" == "yes"
   181     %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
   182 %else
   183     >perl-openpkg-files
   184 %endif
   186     #   determine installation files
   187     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   188         %{l_files_std} `cat perl-openpkg-files`
   190 %files -f files
   192 %clean
   193     rm -rf $RPM_BUILD_ROOT

mercurial