rrdtool/rrdtool.spec

changeset 491
ccaf26ae9b81
parent 490
615d51fb3fea
child 492
e66ba21516b4
equal deleted inserted replaced
5:47e0fd91e153 6:7b9d9f864c3f
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.
21 ## SUCH DAMAGE. 21 ## SUCH DAMAGE.
22 ## 22 ##
23 23
24 # package version 24 # package version
25 %define V_rrdtool 1.4.7 25 %define V_rrdtool 1.4.7
26 %define V_rrdtool_oo 0.31 26 %define V_rrdtool_oo 0.32
27 %define V_rrdtool_creator 1.0 27 %define V_rrdtool_creator 1.0
28 %define V_rrd_simple 1.44 28 %define V_rrd_simple 1.44
29 29
30 # package information 30 # package information
31 Name: rrdtool 31 Name: rrdtool
36 Distribution: OpenPKG Community 36 Distribution: OpenPKG Community
37 Class: BASE 37 Class: BASE
38 Group: Database 38 Group: Database
39 License: LGPL 39 License: LGPL
40 Version: %{V_rrdtool} 40 Version: %{V_rrdtool}
41 Release: 20120208 41 Release: 20120308
42 42
43 # package options 43 # package options
44 %option with_perl no 44 %option with_perl no
45 %option with_python no 45 %option with_python no
46 46
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"
136 --disable-python \ 124 --disable-python \
137 %endif 125 %endif
138 --disable-tcl \ 126 --disable-tcl \
139 --disable-ruby \ 127 --disable-ruby \
140 --disable-shared \ 128 --disable-shared \
129 --disable-nls \
141 --enable-rrdcgi 130 --enable-rrdcgi
142 131
143 # build package 132 # build package
144 %{l_make} %{l_mflags} 133 %{l_make} %{l_mflags}
145 134
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
194 %{l_files_std} `cat perl-openpkg-files` 182 %{l_files_std} `cat perl-openpkg-files`
195 183
196 %files -f files 184 %files -f files
197 185
198 %clean 186 %clean
199 rm -rf $RPM_BUILD_ROOT
200 187

mercurial