1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/yaml/yaml.spec Thu Sep 15 17:10:15 2011 +0200 1.3 @@ -0,0 +1,379 @@ 1.4 +## 1.5 +## yaml.spec -- OpenPKG RPM Package Specification 1.6 +## Copyright (c) 2000-2011 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## 1.8 +## Permission to use, copy, modify, and distribute this software for 1.9 +## any purpose with or without fee is hereby granted, provided that 1.10 +## the above copyright notice and this permission notice appear in all 1.11 +## copies. 1.12 +## 1.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.24 +## SUCH DAMAGE. 1.25 +## 1.26 + 1.27 +# package version 1.28 +%define V_libsyck 0.70 1.29 +%define V_libyaml 0.1.4 1.30 +%define V_perl_yaml 0.73 1.31 +%define V_perl_yaml_syck 1.17 1.32 +%define V_perl_yaml_tiny 1.50 1.33 +%define V_perl_yaml_appconfig 0.16 1.34 +%define V_perl_yaml_libyaml 0.35 1.35 +%define V_perl_yaml_active 1.100810 1.36 +%define V_perl_yaml_object 0.04 1.37 +%define V_perl_io_yaml 0.08 1.38 +%define V_yaml_javascript 0.03 1.39 +%define V_yaml_spec 2004-12-28 1.40 +%define V_java_jvyaml 0.2.1 1.41 +%define V_java_jyaml 1.3 1.42 +%define V_php_syck 0.9.3 1.43 +%define V_php_yaml 1.0.1 1.44 +%define V_php_spyc 0.4.5 1.45 + 1.46 +# package information 1.47 +Name: yaml 1.48 +Summary: YAML Ain't Markup Language (YAML) 1.49 +URL: http://yaml.org/ 1.50 +Vendor: B. Ingerson, C. Evans, O. Ben-Kiki et al. 1.51 +Packager: OpenPKG Foundation e.V. 1.52 +Distribution: OpenPKG Community 1.53 +Class: PLUS 1.54 +Group: Language 1.55 +License: BSD/Artistic 1.56 +Version: 0 1.57 +Release: 20110624 1.58 + 1.59 +# package options 1.60 +%option with_perl no 1.61 +%option with_php no 1.62 +%option with_ruby no 1.63 +%option with_java no 1.64 + 1.65 +# list of sources 1.66 +Source0: http://cloud.github.com/downloads/indeyets/syck/syck-%{V_libsyck}.tar.gz 1.67 +Source1: http://pyyaml.org/download/libyaml/yaml-%{V_libyaml}.tar.gz 1.68 +Source2: http://www.cpan.org/modules/by-module/YAML/YAML-%{V_perl_yaml}.tar.gz 1.69 +Source3: http://www.cpan.org/modules/by-module/YAML/YAML-Syck-%{V_perl_yaml_syck}.tar.gz 1.70 +Source4: http://www.cpan.org/modules/by-module/YAML/YAML-Tiny-%{V_perl_yaml_tiny}.tar.gz 1.71 +Source5: http://www.cpan.org/modules/by-module/YAML/YAML-AppConfig-%{V_perl_yaml_appconfig}.tar.gz 1.72 +Source6: http://www.cpan.org/modules/by-module/YAML/YAML-LibYAML-%{V_perl_yaml_libyaml}.tar.gz 1.73 +Source7: http://www.cpan.org/modules/by-module/YAML/YAML-Active-%{V_perl_yaml_active}.tar.gz 1.74 +Source8: http://www.cpan.org/authors/id/N/NK/NKUITSE/IO-YAML-%{V_perl_io_yaml}.tar.gz 1.75 +Source9: http://osdn.dl.sourceforge.net/yaml-javascript/yaml-javascript-%{V_yaml_javascript}.tar.gz 1.76 +Source10: https://jvyaml.dev.java.net/files/documents/5215/41455/jvyaml-src-%{V_java_jvyaml}.tar.gz 1.77 +Source11: http://switch.dl.sourceforge.net/jyaml/jyaml-src-%{V_java_jyaml}.tgz 1.78 +Source12: http://www.cpan.org/authors/id/E/EI/EIDOLON/YAML-Object-%{V_perl_yaml_object}.tar.gz 1.79 +Source13: http://pecl.php.net/get/syck-%{V_php_syck}.tgz 1.80 +Source14: http://pecl.php.net/get/yaml-%{V_php_yaml}.tgz 1.81 +Source15: http://spyc.googlecode.com/files/spyc-%{V_php_spyc}.zip 1.82 +Source16: http://yaml.org/spec/history/%{V_yaml_spec}/%{V_yaml_spec}.pdf 1.83 +Source17: yaml.yml 1.84 +Patch0: yaml.patch 1.85 + 1.86 +# build information 1.87 +BuildPreReq: OpenPKG, openpkg >= 20100101, make, bison 1.88 +PreReq: OpenPKG, openpkg >= 20100101 1.89 +%if "%{with_perl}" == "yes" 1.90 +BuildPreReq: perl, perl-openpkg, perl-module 1.91 +PreReq: perl 1.92 +%endif 1.93 +%if "%{with_php}" == "yes" 1.94 +BuildPreReq: php, autoconf 1.95 +PreReq: php 1.96 +%endif 1.97 +%if "%{with_ruby}" == "yes" 1.98 +BuildPreReq: ruby 1.99 +PreReq: ruby 1.100 +%endif 1.101 +%if "%{with_java}" == "yes" 1.102 +BuildPreReq: java, JAVA-JDK, ant 1.103 +PreReq: java, JAVA-JDK 1.104 +%endif 1.105 + 1.106 +%description 1.107 + YAML Ain't Markup Language (YAML) is an international collaboration 1.108 + to make a sophisticated data serialization language which is both 1.109 + human readable and computationally powerful. This OpenPKG package 1.110 + provides C, and JavaScript plus optionally Perl, PHP, and Ruby APIs 1.111 + for the generation and parsing of YAML. 1.112 + 1.113 +%track 1.114 + prog yaml:libsyck = { 1.115 + version = %{V_libsyck} 1.116 + url = http://github.com/indeyets/syck/downloads 1.117 + regex = syck-(__VER__)\.tar\.gz 1.118 + } 1.119 + prog yaml:libyaml = { 1.120 + version = %{V_libyaml} 1.121 + url = http://pyyaml.org/download/libyaml/ 1.122 + regex = yaml-(__VER__)\.tar\.gz 1.123 + } 1.124 + prog yaml:YAML = { 1.125 + version = %{V_perl_yaml} 1.126 + url = http://www.cpan.org/modules/by-module/YAML/ 1.127 + regex = YAML-(__VER__)\.tar\.gz 1.128 + } 1.129 + prog yaml:YAML-Syck = { 1.130 + version = %{V_perl_yaml_syck} 1.131 + url = http://www.cpan.org/modules/by-module/YAML/ 1.132 + regex = YAML-Syck-(__VER__)\.tar\.gz 1.133 + } 1.134 + prog yaml:YAML-Tiny = { 1.135 + version = %{V_perl_yaml_tiny} 1.136 + url = http://www.cpan.org/modules/by-module/YAML/ 1.137 + regex = YAML-Tiny-(__VER__)\.tar\.gz 1.138 + } 1.139 + prog yaml:YAML-AppConfig = { 1.140 + version = %{V_perl_yaml_appconfig} 1.141 + url = http://www.cpan.org/modules/by-module/YAML/ 1.142 + regex = YAML-AppConfig-(__VER__)\.tar\.gz 1.143 + } 1.144 + prog yaml:YAML-LibYAML = { 1.145 + version = %{V_perl_yaml_libyaml} 1.146 + url = http://www.cpan.org/modules/by-module/YAML/ 1.147 + regex = YAML-LibYAML-(__VER__)\.tar\.gz 1.148 + } 1.149 + prog yaml:YAML-Active = { 1.150 + comment = "rse: 1.08 requires Class::Accessor::Complex and this too many others" 1.151 + version = %{V_perl_yaml_active} 1.152 + url = http://www.cpan.org/modules/by-module/YAML/ 1.153 + regex = YAML-Active-(__VER__)\.tar\.gz 1.154 + } 1.155 + prog yaml:IO-YAML = { 1.156 + version = %{V_perl_io_yaml} 1.157 + url = http://www.cpan.org/authors/id/N/NK/NKUITSE/ 1.158 + regex = IO-YAML-(__VER__)\.tar\.gz 1.159 + } 1.160 + prog yaml:yaml-javascript = { 1.161 + version = %{V_yaml_javascript} 1.162 + url = http://sourceforge.net/projects/yaml-javascript/files/ 1.163 + regex = yaml-javascript-(__VER__)\.tar\.gz 1.164 + } 1.165 + prog yaml:yaml-spec = { 1.166 + disabled 1.167 + comment = "rse: website references not existing 2004-12-30 and no updates since recently anyway" 1.168 + version = %{V_yaml_spec} 1.169 + url = http://yaml.org/spec/ 1.170 + regex = (\d{4}-\d{2}-\d{2})\.pdf 1.171 + } 1.172 + prog yaml:java-jvyaml = { 1.173 + version = %{V_java_jvyaml} 1.174 + url = http://jvyaml.dev.java.net/servlets/ProjectDocumentList 1.175 + regex = jvyaml-src-(__VER__)\.tar\.gz 1.176 + } 1.177 + prog yaml:java-jyaml = { 1.178 + version = %{V_java_jyaml} 1.179 + url = http://sourceforge.net/projects/jyaml/files/ 1.180 + regex = jyaml-src-(__VER__)\.tgz 1.181 + } 1.182 + prog yaml:YAML-Object = { 1.183 + version = %{V_perl_yaml_object} 1.184 + url = http://www.cpan.org/authors/id/E/EI/EIDOLON/ 1.185 + regex = YAML-Object-(__VER__)\.tar\.gz 1.186 + } 1.187 + prog yaml:PHP-Syck = { 1.188 + version = %{V_php_syck} 1.189 + url = http://pecl.php.net/package/syck 1.190 + regex = syck-(__VER__)\.tgz 1.191 + } 1.192 + prog yaml:PHP-YAML = { 1.193 + version = %{V_php_yaml} 1.194 + url = http://pecl.php.net/package/yaml 1.195 + regex = yaml-(__VER__)\.tgz 1.196 + } 1.197 + prog yaml:PHP-spyc = { 1.198 + version = %{V_php_spyc} 1.199 + url = http://spyc.googlecode.com/files/ 1.200 + regex = spyc-(__VER__)\.zip 1.201 + } 1.202 + 1.203 +%prep 1.204 + %setup -q -c 1.205 + %setup -q -T -D -a 1 1.206 + %setup -q -T -D -a 2 1.207 + %setup -q -T -D -a 3 1.208 + %setup -q -T -D -a 4 1.209 + %setup -q -T -D -a 5 1.210 + %setup -q -T -D -a 6 1.211 + %setup -q -T -D -a 7 1.212 + %setup -q -T -D -a 8 1.213 + %setup -q -T -D -a 9 1.214 + %setup -q -T -D -a 10 1.215 + %setup -q -T -D -a 11 1.216 + %setup -q -T -D -a 12 1.217 + %setup -q -T -D -a 13 1.218 + %setup -q -T -D -a 14 1.219 + %setup -q -T -D -a 15 1.220 + %patch -p0 1.221 + 1.222 +%build 1.223 + # build YAML C API 1.224 + ( cd yaml-%{V_libyaml} 1.225 + CC="%{l_cc}" \ 1.226 + CFLAGS="%{l_cflags -O}" \ 1.227 + ./configure \ 1.228 + --prefix=%{l_prefix} \ 1.229 + --disable-shared 1.230 + %{l_make} %{l_mflags -O} 1.231 + ) || exit $? 1.232 + 1.233 + # build Syck C API 1.234 + ( cd syck-%{V_libsyck} 1.235 + CC="%{l_cc}" \ 1.236 + CFLAGS="%{l_cflags -O}" \ 1.237 + ./configure \ 1.238 + --prefix=%{l_prefix} \ 1.239 + --disable-shared 1.240 + %{l_make} %{l_mflags} 1.241 + ) || exit $? 1.242 + 1.243 + # build PHP API 1.244 +%if "%{with_php}" == "yes" 1.245 + ( cd syck-%{V_php_syck} 1.246 + %{l_prefix}/bin/phpize 1.247 + CC="%{l_cc}" \ 1.248 + CFLAGS="%{l_cflags -O}" \ 1.249 + CPPFLAGS="-I`pwd`/../syck-%{V_libsyck}/lib" \ 1.250 + LDFLAGS="-L`pwd`/../syck-%{V_libsyck}/lib" \ 1.251 + ./configure \ 1.252 + --with-syck=`pwd`/../syck-%{V_libsyck} 1.253 + %{l_make} %{l_mflags} 1.254 + ) || exit $? 1.255 + ( cd yaml-%{V_php_yaml} 1.256 + %{l_prefix}/bin/phpize 1.257 + CC="%{l_cc}" \ 1.258 + CFLAGS="%{l_cflags -O}" \ 1.259 + CPPFLAGS="-I`pwd`/../yaml-%{V_libyaml}/include" \ 1.260 + LDFLAGS="-L`pwd`/../yaml-%{V_libyaml}/src/.libs" \ 1.261 + ./configure \ 1.262 + --with-yaml=`pwd`/../yaml-%{V_libyaml} 1.263 + %{l_make} %{l_mflags} 1.264 + ) || exit $? 1.265 +%endif 1.266 + 1.267 + # build Ruby API 1.268 +%if "%{with_ruby}" == "yes" 1.269 + ( cd syck-%{V_libsyck}/ext/ruby 1.270 + %{l_prefix}/bin/ruby install.rb config --prefix=%{l_prefix} 1.271 + %{l_prefix}/bin/ruby install.rb setup 1.272 + ) || exit $? 1.273 +%endif 1.274 + 1.275 + # build Perl API 1.276 +%if "%{with_perl}" == "yes" 1.277 + %{l_prefix}/bin/perl-openpkg prepare 1.278 + %{l_prefix}/bin/perl-openpkg -d YAML-%{V_perl_yaml} configure build 1.279 + %{l_prefix}/bin/perl-openpkg -d YAML-Syck-%{V_perl_yaml_syck} configure build 1.280 + %{l_prefix}/bin/perl-openpkg -d YAML-Tiny-%{V_perl_yaml_tiny} configure build 1.281 + %{l_prefix}/bin/perl-openpkg -d YAML-AppConfig-%{V_perl_yaml_appconfig} configure build 1.282 + %{l_prefix}/bin/perl-openpkg -d YAML-LibYAML-%{V_perl_yaml_libyaml} configure build 1.283 + %{l_prefix}/bin/perl-openpkg -d YAML-Active-%{V_perl_yaml_active} configure build 1.284 + %{l_prefix}/bin/perl-openpkg -d YAML-Object-%{V_perl_yaml_object} configure build 1.285 + %{l_prefix}/bin/perl-openpkg -d IO-YAML-%{V_perl_io_yaml} configure build 1.286 +%endif 1.287 + 1.288 + # build Java API 1.289 +%if "%{with_java}" == "yes" 1.290 + ( cd jvyaml-%{V_java_jvyaml} 1.291 + %{l_prefix}/bin/ant 1.292 + ) || exit $? 1.293 + ( cd jyaml 1.294 + %{l_prefix}/bin/ant 1.295 + ) || exit $? 1.296 +%endif 1.297 + 1.298 +%install 1.299 + 1.300 + # install YAML C API 1.301 + ( cd yaml-%{V_libyaml} 1.302 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.303 + ) || exit $? 1.304 + 1.305 + # install Syck C API 1.306 + ( cd syck-%{V_libsyck} 1.307 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.308 + ) || exit $? 1.309 + 1.310 + # install PHP API 1.311 +%if "%{with_php}" == "yes" 1.312 + ( cd syck-%{V_php_syck} 1.313 + %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT 1.314 + ) || exit $? 1.315 + ( cd yaml-%{V_php_yaml} 1.316 + %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT 1.317 + ) || exit $? 1.318 + ( cd spyc-%{V_php_spyc} 1.319 + %{l_shtool} mkdir -f -p -m 755 \ 1.320 + $RPM_BUILD_ROOT%{l_prefix}/share/yaml 1.321 + %{l_shtool} install -c -m 644 \ 1.322 + spyc.php $RPM_BUILD_ROOT%{l_prefix}/share/yaml/ 1.323 + ) || exit $? 1.324 +%endif 1.325 + 1.326 + # install Ruby API 1.327 +%if "%{with_ruby}" == "yes" 1.328 + ( cd syck-%{V_libsyck}/ext/ruby 1.329 + %{l_prefix}/bin/ruby install.rb install --prefix=$RPM_BUILD_ROOT 1.330 + ) || exit $? 1.331 +%endif 1.332 + 1.333 + # install Perl API 1.334 +%if "%{with_perl}" == "yes" 1.335 + %{l_prefix}/bin/perl-openpkg -d YAML-%{V_perl_yaml} install 1.336 + %{l_prefix}/bin/perl-openpkg -d YAML-Syck-%{V_perl_yaml_syck} install 1.337 + %{l_prefix}/bin/perl-openpkg -d YAML-Tiny-%{V_perl_yaml_tiny} install 1.338 + %{l_prefix}/bin/perl-openpkg -d YAML-AppConfig-%{V_perl_yaml_appconfig} install 1.339 + %{l_prefix}/bin/perl-openpkg -d YAML-LibYAML-%{V_perl_yaml_libyaml} install 1.340 + %{l_prefix}/bin/perl-openpkg -d YAML-Active-%{V_perl_yaml_active} install 1.341 + %{l_prefix}/bin/perl-openpkg -d YAML-Object-%{V_perl_yaml_object} install 1.342 + %{l_prefix}/bin/perl-openpkg -d IO-YAML-%{V_perl_io_yaml} install 1.343 + %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup 1.344 +%else 1.345 + >perl-openpkg-files 1.346 +%endif 1.347 + 1.348 + # install Java API 1.349 +%if "%{with_java}" == "yes" 1.350 + %{l_shtool} mkdir -f -p -m 755 \ 1.351 + $RPM_BUILD_ROOT%{l_prefix}/lib/yaml 1.352 + %{l_shtool} install -c -m 644 \ 1.353 + jvyaml-%{V_java_jvyaml}/lib/jvyaml.jar \ 1.354 + $RPM_BUILD_ROOT%{l_prefix}/lib/yaml/ 1.355 + %{l_shtool} install -c -m 644 \ 1.356 + jyaml/dist/jyaml-*.jar \ 1.357 + $RPM_BUILD_ROOT%{l_prefix}/lib/yaml/jyaml.jar 1.358 +%endif 1.359 + 1.360 + # install JavaScript API 1.361 + %{l_shtool} mkdir -f -p -m 755 \ 1.362 + $RPM_BUILD_ROOT%{l_prefix}/share/yaml 1.363 + %{l_shtool} install -c -m 644 \ 1.364 + yaml-javascript-%{V_yaml_javascript}/yaml_dumper.js \ 1.365 + $RPM_BUILD_ROOT%{l_prefix}/share/yaml/ 1.366 + 1.367 + # install YAML specification and quick reference 1.368 + %{l_shtool} install -c -m 644 \ 1.369 + %{SOURCE %{V_yaml_spec}.pdf} \ 1.370 + $RPM_BUILD_ROOT%{l_prefix}/share/yaml/yaml.pdf 1.371 + %{l_shtool} install -c -m 644 \ 1.372 + %{SOURCE yaml.yml} \ 1.373 + $RPM_BUILD_ROOT%{l_prefix}/share/yaml/ 1.374 + 1.375 + # determine installation files 1.376 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 1.377 + %{l_files_std} `cat perl-openpkg-files` 1.378 + 1.379 +%files -f files 1.380 + 1.381 +%clean 1.382 +