Tue, 28 Aug 2012 18:50:10 +0200
Resynchronize with upstream maintainer version as it seems to work fine again.
1 ##
2 ## yaml.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
24 # package version
25 %define V_libsyck 0.70
26 %define V_libyaml 0.1.4
27 %define V_perl_yaml 0.84
28 %define V_perl_yaml_syck 1.20
29 %define V_perl_yaml_tiny 1.51
30 %define V_perl_yaml_appconfig 0.16
31 %define V_perl_yaml_libyaml 0.38
32 %define V_perl_yaml_active 1.100810
33 %define V_perl_yaml_object 0.04
34 %define V_perl_io_yaml 0.08
35 %define V_yaml_javascript 0.03
36 %define V_yaml_spec 2004-12-28
37 %define V_java_jvyaml 0.2.1
38 %define V_java_jyaml 1.3
39 %define V_php_syck 0.9.3
40 %define V_php_yaml 1.1.0RC2
41 %define V_php_spyc 0.4.5
43 # package information
44 Name: yaml
45 Summary: YAML Ain't Markup Language (YAML)
46 URL: http://yaml.org/
47 Vendor: B. Ingerson, C. Evans, O. Ben-Kiki et al.
48 Packager: OpenPKG Foundation e.V.
49 Distribution: OpenPKG Community
50 Class: PLUS
51 Group: Language
52 License: BSD/Artistic
53 Version: 0
54 Release: 20120731
56 # package options
57 %option with_perl no
58 %option with_php no
59 %option with_ruby no
60 %option with_java no
62 # list of sources
63 Source0: http://cloud.github.com/downloads/indeyets/syck/syck-%{V_libsyck}.tar.gz
64 Source1: http://pyyaml.org/download/libyaml/yaml-%{V_libyaml}.tar.gz
65 Source2: http://www.cpan.org/modules/by-module/YAML/YAML-%{V_perl_yaml}.tar.gz
66 Source3: http://www.cpan.org/modules/by-module/YAML/YAML-Syck-%{V_perl_yaml_syck}.tar.gz
67 Source4: http://www.cpan.org/modules/by-module/YAML/YAML-Tiny-%{V_perl_yaml_tiny}.tar.gz
68 Source5: http://www.cpan.org/modules/by-module/YAML/YAML-AppConfig-%{V_perl_yaml_appconfig}.tar.gz
69 Source6: http://www.cpan.org/modules/by-module/YAML/YAML-LibYAML-%{V_perl_yaml_libyaml}.tar.gz
70 Source7: http://www.cpan.org/modules/by-module/YAML/YAML-Active-%{V_perl_yaml_active}.tar.gz
71 Source8: http://www.cpan.org/authors/id/N/NK/NKUITSE/IO-YAML-%{V_perl_io_yaml}.tar.gz
72 Source9: http://osdn.dl.sourceforge.net/yaml-javascript/yaml-javascript-%{V_yaml_javascript}.tar.gz
73 Source10: https://jvyaml.dev.java.net/files/documents/5215/41455/jvyaml-src-%{V_java_jvyaml}.tar.gz
74 Source11: http://switch.dl.sourceforge.net/jyaml/jyaml-src-%{V_java_jyaml}.tgz
75 Source12: http://www.cpan.org/authors/id/E/EI/EIDOLON/YAML-Object-%{V_perl_yaml_object}.tar.gz
76 Source13: http://pecl.php.net/get/syck-%{V_php_syck}.tgz
77 Source14: http://pecl.php.net/get/yaml-%{V_php_yaml}.tgz
78 Source15: http://spyc.googlecode.com/files/spyc-%{V_php_spyc}.zip
79 Source16: http://yaml.org/spec/history/%{V_yaml_spec}/%{V_yaml_spec}.pdf
80 Source17: yaml.yml
81 Patch0: yaml.patch
83 # build information
84 BuildPreReq: OpenPKG, openpkg >= 20100101, make, bison
85 PreReq: OpenPKG, openpkg >= 20100101
86 %if "%{with_perl}" == "yes"
87 BuildPreReq: perl, perl-openpkg, perl-module
88 PreReq: perl
89 %endif
90 %if "%{with_php}" == "yes"
91 BuildPreReq: php, autoconf
92 PreReq: php
93 %endif
94 %if "%{with_ruby}" == "yes"
95 BuildPreReq: ruby
96 PreReq: ruby
97 %endif
98 %if "%{with_java}" == "yes"
99 BuildPreReq: java, JAVA-JDK, ant
100 PreReq: java, JAVA-JDK
101 %endif
103 %description
104 YAML Ain't Markup Language (YAML) is an international collaboration
105 to make a sophisticated data serialization language which is both
106 human readable and computationally powerful. This OpenPKG package
107 provides C, and JavaScript plus optionally Perl, PHP, and Ruby APIs
108 for the generation and parsing of YAML.
110 %track
111 prog yaml:libsyck = {
112 version = %{V_libsyck}
113 url = http://github.com/indeyets/syck/downloads
114 regex = syck-(__VER__)\.tar\.gz
115 }
116 prog yaml:libyaml = {
117 version = %{V_libyaml}
118 url = http://pyyaml.org/download/libyaml/
119 regex = yaml-(__VER__)\.tar\.gz
120 }
121 prog yaml:YAML = {
122 version = %{V_perl_yaml}
123 url = http://www.cpan.org/modules/by-module/YAML/
124 regex = YAML-(__VER__)\.tar\.gz
125 }
126 prog yaml:YAML-Syck = {
127 version = %{V_perl_yaml_syck}
128 url = http://www.cpan.org/modules/by-module/YAML/
129 regex = YAML-Syck-(__VER__)\.tar\.gz
130 }
131 prog yaml:YAML-Tiny = {
132 version = %{V_perl_yaml_tiny}
133 url = http://www.cpan.org/modules/by-module/YAML/
134 regex = YAML-Tiny-(__VER__)\.tar\.gz
135 }
136 prog yaml:YAML-AppConfig = {
137 version = %{V_perl_yaml_appconfig}
138 url = http://www.cpan.org/modules/by-module/YAML/
139 regex = YAML-AppConfig-(__VER__)\.tar\.gz
140 }
141 prog yaml:YAML-LibYAML = {
142 version = %{V_perl_yaml_libyaml}
143 url = http://www.cpan.org/modules/by-module/YAML/
144 regex = YAML-LibYAML-(__VER__)\.tar\.gz
145 }
146 prog yaml:YAML-Active = {
147 comment = "rse: 1.08 requires Class::Accessor::Complex and this too many others"
148 version = %{V_perl_yaml_active}
149 url = http://www.cpan.org/modules/by-module/YAML/
150 regex = YAML-Active-(__VER__)\.tar\.gz
151 }
152 prog yaml:IO-YAML = {
153 version = %{V_perl_io_yaml}
154 url = http://www.cpan.org/authors/id/N/NK/NKUITSE/
155 regex = IO-YAML-(__VER__)\.tar\.gz
156 }
157 prog yaml:yaml-javascript = {
158 version = %{V_yaml_javascript}
159 url = http://sourceforge.net/projects/yaml-javascript/files/
160 regex = yaml-javascript-(__VER__)\.tar\.gz
161 }
162 prog yaml:yaml-spec = {
163 disabled
164 comment = "rse: website references not existing 2004-12-30 and no updates since recently anyway"
165 version = %{V_yaml_spec}
166 url = http://yaml.org/spec/
167 regex = (\d{4}-\d{2}-\d{2})\.pdf
168 }
169 prog yaml:java-jvyaml = {
170 version = %{V_java_jvyaml}
171 url = http://jvyaml.dev.java.net/servlets/ProjectDocumentList
172 regex = jvyaml-src-(__VER__)\.tar\.gz
173 }
174 prog yaml:java-jyaml = {
175 version = %{V_java_jyaml}
176 url = http://sourceforge.net/projects/jyaml/files/
177 regex = jyaml-src-(__VER__)\.tgz
178 }
179 prog yaml:YAML-Object = {
180 version = %{V_perl_yaml_object}
181 url = http://www.cpan.org/authors/id/E/EI/EIDOLON/
182 regex = YAML-Object-(__VER__)\.tar\.gz
183 }
184 prog yaml:PHP-Syck = {
185 version = %{V_php_syck}
186 url = http://pecl.php.net/package/syck
187 regex = syck-(__VER__)\.tgz
188 }
189 prog yaml:PHP-YAML = {
190 version = %{V_php_yaml}
191 url = http://pecl.php.net/package/yaml
192 regex = yaml-(__VER__)\.tgz
193 }
194 prog yaml:PHP-spyc = {
195 version = %{V_php_spyc}
196 url = http://spyc.googlecode.com/files/
197 regex = spyc-(__VER__)\.zip
198 }
200 %prep
201 %setup -q -c
202 %setup -q -T -D -a 1
203 %setup -q -T -D -a 2
204 %setup -q -T -D -a 3
205 %setup -q -T -D -a 4
206 %setup -q -T -D -a 5
207 %setup -q -T -D -a 6
208 %setup -q -T -D -a 7
209 %setup -q -T -D -a 8
210 %setup -q -T -D -a 9
211 %setup -q -T -D -a 10
212 %setup -q -T -D -a 11
213 %setup -q -T -D -a 12
214 %setup -q -T -D -a 13
215 %setup -q -T -D -a 14
216 %setup -q -T -D -a 15
217 %patch -p0
219 %build
220 # build YAML C API
221 ( cd yaml-%{V_libyaml}
222 CC="%{l_cc}" \
223 CFLAGS="%{l_cflags -O}" \
224 ./configure \
225 --prefix=%{l_prefix} \
226 --disable-shared
227 %{l_make} %{l_mflags -O}
228 ) || exit $?
230 # build Syck C API
231 ( cd syck-%{V_libsyck}
232 CC="%{l_cc}" \
233 CFLAGS="%{l_cflags -O}" \
234 ./configure \
235 --prefix=%{l_prefix}
236 %{l_make} %{l_mflags}
237 ) || exit $?
239 # build PHP API
240 %if "%{with_php}" == "yes"
241 ( cd syck-%{V_php_syck}
242 %{l_prefix}/bin/phpize
243 CC="%{l_cc}" \
244 CFLAGS="%{l_cflags -O}" \
245 CPPFLAGS="-I`pwd`/../syck-%{V_libsyck}/lib" \
246 LDFLAGS="-L`pwd`/../syck-%{V_libsyck}/lib" \
247 ./configure \
248 --with-syck=`pwd`/../syck-%{V_libsyck}
249 %{l_make} %{l_mflags}
250 ) || exit $?
251 ( cd yaml-%{V_php_yaml}
252 %{l_prefix}/bin/phpize
253 CC="%{l_cc}" \
254 CFLAGS="%{l_cflags -O}" \
255 CPPFLAGS="-I`pwd`/../yaml-%{V_libyaml}/include" \
256 LDFLAGS="-L`pwd`/../yaml-%{V_libyaml}/src/.libs" \
257 ./configure \
258 --with-yaml=`pwd`/../yaml-%{V_libyaml}
259 %{l_make} %{l_mflags}
260 ) || exit $?
261 %endif
263 # build Ruby API
264 %if "%{with_ruby}" == "yes"
265 ( cd syck-%{V_libsyck}/ext/ruby
266 %{l_prefix}/bin/ruby install.rb config --prefix=%{l_prefix}
267 %{l_prefix}/bin/ruby install.rb setup
268 ) || exit $?
269 %endif
271 # build Perl API
272 %if "%{with_perl}" == "yes"
273 %{l_prefix}/bin/perl-openpkg prepare
274 %{l_prefix}/bin/perl-openpkg -d YAML-%{V_perl_yaml} configure build
275 %{l_prefix}/bin/perl-openpkg -d YAML-Syck-%{V_perl_yaml_syck} configure build
276 %{l_prefix}/bin/perl-openpkg -d YAML-Tiny-%{V_perl_yaml_tiny} configure build
277 %{l_prefix}/bin/perl-openpkg -d YAML-AppConfig-%{V_perl_yaml_appconfig} configure build
278 %{l_prefix}/bin/perl-openpkg -d YAML-LibYAML-%{V_perl_yaml_libyaml} configure build
279 %{l_prefix}/bin/perl-openpkg -d YAML-Active-%{V_perl_yaml_active} configure build
280 %{l_prefix}/bin/perl-openpkg -d YAML-Object-%{V_perl_yaml_object} configure build
281 %{l_prefix}/bin/perl-openpkg -d IO-YAML-%{V_perl_io_yaml} configure build
282 %endif
284 # build Java API
285 %if "%{with_java}" == "yes"
286 ( cd jvyaml-%{V_java_jvyaml}
287 %{l_prefix}/bin/ant
288 ) || exit $?
289 ( cd jyaml
290 %{l_prefix}/bin/ant
291 ) || exit $?
292 %endif
294 %install
296 # install YAML C API
297 ( cd yaml-%{V_libyaml}
298 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
299 ) || exit $?
301 # install Syck C API
302 ( cd syck-%{V_libsyck}
303 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
304 ) || exit $?
306 # install PHP API
307 %if "%{with_php}" == "yes"
308 ( cd syck-%{V_php_syck}
309 %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT
310 ) || exit $?
311 ( cd yaml-%{V_php_yaml}
312 %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT
313 ) || exit $?
314 ( cd spyc-%{V_php_spyc}
315 %{l_shtool} mkdir -f -p -m 755 \
316 $RPM_BUILD_ROOT%{l_prefix}/share/yaml
317 %{l_shtool} install -c -m 644 \
318 spyc.php $RPM_BUILD_ROOT%{l_prefix}/share/yaml/
319 ) || exit $?
320 %endif
322 # install Ruby API
323 %if "%{with_ruby}" == "yes"
324 ( cd syck-%{V_libsyck}/ext/ruby
325 %{l_prefix}/bin/ruby install.rb install --prefix=$RPM_BUILD_ROOT
326 ) || exit $?
327 %endif
329 # install Perl API
330 %if "%{with_perl}" == "yes"
331 %{l_prefix}/bin/perl-openpkg -d YAML-%{V_perl_yaml} install
332 %{l_prefix}/bin/perl-openpkg -d YAML-Syck-%{V_perl_yaml_syck} install
333 %{l_prefix}/bin/perl-openpkg -d YAML-Tiny-%{V_perl_yaml_tiny} install
334 %{l_prefix}/bin/perl-openpkg -d YAML-AppConfig-%{V_perl_yaml_appconfig} install
335 %{l_prefix}/bin/perl-openpkg -d YAML-LibYAML-%{V_perl_yaml_libyaml} install
336 %{l_prefix}/bin/perl-openpkg -d YAML-Active-%{V_perl_yaml_active} install
337 %{l_prefix}/bin/perl-openpkg -d YAML-Object-%{V_perl_yaml_object} install
338 %{l_prefix}/bin/perl-openpkg -d IO-YAML-%{V_perl_io_yaml} install
339 %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
340 %else
341 >perl-openpkg-files
342 %endif
344 # install Java API
345 %if "%{with_java}" == "yes"
346 %{l_shtool} mkdir -f -p -m 755 \
347 $RPM_BUILD_ROOT%{l_prefix}/lib/yaml
348 %{l_shtool} install -c -m 644 \
349 jvyaml-%{V_java_jvyaml}/lib/jvyaml.jar \
350 $RPM_BUILD_ROOT%{l_prefix}/lib/yaml/
351 %{l_shtool} install -c -m 644 \
352 jyaml/dist/jyaml-*.jar \
353 $RPM_BUILD_ROOT%{l_prefix}/lib/yaml/jyaml.jar
354 %endif
356 # install JavaScript API
357 %{l_shtool} mkdir -f -p -m 755 \
358 $RPM_BUILD_ROOT%{l_prefix}/share/yaml
359 %{l_shtool} install -c -m 644 \
360 yaml-javascript-%{V_yaml_javascript}/yaml_dumper.js \
361 $RPM_BUILD_ROOT%{l_prefix}/share/yaml/
363 # install YAML specification and quick reference
364 %{l_shtool} install -c -m 644 \
365 %{SOURCE %{V_yaml_spec}.pdf} \
366 $RPM_BUILD_ROOT%{l_prefix}/share/yaml/yaml.pdf
367 %{l_shtool} install -c -m 644 \
368 %{SOURCE yaml.yml} \
369 $RPM_BUILD_ROOT%{l_prefix}/share/yaml/
371 # determine installation files
372 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
373 %{l_files_std} `cat perl-openpkg-files`
375 %files -f files
377 %clean