rrdtool/rrdtool.spec

Tue, 28 Aug 2012 18:29:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:29:00 +0200
changeset 532
e5f1af644b30
parent 491
ccaf26ae9b81
child 630
561e962f5a6e
permissions
-rw-r--r--

Massively update modules from Drupal 6.x to 7.x, and add diverse OpenID modules.
Unfortunately many modules available to Drupal 6.x installations have not been
since maintained or ported to 7.x causing this package to diminish in both size
and utility.

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

mercurial