rrdtool/rrdtool.spec

changeset 166
5802a00cd337
child 167
ac03bde00b0e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/rrdtool/rrdtool.spec	Sat Apr 18 18:41:04 2009 +0200
     1.3 @@ -0,0 +1,194 @@
     1.4 +##
     1.5 +##  rrdtool.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package version
    1.28 +%define       V_rrdtool          1.3.7
    1.29 +%define       V_rrdtool_oo       0.24
    1.30 +%define       V_rrdtool_creator  0.9
    1.31 +%define       V_rrd_simple       1.44
    1.32 +
    1.33 +#   package information
    1.34 +Name:         rrdtool
    1.35 +Summary:      Round Robin Database
    1.36 +URL:          http://www.rrdtool.org/
    1.37 +Vendor:       Tobias Oetiker
    1.38 +Packager:     OpenPKG Foundation e.V.
    1.39 +Distribution: OpenPKG Community
    1.40 +Class:        BASE
    1.41 +Group:        Database
    1.42 +License:      LGPL
    1.43 +Version:      %{V_rrdtool}
    1.44 +Release:      20090407
    1.45 +
    1.46 +#   package options
    1.47 +%option       with_perl        no
    1.48 +%option       with_python      no
    1.49 +
    1.50 +#   list of sources
    1.51 +Source0:      http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{V_rrdtool}.tar.gz
    1.52 +Source1:      http://www.cpan.org/authors/id/M/MS/MSCHILLI/RRDTool-OO-%{V_rrdtool_oo}.tar.gz
    1.53 +Source2:      http://www.cpan.org/authors/id/J/JA/JACQUELIN/RRDTool-Creator-%{V_rrdtool_creator}.tar.gz
    1.54 +Source3:      http://www.cpan.org/authors/id/N/NI/NICOLAW/RRD-Simple-%{V_rrd_simple}.tar.gz
    1.55 +Patch0:       rrdtool.patch
    1.56 +
    1.57 +#   build information
    1.58 +Prefix:       %{l_prefix}
    1.59 +BuildRoot:    %{l_buildroot}
    1.60 +BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module
    1.61 +PreReq:       OpenPKG, openpkg >= 20040130
    1.62 +BuildPreReq:  png, zlib, freetype, pango, cairo, libxml
    1.63 +PreReq:       png, zlib, freetype, pango, cairo, libxml
    1.64 +%if "%{with_perl}" == "yes"
    1.65 +BuildPreReq:  perl
    1.66 +PreReq:       perl
    1.67 +%endif
    1.68 +%if "%{with_python}" == "yes"
    1.69 +BuildPreReq:  python
    1.70 +PreReq:       python
    1.71 +%endif
    1.72 +AutoReq:      no
    1.73 +AutoReqProv:  no
    1.74 +
    1.75 +%description
    1.76 +    RRD is the Acronym for Round Robin Database. RRD is a system
    1.77 +    to store and display time-series data (i.e. network bandwidth,
    1.78 +    machine-room temperature, server load average). It stores the
    1.79 +    data in a very compact way that will not expand over time, and it
    1.80 +    presents useful graphs by processing the data to enforce a certain
    1.81 +    data density. It can be used either via simple wrapper scripts (from
    1.82 +    shell or Perl) or via frontends that poll network devices and put a
    1.83 +    friendly user interface on it.
    1.84 +
    1.85 +%track
    1.86 +    prog rrdtool = {
    1.87 +        version   = %{V_rrdtool}
    1.88 +        url       = http://oss.oetiker.ch/rrdtool/pub/
    1.89 +        regex     = rrdtool-(__VER__)\.tar\.gz
    1.90 +    }
    1.91 +    prog rrdtool:RRDTool-OO = {
    1.92 +        version   = %{V_rrdtool_oo}
    1.93 +        url       = http://www.cpan.org/authors/id/M/MS/MSCHILLI/
    1.94 +        regex     = RRDTool-OO-(__VER__)\.tar\.gz
    1.95 +    }
    1.96 +    prog rrdtool:RRDTool-Creator = {
    1.97 +        version   = %{V_rrdtool_creator}
    1.98 +        url       = http://www.cpan.org/authors/id/J/JA/JACQUELIN/
    1.99 +        regex     = RRDTool-Creator-(__VER__)\.tar\.gz
   1.100 +    }
   1.101 +    prog rrdtool:RRD-Simple = {
   1.102 +        version   = %{V_rrd_simple}
   1.103 +        url       = http://www.cpan.org/authors/id/N/NI/NICOLAW/
   1.104 +        regex     = RRD-Simple-(__VER__)\.tar\.gz
   1.105 +    }
   1.106 +
   1.107 +%prep
   1.108 +    %setup -q
   1.109 +    %setup -q -D -T -a 1
   1.110 +    %setup -q -D -T -a 2
   1.111 +    %setup -q -D -T -a 3
   1.112 +    %patch -p0
   1.113 +    rm -f bindings/perl-shared/ntmake.pl
   1.114 +    rm -rf RRDTool-Creator-*/_build
   1.115 +
   1.116 +%build
   1.117 +    #   configure package
   1.118 +    echo "ac_cv_path_PERL=no" >config.cache
   1.119 +    CC="%{l_cc}" \
   1.120 +    CPPFLAGS="%{l_cppflags}" \
   1.121 +    CFLAGS="%{l_cflags -O}" \
   1.122 +    LDLAGS="%{l_ldflags}" \
   1.123 +    LIBS="`pkg-config pangocairo --libs`" \
   1.124 +    ./configure \
   1.125 +        --cache-file=./config.cache \
   1.126 +        --prefix=%{l_prefix} \
   1.127 +        --mandir=%{l_prefix}/man \
   1.128 +%if "%{with_python}" == "yes"
   1.129 +        --enable-python \
   1.130 +%else
   1.131 +        --disable-python \
   1.132 +%endif
   1.133 +        --disable-tcl \
   1.134 +        --disable-ruby \
   1.135 +        --disable-shared \
   1.136 +        --enable-local-libpng \
   1.137 +        --enable-local-zlib \
   1.138 +        --enable-rrdcgi
   1.139 +
   1.140 +    #   build package
   1.141 +    %{l_make} %{l_mflags}
   1.142 +
   1.143 +    #   build Perl part
   1.144 +%if "%{with_perl}" == "yes"
   1.145 +    %{l_prefix}/bin/perl-openpkg prepare
   1.146 +    %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped  configure build
   1.147 +    %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared configure build
   1.148 +    %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} configure build
   1.149 +    %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} configure build
   1.150 +    %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build
   1.151 +%endif
   1.152 +
   1.153 +%install
   1.154 +    rm -rf $RPM_BUILD_ROOT
   1.155 +
   1.156 +    #   install package
   1.157 +    %{l_shtool} subst \
   1.158 +        -e 's/^\(install-data-am:\).*/\1/' \
   1.159 +        Makefile
   1.160 +    %{l_make} %{l_mflags} install \
   1.161 +        DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   1.162 +
   1.163 +    #   install Perl part
   1.164 +%if "%{with_perl}" == "yes"
   1.165 +    %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped  install
   1.166 +    %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install
   1.167 +    %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} install
   1.168 +    %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} install
   1.169 +    %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} install
   1.170 +%endif
   1.171 +
   1.172 +    #   strip down installation hierarchy
   1.173 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
   1.174 +%if "%{with_python}" == "no"
   1.175 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python
   1.176 +%endif
   1.177 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/rrdtool-*
   1.178 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/rrdtutorial.es.1
   1.179 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   1.180 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   1.181 +
   1.182 +    #   post-process Perl part
   1.183 +%if "%{with_perl}" == "yes"
   1.184 +    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
   1.185 +%else
   1.186 +    >perl-openpkg-files
   1.187 +%endif
   1.188 +
   1.189 +    #   determine installation files
   1.190 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   1.191 +        %{l_files_std} `cat perl-openpkg-files`
   1.192 +
   1.193 +%files -f files
   1.194 +
   1.195 +%clean
   1.196 +    rm -rf $RPM_BUILD_ROOT
   1.197 +

mercurial