Sat, 24 Mar 2012 21:40:49 +0100
Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.
| michael@166 | 1 | ## |
| michael@166 | 2 | ## rrdtool.spec -- OpenPKG RPM Package Specification |
| michael@166 | 3 | ## Copyright (c) 2000-2009 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@368 | 25 | %define V_rrdtool 1.4.5 |
| michael@368 | 26 | %define V_rrdtool_oo 0.31 |
| 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@368 | 41 | Release: 20110915 |
| 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@166 | 55 | Prefix: %{l_prefix} |
| michael@166 | 56 | BuildRoot: %{l_buildroot} |
| michael@368 | 57 | BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module, intltool |
| michael@166 | 58 | PreReq: OpenPKG, openpkg >= 20040130 |
| michael@166 | 59 | BuildPreReq: png, zlib, freetype, pango, cairo, libxml |
| michael@166 | 60 | PreReq: png, zlib, freetype, pango, cairo, libxml |
| michael@166 | 61 | %if "%{with_perl}" == "yes" |
| michael@170 | 62 | BuildPreReq: perl, perl-xml::with_libxml = yes, libart |
| michael@170 | 63 | PreReq: perl, perl-xml::with_libxml = yes, libart |
| michael@166 | 64 | %endif |
| michael@166 | 65 | %if "%{with_python}" == "yes" |
| michael@166 | 66 | BuildPreReq: python |
| michael@166 | 67 | PreReq: python |
| michael@166 | 68 | %endif |
| michael@166 | 69 | AutoReq: no |
| michael@166 | 70 | AutoReqProv: no |
| michael@166 | 71 | |
| michael@166 | 72 | %description |
| michael@166 | 73 | RRD is the Acronym for Round Robin Database. RRD is a system |
| michael@166 | 74 | to store and display time-series data (i.e. network bandwidth, |
| michael@166 | 75 | machine-room temperature, server load average). It stores the |
| michael@166 | 76 | data in a very compact way that will not expand over time, and it |
| michael@166 | 77 | presents useful graphs by processing the data to enforce a certain |
| michael@166 | 78 | data density. It can be used either via simple wrapper scripts (from |
| michael@166 | 79 | shell or Perl) or via frontends that poll network devices and put a |
| michael@166 | 80 | friendly user interface on it. |
| michael@166 | 81 | |
| michael@166 | 82 | %track |
| michael@166 | 83 | prog rrdtool = { |
| michael@166 | 84 | version = %{V_rrdtool} |
| michael@166 | 85 | url = http://oss.oetiker.ch/rrdtool/pub/ |
| michael@166 | 86 | regex = rrdtool-(__VER__)\.tar\.gz |
| michael@166 | 87 | } |
| michael@166 | 88 | prog rrdtool:RRDTool-OO = { |
| michael@166 | 89 | version = %{V_rrdtool_oo} |
| michael@166 | 90 | url = http://www.cpan.org/authors/id/M/MS/MSCHILLI/ |
| michael@166 | 91 | regex = RRDTool-OO-(__VER__)\.tar\.gz |
| michael@166 | 92 | } |
| michael@166 | 93 | prog rrdtool:RRDTool-Creator = { |
| michael@166 | 94 | version = %{V_rrdtool_creator} |
| michael@166 | 95 | url = http://www.cpan.org/authors/id/J/JA/JACQUELIN/ |
| michael@166 | 96 | regex = RRDTool-Creator-(__VER__)\.tar\.gz |
| michael@166 | 97 | } |
| michael@166 | 98 | prog rrdtool:RRD-Simple = { |
| michael@166 | 99 | version = %{V_rrd_simple} |
| michael@166 | 100 | url = http://www.cpan.org/authors/id/N/NI/NICOLAW/ |
| michael@166 | 101 | regex = RRD-Simple-(__VER__)\.tar\.gz |
| michael@166 | 102 | } |
| michael@166 | 103 | |
| michael@166 | 104 | %prep |
| michael@166 | 105 | %setup -q |
| michael@166 | 106 | %setup -q -D -T -a 1 |
| michael@166 | 107 | %setup -q -D -T -a 2 |
| michael@166 | 108 | %setup -q -D -T -a 3 |
| michael@166 | 109 | %patch -p0 |
| michael@167 | 110 | %{l_shtool} subst \ |
| michael@167 | 111 | -e 's;\-std=c99 *;;g' \ |
| michael@167 | 112 | configure |
| michael@166 | 113 | rm -f bindings/perl-shared/ntmake.pl |
| michael@166 | 114 | rm -rf RRDTool-Creator-*/_build |
| michael@166 | 115 | |
| michael@166 | 116 | %build |
| michael@166 | 117 | # configure package |
| michael@167 | 118 | ( echo "ac_cv_path_PERL=no" |
| michael@167 | 119 | echo "ac_cv_have_broken_isfinite=yes" |
| michael@167 | 120 | ) >config.cache |
| michael@166 | 121 | CC="%{l_cc}" \ |
| michael@166 | 122 | CPPFLAGS="%{l_cppflags}" \ |
| michael@166 | 123 | CFLAGS="%{l_cflags -O}" \ |
| michael@166 | 124 | LDLAGS="%{l_ldflags}" \ |
| michael@166 | 125 | LIBS="`pkg-config pangocairo --libs`" \ |
| michael@166 | 126 | ./configure \ |
| michael@166 | 127 | --cache-file=./config.cache \ |
| michael@166 | 128 | --prefix=%{l_prefix} \ |
| michael@166 | 129 | --mandir=%{l_prefix}/man \ |
| michael@166 | 130 | %if "%{with_python}" == "yes" |
| michael@166 | 131 | --enable-python \ |
| michael@166 | 132 | %else |
| michael@166 | 133 | --disable-python \ |
| michael@166 | 134 | %endif |
| michael@166 | 135 | --disable-tcl \ |
| michael@166 | 136 | --disable-ruby \ |
| michael@166 | 137 | --disable-shared \ |
| michael@166 | 138 | --enable-local-libpng \ |
| michael@166 | 139 | --enable-local-zlib \ |
| michael@166 | 140 | --enable-rrdcgi |
| michael@166 | 141 | |
| michael@166 | 142 | # build package |
| michael@166 | 143 | %{l_make} %{l_mflags} |
| michael@166 | 144 | |
| michael@166 | 145 | # build Perl part |
| michael@166 | 146 | %if "%{with_perl}" == "yes" |
| michael@166 | 147 | %{l_prefix}/bin/perl-openpkg prepare |
| michael@166 | 148 | %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped configure build |
| michael@166 | 149 | %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared configure build |
| michael@166 | 150 | %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} configure build |
| michael@166 | 151 | %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} configure build |
| michael@166 | 152 | %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build |
| michael@166 | 153 | %endif |
| michael@166 | 154 | |
| michael@166 | 155 | %install |
| michael@166 | 156 | rm -rf $RPM_BUILD_ROOT |
| michael@166 | 157 | |
| michael@166 | 158 | # install package |
| michael@166 | 159 | %{l_shtool} subst \ |
| michael@166 | 160 | -e 's/^\(install-data-am:\).*/\1/' \ |
| michael@166 | 161 | Makefile |
| michael@166 | 162 | %{l_make} %{l_mflags} install \ |
| michael@166 | 163 | DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
| michael@166 | 164 | |
| michael@166 | 165 | # install Perl part |
| michael@166 | 166 | %if "%{with_perl}" == "yes" |
| michael@166 | 167 | %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped install |
| michael@166 | 168 | %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install |
| michael@166 | 169 | %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} install |
| michael@166 | 170 | %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} install |
| michael@166 | 171 | %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} install |
| michael@166 | 172 | %endif |
| michael@166 | 173 | |
| michael@166 | 174 | # strip down installation hierarchy |
| michael@166 | 175 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc |
| michael@166 | 176 | %if "%{with_python}" == "no" |
| michael@166 | 177 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python |
| michael@166 | 178 | %endif |
| michael@166 | 179 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/rrdtool-* |
| michael@166 | 180 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/rrdtutorial.es.1 |
| michael@166 | 181 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale |
| michael@166 | 182 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true |
| michael@166 | 183 | |
| michael@166 | 184 | # post-process Perl part |
| michael@166 | 185 | %if "%{with_perl}" == "yes" |
| michael@166 | 186 | %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup |
| michael@166 | 187 | %else |
| michael@166 | 188 | >perl-openpkg-files |
| michael@166 | 189 | %endif |
| michael@166 | 190 | |
| michael@166 | 191 | # determine installation files |
| michael@166 | 192 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
| michael@166 | 193 | %{l_files_std} `cat perl-openpkg-files` |
| michael@166 | 194 | |
| michael@166 | 195 | %files -f files |
| michael@166 | 196 | |
| michael@166 | 197 | %clean |
| michael@166 | 198 | rm -rf $RPM_BUILD_ROOT |
| michael@166 | 199 |