1 ## |
1 ## |
2 ## rrdtool.spec -- OpenPKG RPM Package Specification |
2 ## rrdtool.spec -- OpenPKG RPM Package Specification |
3 ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/> |
3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
4 ## |
4 ## |
5 ## Permission to use, copy, modify, and distribute this software for |
5 ## Permission to use, copy, modify, and distribute this software for |
6 ## any purpose with or without fee is hereby granted, provided that |
6 ## any purpose with or without fee is hereby granted, provided that |
7 ## the above copyright notice and this permission notice appear in all |
7 ## the above copyright notice and this permission notice appear in all |
8 ## copies. |
8 ## copies. |
50 Source2: http://www.cpan.org/authors/id/J/JA/JACQUELIN/RRDTool-Creator-%{V_rrdtool_creator}.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 |
51 Source3: http://www.cpan.org/authors/id/N/NI/NICOLAW/RRD-Simple-%{V_rrd_simple}.tar.gz |
52 Patch0: rrdtool.patch |
52 Patch0: rrdtool.patch |
53 |
53 |
54 # build information |
54 # build information |
55 Prefix: %{l_prefix} |
55 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module, intltool |
56 BuildRoot: %{l_buildroot} |
56 PreReq: OpenPKG, openpkg >= 20100101 |
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 |
57 BuildPreReq: png, zlib, freetype, pango, cairo, libxml |
60 PreReq: png, zlib, freetype, pango, cairo, libxml |
58 PreReq: png, zlib, freetype, pango, cairo, libxml |
61 %if "%{with_perl}" == "yes" |
59 %if "%{with_perl}" == "yes" |
62 BuildPreReq: perl |
60 BuildPreReq: perl |
63 PreReq: perl |
61 PreReq: perl |
64 %endif |
62 %endif |
65 %if "%{with_python}" == "yes" |
63 %if "%{with_python}" == "yes" |
66 BuildPreReq: python |
64 BuildPreReq: python |
67 PreReq: python |
65 PreReq: python |
68 %endif |
66 %endif |
69 AutoReq: no |
|
70 AutoReqProv: no |
|
71 |
67 |
72 %description |
68 %description |
73 RRD is the Acronym for Round Robin Database. RRD is a system |
69 RRD is the Acronym for Round Robin Database. RRD is a system |
74 to store and display time-series data (i.e. network bandwidth, |
70 to store and display time-series data (i.e. network bandwidth, |
75 machine-room temperature, server load average). It stores the |
71 machine-room temperature, server load average). It stores the |
105 %setup -q |
101 %setup -q |
106 %setup -q -D -T -a 1 |
102 %setup -q -D -T -a 1 |
107 %setup -q -D -T -a 2 |
103 %setup -q -D -T -a 2 |
108 %setup -q -D -T -a 3 |
104 %setup -q -D -T -a 3 |
109 %patch -p0 |
105 %patch -p0 |
110 %{l_shtool} subst \ |
|
111 -e 's;\-std=c99 *;;g' \ |
|
112 configure |
|
113 %{l_shtool} subst \ |
|
114 -e 's;@l_pangocairo@;`pkg-config pangocairo --libs-only-l`;' \ |
|
115 bindings/perl-shared/Makefile.PL |
|
116 rm -f bindings/perl-shared/ntmake.pl |
106 rm -f bindings/perl-shared/ntmake.pl |
117 rm -rf RRDTool-Creator-*/_build |
107 rm -rf RRDTool-Creator-*/_build |
118 |
108 |
119 %build |
109 %build |
120 # configure package |
110 # configure package |
121 ( echo "ac_cv_path_PERL=no" |
111 echo "ac_cv_path_PERL=no" >config.cache |
122 echo "ac_cv_have_broken_isfinite=yes" |
|
123 ) >config.cache |
|
124 CC="%{l_cc}" \ |
112 CC="%{l_cc}" \ |
125 CPPFLAGS="%{l_cppflags}" \ |
113 CPPFLAGS="%{l_cppflags}" \ |
126 CFLAGS="%{l_cflags -O}" \ |
114 CFLAGS="%{l_cflags -O}" \ |
127 LDLAGS="%{l_ldflags}" \ |
115 LDLAGS="%{l_ldflags}" \ |
128 LIBS="`pkg-config pangocairo --libs-only-l`" \ |
116 LIBS="`pkg-config pangocairo --libs`" \ |
129 ./configure \ |
117 ./configure \ |
130 --cache-file=./config.cache \ |
118 --cache-file=./config.cache \ |
131 --prefix=%{l_prefix} \ |
119 --prefix=%{l_prefix} \ |
132 --mandir=%{l_prefix}/man \ |
120 --mandir=%{l_prefix}/man \ |
133 %if "%{with_python}" == "yes" |
121 %if "%{with_python}" == "yes" |
152 %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} configure build |
141 %{l_prefix}/bin/perl-openpkg -d RRDTool-Creator-%{V_rrdtool_creator} configure build |
153 %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build |
142 %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build |
154 %endif |
143 %endif |
155 |
144 |
156 %install |
145 %install |
157 rm -rf $RPM_BUILD_ROOT |
|
158 |
146 |
159 # install package |
147 # install package |
160 %{l_shtool} subst \ |
148 %{l_shtool} subst \ |
161 -e 's/^\(install-data-am:\).*/\1/' \ |
149 -e 's/^\(install-data-am:\).*/\1/' \ |
162 Makefile |
150 Makefile |
163 %{l_make} %{l_mflags} install \ |
151 %{l_make} %{l_mflags} install \ |
164 DESTDIR=$RPM_BUILD_ROOT DESTDIR="$RPM_BUILD_ROOT" |
152 DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
165 |
153 |
166 # install Perl part |
154 # install Perl part |
167 %if "%{with_perl}" == "yes" |
155 %if "%{with_perl}" == "yes" |
168 %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped install |
156 %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped install |
169 %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install |
157 %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install |