Import package vendor original specs for necessary manipulations.

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
parent 165
cff8cdb0b6c4
child 167
ac03bde00b0e

Import package vendor original specs for necessary manipulations.

rrdtool/rrdtool.patch file | annotate | diff | comparison | revisions
rrdtool/rrdtool.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/rrdtool/rrdtool.patch	Sat Apr 18 18:41:04 2009 +0200
     1.3 @@ -0,0 +1,257 @@
     1.4 +Index: RRDTool-OO-0.24/Makefile.PL
     1.5 +--- RRDTool-OO-0.24/Makefile.PL.orig	2008-01-24 04:29:54 +0100
     1.6 ++++ RRDTool-OO-0.24/Makefile.PL	2008-12-16 08:35:38 +0100
     1.7 +@@ -2,55 +2,12 @@
     1.8 + use ExtUtils::MakeMaker;
     1.9 + use File::Basename;
    1.10 + 
    1.11 +-# Check if RRDs is installed
    1.12 +-my $v = rrdtool_version();
    1.13 +-#print "v=$v\n";
    1.14 +-
    1.15 +-eval { require RRDs; };
    1.16 +-
    1.17 +-    # (1) libcgi is missing on most Linux/FreeBSD systems, and we
    1.18 +-    #     don't need it anyway.
    1.19 +-    # (2) as of rrdtool-1.2.11, tcl libs didn't compile, so let's
    1.20 +-    #     leave them out.
    1.21 +-my $CONFIGURE_OPTS = "--enable-perl-site-install --prefix=/usr --disable-tcl --disable-rrdcgi";
    1.22 +-
    1.23 +-my $DIST_URL = 
    1.24 +-"http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz";
    1.25 +-
    1.26 +-if($@ or !$v or $v < 1.002011) {
    1.27 +-    print <<EOT;
    1.28 +-This module requires rrdtool 1.2.x and the RRDs module to be 
    1.29 +-installed. They are available in the rrdtool distribution:
    1.30 +- $DIST_URL
    1.31 +-EOT
    1.32 +-
    1.33 +-    $| = 1;
    1.34 +-    print "Do you want me to install it for you right now ([y]/n)?";
    1.35 +-    my $in = <>;
    1.36 +-    chomp $in;
    1.37 +-    if($in =~ /^\s*$/ or $in =~ /y/i) {
    1.38 +-        if($> != 0) {
    1.39 +-            die "\nYou need to be root to do this.\n";
    1.40 +-        }
    1.41 +-        eval { install_RRDs() };
    1.42 +-        if($@) {
    1.43 +-            print $@;
    1.44 +-            note();
    1.45 +-            exit 0;
    1.46 +-        }
    1.47 +-    } else {
    1.48 +-        note();
    1.49 +-        exit 0;
    1.50 +-    }
    1.51 +-}
    1.52 +-
    1.53 + # See lib/ExtUtils/MakeMaker.pm for details of how to influence
    1.54 + # the contents of the Makefile that is written.
    1.55 + WriteMakefile(
    1.56 +     NAME              => 'RRDTool::OO',
    1.57 +     VERSION_FROM      => 'lib/RRDTool/OO.pm', # finds $VERSION
    1.58 +     PREREQ_PM         => {
    1.59 +-                         Log::Log4perl => '0.40',
    1.60 +                          RRDs          => 0,
    1.61 +                          }, # e.g., Module::Name => 1.1
    1.62 +     ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
    1.63 +Index: RRDTool-OO-0.24/lib/RRDTool/OO.pm
    1.64 +--- RRDTool-OO-0.24/lib/RRDTool/OO.pm.orig	2008-05-20 11:17:57 +0200
    1.65 ++++ RRDTool-OO-0.24/lib/RRDTool/OO.pm	2008-12-16 08:35:38 +0100
    1.66 +@@ -5,7 +5,6 @@
    1.67 + use warnings;
    1.68 + use Carp;
    1.69 + use RRDs;
    1.70 +-use Log::Log4perl qw(:easy);
    1.71 + 
    1.72 + our $VERSION = '0.22';
    1.73 + 
    1.74 +@@ -183,7 +182,7 @@
    1.75 +         # Check if we got all mandatory parameters
    1.76 +     for(@{$ref->{mandatory}}) {
    1.77 +         if(! exists $options_hash{$_}) {
    1.78 +-            Log::Log4perl->get_logger("")->logcroak(
    1.79 ++            croak(
    1.80 +                 "Mandatory parameter '$_' not set " .
    1.81 +                 "in $method() (@{[%mandatory]}) (@$options)");
    1.82 +         }
    1.83 +@@ -195,7 +194,7 @@
    1.84 +         for(keys %options_hash) {
    1.85 +             if(! exists $optional{$_} and
    1.86 +                ! exists $mandatory{$_}) {
    1.87 +-                Log::Log4perl->get_logger("")->logcroak(
    1.88 ++               croak(
    1.89 +                     "Illegal parameter '$_' in $method()");
    1.90 +             }
    1.91 +         }
    1.92 +Index: bindings/perl-shared/Makefile.PL
    1.93 +--- bindings/perl-shared/Makefile.PL.orig	2008-12-05 16:39:55 +0100
    1.94 ++++ bindings/perl-shared/Makefile.PL	2008-12-16 08:37:40 +0100
    1.95 +@@ -1,36 +1,7 @@
    1.96 + use ExtUtils::MakeMaker;
    1.97 + use Config;
    1.98 +-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
    1.99 +-# the contents of the Makefile that is written.
   1.100 + 
   1.101 +-# if the last argument when calling Makefile.PL is RPATH=/... and ... is the
   1.102 +-# path to librrd.so then the Makefile will be written such that RRDs.so knows
   1.103 +-# where to find librrd.so later on ... 
   1.104 +-my $R="";
   1.105 +-if ($ARGV[-1] =~ /RPATH=(\S+)/){
   1.106 +-	pop @ARGV;
   1.107 +-	my $rp = $1;
   1.108 +-	for ($^O){
   1.109 +-	        /linux/   && do{ $R = "-Wl,--rpath -Wl,$rp"};
   1.110 +-	        /hpux/    && do{ $R = "+b$rp"};
   1.111 +-	        /solaris/ && do{ $R = "-R$rp"};
   1.112 +-	        /bsd/     && do{ $R = "-R$rp"};
   1.113 +-                /aix/     && do{ $R = "-Wl,-blibpath:$rp"};
   1.114 +-	}
   1.115 +-}
   1.116 +-
   1.117 +-# darwin works without this because librrd contains its
   1.118 +-# install_name which will includes the final location of the
   1.119 +-# library after it is installed. This install_name gets transfered
   1.120 +-# to the perl shared object.
   1.121 +-
   1.122 +-my $librrd;
   1.123 +-if ($^O eq 'darwin'){
   1.124 +-        $librrd = '-lrrd';
   1.125 +-}
   1.126 +-else {
   1.127 +-        $librrd = "-L../../src/.libs/ $R -lrrd";
   1.128 +-}
   1.129 ++my $librrd = "-L../../src/.libs/ -lrrd -L$Config{prefix}/lib -lfreetype -lpng -lz -lart_lgpl";
   1.130 + 
   1.131 + WriteMakefile(
   1.132 +     'NAME'         => 'RRDs',
   1.133 +Index: bindings/python/setup.py
   1.134 +--- bindings/python/setup.py.orig	2008-03-15 11:39:48 +0100
   1.135 ++++ bindings/python/setup.py	2008-12-16 08:35:38 +0100
   1.136 +@@ -47,7 +47,7 @@
   1.137 +           Extension(
   1.138 +             "rrdtoolmodule",
   1.139 +             ["rrdtoolmodule.c"],
   1.140 +-            libraries=['rrd'],
   1.141 ++            libraries=['rrd', 'freetype', 'art_lgpl', 'png', 'z'],
   1.142 +             library_dirs=[library_dir],
   1.143 +             include_dirs=[include_dir],
   1.144 +           )
   1.145 +Index: configure
   1.146 +--- configure.orig	2008-12-15 23:06:39 +0100
   1.147 ++++ configure	2008-12-16 08:35:38 +0100
   1.148 +@@ -30827,7 +30827,7 @@
   1.149 +   echo $ECHO_N "(cached) $ECHO_C" >&6
   1.150 + else
   1.151 +   ac_check_lib_save_LIBS=$LIBS
   1.152 +-LIBS="-lpango-1.0  $LIBS"
   1.153 ++LIBS="-lpango $LIBS"
   1.154 + cat >conftest.$ac_ext <<_ACEOF
   1.155 + /* confdefs.h.  */
   1.156 + _ACEOF
   1.157 +@@ -31010,7 +31010,7 @@
   1.158 + 
   1.159 + fi
   1.160 + if test $ac_cv_header_pango_pango_h = yes; then
   1.161 +-  LIBS="-lpango-1.0 ${LIBS}";EX_CHECK_STATE=YES
   1.162 ++  LIBS="-lpango ${LIBS}";EX_CHECK_STATE=YES
   1.163 + fi
   1.164 + 
   1.165 + 
   1.166 +@@ -31066,14 +31066,14 @@
   1.167 +              LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L pangocairo`
   1.168 +              LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other pangocairo`
   1.169 +              LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l pangocairo`
   1.170 +-	         	     unset ac_cv_lib_`echo pango-1.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options
   1.171 ++	         	     unset ac_cv_lib_`echo pango | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options
   1.172 +              { echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5
   1.173 + echo $ECHO_N "checking for pango_cairo_context_set_font_options in -lpango-1.0... $ECHO_C" >&6; }
   1.174 + if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then
   1.175 +   echo $ECHO_N "(cached) $ECHO_C" >&6
   1.176 + else
   1.177 +   ac_check_lib_save_LIBS=$LIBS
   1.178 +-LIBS="-lpango-1.0  $LIBS"
   1.179 ++LIBS="-lpango $LIBS"
   1.180 + cat >conftest.$ac_ext <<_ACEOF
   1.181 + /* confdefs.h.  */
   1.182 + _ACEOF
   1.183 +@@ -32551,9 +32551,9 @@
   1.184 + echo $ECHO_N "checking for headers required to compile python extensions... $ECHO_C" >&6; }
   1.185 + py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
   1.186 + py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
   1.187 +-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
   1.188 ++PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION} -I${py_prefix}/include/python"
   1.189 + if test "$py_prefix" != "$py_exec_prefix"; then
   1.190 +-  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
   1.191 ++  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION} -I${py_exec_prefix}/include/python"
   1.192 + fi
   1.193 + 
   1.194 + save_CPPFLAGS="$CPPFLAGS"
   1.195 +Index: src/rrd_open.c
   1.196 +--- src/rrd_open.c.orig	2008-12-15 23:06:22 +0100
   1.197 ++++ src/rrd_open.c	2008-12-16 08:35:38 +0100
   1.198 +@@ -218,7 +218,7 @@
   1.199 + #endif
   1.200 +     if (rdwr & RRD_CREAT)
   1.201 +         goto out_done;
   1.202 +-#ifdef USE_MADVISE
   1.203 ++#if defined(USE_MADVISE) && defined(MADV_WILLNEED) && defined(MADV_SEQUENTIAL) && defined(MADV_RANDOM)
   1.204 +     if (rdwr & RRD_COPY) {
   1.205 +         /* We will read everything in a moment (copying) */
   1.206 +         madvise(data, rrd_file->file_len, MADV_WILLNEED | MADV_SEQUENTIAL);
   1.207 +@@ -251,7 +251,7 @@
   1.208 +                       rrd->stat_head->version);
   1.209 +         goto out_nullify_head;
   1.210 +     }
   1.211 +-#if defined USE_MADVISE
   1.212 ++#if defined(USE_MADVISE) && defined(MADV_WILLNEED)
   1.213 +     /* the ds_def will be needed soonish, so hint accordingly */
   1.214 +     madvise(data + PAGE_START(offset),
   1.215 +             sizeof(ds_def_t) * rrd->stat_head->ds_cnt, MADV_WILLNEED);
   1.216 +@@ -259,7 +259,7 @@
   1.217 +     __rrd_read(rrd->ds_def, ds_def_t,
   1.218 +                rrd->stat_head->ds_cnt);
   1.219 + 
   1.220 +-#if defined USE_MADVISE
   1.221 ++#if defined(USE_MADVISE) && defined(MADV_WILLNEED)
   1.222 +     /* the rra_def will be needed soonish, so hint accordingly */
   1.223 +     madvise(data + PAGE_START(offset),
   1.224 +             sizeof(rra_def_t) * rrd->stat_head->rra_cnt, MADV_WILLNEED);
   1.225 +@@ -274,7 +274,7 @@
   1.226 +             rrd_set_error("live_head_t malloc");
   1.227 +             goto out_close;
   1.228 +         }
   1.229 +-#if defined USE_MADVISE
   1.230 ++#if defined(USE_MADVISE) && defined(MADV_WILLNEED)
   1.231 +         /* the live_head will be needed soonish, so hint accordingly */
   1.232 +         madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED);
   1.233 + #endif
   1.234 +@@ -284,7 +284,7 @@
   1.235 +         rrd->live_head->last_up = *rrd->legacy_last_up;
   1.236 +         rrd->live_head->last_up_usec = 0;
   1.237 +     } else {
   1.238 +-#if defined USE_MADVISE
   1.239 ++#if defined(USE_MADVISE) && defined(MADV_WILLNEED)
   1.240 +         /* the live_head will be needed soonish, so hint accordingly */
   1.241 +         madvise(data + PAGE_START(offset),
   1.242 +                 sizeof(live_head_t), MADV_WILLNEED);
   1.243 +@@ -414,7 +414,7 @@
   1.244 +                        + rrd->rra_ptr[i].cur_row
   1.245 +                        * rrd->stat_head->ds_cnt * sizeof(rrd_value_t));
   1.246 +         if (active_block > dontneed_start) {
   1.247 +-#ifdef USE_MADVISE
   1.248 ++#if defined(USE_MADVISE) && defined(MADV_DONTNEED)
   1.249 +             madvise(rrd_file->file_start + dontneed_start,
   1.250 +                     active_block - dontneed_start - 1, MADV_DONTNEED);
   1.251 + #endif
   1.252 +@@ -439,7 +439,7 @@
   1.253 +     }
   1.254 + 
   1.255 +     if (dontneed_start < rrd_file->file_len) {
   1.256 +-#ifdef USE_MADVISE
   1.257 ++#if defined(USE_MADVISE) && defined(MADV_DONTNEED)
   1.258 + 	    madvise(rrd_file->file_start + dontneed_start,
   1.259 + 		    rrd_file->file_len - dontneed_start, MADV_DONTNEED);
   1.260 + #endif
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/rrdtool/rrdtool.spec	Sat Apr 18 18:41:04 2009 +0200
     2.3 @@ -0,0 +1,194 @@
     2.4 +##
     2.5 +##  rrdtool.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package version
    2.28 +%define       V_rrdtool          1.3.7
    2.29 +%define       V_rrdtool_oo       0.24
    2.30 +%define       V_rrdtool_creator  0.9
    2.31 +%define       V_rrd_simple       1.44
    2.32 +
    2.33 +#   package information
    2.34 +Name:         rrdtool
    2.35 +Summary:      Round Robin Database
    2.36 +URL:          http://www.rrdtool.org/
    2.37 +Vendor:       Tobias Oetiker
    2.38 +Packager:     OpenPKG Foundation e.V.
    2.39 +Distribution: OpenPKG Community
    2.40 +Class:        BASE
    2.41 +Group:        Database
    2.42 +License:      LGPL
    2.43 +Version:      %{V_rrdtool}
    2.44 +Release:      20090407
    2.45 +
    2.46 +#   package options
    2.47 +%option       with_perl        no
    2.48 +%option       with_python      no
    2.49 +
    2.50 +#   list of sources
    2.51 +Source0:      http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{V_rrdtool}.tar.gz
    2.52 +Source1:      http://www.cpan.org/authors/id/M/MS/MSCHILLI/RRDTool-OO-%{V_rrdtool_oo}.tar.gz
    2.53 +Source2:      http://www.cpan.org/authors/id/J/JA/JACQUELIN/RRDTool-Creator-%{V_rrdtool_creator}.tar.gz
    2.54 +Source3:      http://www.cpan.org/authors/id/N/NI/NICOLAW/RRD-Simple-%{V_rrd_simple}.tar.gz
    2.55 +Patch0:       rrdtool.patch
    2.56 +
    2.57 +#   build information
    2.58 +Prefix:       %{l_prefix}
    2.59 +BuildRoot:    %{l_buildroot}
    2.60 +BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module
    2.61 +PreReq:       OpenPKG, openpkg >= 20040130
    2.62 +BuildPreReq:  png, zlib, freetype, pango, cairo, libxml
    2.63 +PreReq:       png, zlib, freetype, pango, cairo, libxml
    2.64 +%if "%{with_perl}" == "yes"
    2.65 +BuildPreReq:  perl
    2.66 +PreReq:       perl
    2.67 +%endif
    2.68 +%if "%{with_python}" == "yes"
    2.69 +BuildPreReq:  python
    2.70 +PreReq:       python
    2.71 +%endif
    2.72 +AutoReq:      no
    2.73 +AutoReqProv:  no
    2.74 +
    2.75 +%description
    2.76 +    RRD is the Acronym for Round Robin Database. RRD is a system
    2.77 +    to store and display time-series data (i.e. network bandwidth,
    2.78 +    machine-room temperature, server load average). It stores the
    2.79 +    data in a very compact way that will not expand over time, and it
    2.80 +    presents useful graphs by processing the data to enforce a certain
    2.81 +    data density. It can be used either via simple wrapper scripts (from
    2.82 +    shell or Perl) or via frontends that poll network devices and put a
    2.83 +    friendly user interface on it.
    2.84 +
    2.85 +%track
    2.86 +    prog rrdtool = {
    2.87 +        version   = %{V_rrdtool}
    2.88 +        url       = http://oss.oetiker.ch/rrdtool/pub/
    2.89 +        regex     = rrdtool-(__VER__)\.tar\.gz
    2.90 +    }
    2.91 +    prog rrdtool:RRDTool-OO = {
    2.92 +        version   = %{V_rrdtool_oo}
    2.93 +        url       = http://www.cpan.org/authors/id/M/MS/MSCHILLI/
    2.94 +        regex     = RRDTool-OO-(__VER__)\.tar\.gz
    2.95 +    }
    2.96 +    prog rrdtool:RRDTool-Creator = {
    2.97 +        version   = %{V_rrdtool_creator}
    2.98 +        url       = http://www.cpan.org/authors/id/J/JA/JACQUELIN/
    2.99 +        regex     = RRDTool-Creator-(__VER__)\.tar\.gz
   2.100 +    }
   2.101 +    prog rrdtool:RRD-Simple = {
   2.102 +        version   = %{V_rrd_simple}
   2.103 +        url       = http://www.cpan.org/authors/id/N/NI/NICOLAW/
   2.104 +        regex     = RRD-Simple-(__VER__)\.tar\.gz
   2.105 +    }
   2.106 +
   2.107 +%prep
   2.108 +    %setup -q
   2.109 +    %setup -q -D -T -a 1
   2.110 +    %setup -q -D -T -a 2
   2.111 +    %setup -q -D -T -a 3
   2.112 +    %patch -p0
   2.113 +    rm -f bindings/perl-shared/ntmake.pl
   2.114 +    rm -rf RRDTool-Creator-*/_build
   2.115 +
   2.116 +%build
   2.117 +    #   configure package
   2.118 +    echo "ac_cv_path_PERL=no" >config.cache
   2.119 +    CC="%{l_cc}" \
   2.120 +    CPPFLAGS="%{l_cppflags}" \
   2.121 +    CFLAGS="%{l_cflags -O}" \
   2.122 +    LDLAGS="%{l_ldflags}" \
   2.123 +    LIBS="`pkg-config pangocairo --libs`" \
   2.124 +    ./configure \
   2.125 +        --cache-file=./config.cache \
   2.126 +        --prefix=%{l_prefix} \
   2.127 +        --mandir=%{l_prefix}/man \
   2.128 +%if "%{with_python}" == "yes"
   2.129 +        --enable-python \
   2.130 +%else
   2.131 +        --disable-python \
   2.132 +%endif
   2.133 +        --disable-tcl \
   2.134 +        --disable-ruby \
   2.135 +        --disable-shared \
   2.136 +        --enable-local-libpng \
   2.137 +        --enable-local-zlib \
   2.138 +        --enable-rrdcgi
   2.139 +
   2.140 +    #   build package
   2.141 +    %{l_make} %{l_mflags}
   2.142 +
   2.143 +    #   build Perl part
   2.144 +%if "%{with_perl}" == "yes"
   2.145 +    %{l_prefix}/bin/perl-openpkg prepare
   2.146 +    %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped  configure build
   2.147 +    %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared configure build
   2.148 +    %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} configure build
   2.149 +    %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} configure build
   2.150 +    %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build
   2.151 +%endif
   2.152 +
   2.153 +%install
   2.154 +    rm -rf $RPM_BUILD_ROOT
   2.155 +
   2.156 +    #   install package
   2.157 +    %{l_shtool} subst \
   2.158 +        -e 's/^\(install-data-am:\).*/\1/' \
   2.159 +        Makefile
   2.160 +    %{l_make} %{l_mflags} install \
   2.161 +        DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   2.162 +
   2.163 +    #   install Perl part
   2.164 +%if "%{with_perl}" == "yes"
   2.165 +    %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped  install
   2.166 +    %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install
   2.167 +    %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} install
   2.168 +    %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} install
   2.169 +    %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} install
   2.170 +%endif
   2.171 +
   2.172 +    #   strip down installation hierarchy
   2.173 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
   2.174 +%if "%{with_python}" == "no"
   2.175 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python
   2.176 +%endif
   2.177 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/rrdtool-*
   2.178 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/rrdtutorial.es.1
   2.179 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   2.180 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   2.181 +
   2.182 +    #   post-process Perl part
   2.183 +%if "%{with_perl}" == "yes"
   2.184 +    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
   2.185 +%else
   2.186 +    >perl-openpkg-files
   2.187 +%endif
   2.188 +
   2.189 +    #   determine installation files
   2.190 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   2.191 +        %{l_files_std} `cat perl-openpkg-files`
   2.192 +
   2.193 +%files -f files
   2.194 +
   2.195 +%clean
   2.196 +    rm -rf $RPM_BUILD_ROOT
   2.197 +

mercurial