michael@356: ## michael@356: ## yaml.spec -- OpenPKG RPM Package Specification michael@356: ## Copyright (c) 2000-2011 OpenPKG Foundation e.V. michael@356: ## michael@356: ## Permission to use, copy, modify, and distribute this software for michael@356: ## any purpose with or without fee is hereby granted, provided that michael@356: ## the above copyright notice and this permission notice appear in all michael@356: ## copies. michael@356: ## michael@356: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@356: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@356: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@356: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@356: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@356: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@356: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@356: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@356: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@356: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@356: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@356: ## SUCH DAMAGE. michael@356: ## michael@356: michael@356: # package version michael@356: %define V_libsyck 0.70 michael@356: %define V_libyaml 0.1.4 michael@356: %define V_perl_yaml 0.73 michael@356: %define V_perl_yaml_syck 1.17 michael@356: %define V_perl_yaml_tiny 1.50 michael@356: %define V_perl_yaml_appconfig 0.16 michael@356: %define V_perl_yaml_libyaml 0.35 michael@356: %define V_perl_yaml_active 1.100810 michael@356: %define V_perl_yaml_object 0.04 michael@356: %define V_perl_io_yaml 0.08 michael@356: %define V_yaml_javascript 0.03 michael@356: %define V_yaml_spec 2004-12-28 michael@356: %define V_java_jvyaml 0.2.1 michael@356: %define V_java_jyaml 1.3 michael@356: %define V_php_syck 0.9.3 michael@356: %define V_php_yaml 1.0.1 michael@356: michael@356: # package information michael@356: Name: yaml michael@356: Summary: YAML Ain't Markup Language (YAML) michael@356: URL: http://yaml.org/ michael@356: Vendor: B. Ingerson, C. Evans, O. Ben-Kiki et al. michael@356: Packager: OpenPKG Foundation e.V. michael@356: Distribution: OpenPKG Community michael@356: Class: PLUS michael@356: Group: Language michael@356: License: BSD/Artistic michael@356: Version: 0 michael@357: Release: 20110914 michael@356: michael@356: # package options michael@356: %option with_perl no michael@356: %option with_php no michael@356: %option with_ruby no michael@356: %option with_java no michael@356: michael@356: # list of sources michael@356: Source0: http://cloud.github.com/downloads/indeyets/syck/syck-%{V_libsyck}.tar.gz michael@356: Source1: http://pyyaml.org/download/libyaml/yaml-%{V_libyaml}.tar.gz michael@356: Source2: http://www.cpan.org/modules/by-module/YAML/YAML-%{V_perl_yaml}.tar.gz michael@356: Source3: http://www.cpan.org/modules/by-module/YAML/YAML-Syck-%{V_perl_yaml_syck}.tar.gz michael@356: Source4: http://www.cpan.org/modules/by-module/YAML/YAML-Tiny-%{V_perl_yaml_tiny}.tar.gz michael@356: Source5: http://www.cpan.org/modules/by-module/YAML/YAML-AppConfig-%{V_perl_yaml_appconfig}.tar.gz michael@356: Source6: http://www.cpan.org/modules/by-module/YAML/YAML-LibYAML-%{V_perl_yaml_libyaml}.tar.gz michael@356: Source7: http://www.cpan.org/modules/by-module/YAML/YAML-Active-%{V_perl_yaml_active}.tar.gz michael@356: Source8: http://www.cpan.org/authors/id/N/NK/NKUITSE/IO-YAML-%{V_perl_io_yaml}.tar.gz michael@356: Source9: http://osdn.dl.sourceforge.net/yaml-javascript/yaml-javascript-%{V_yaml_javascript}.tar.gz michael@356: Source10: https://jvyaml.dev.java.net/files/documents/5215/41455/jvyaml-src-%{V_java_jvyaml}.tar.gz michael@356: Source11: http://switch.dl.sourceforge.net/jyaml/jyaml-src-%{V_java_jyaml}.tgz michael@356: Source12: http://www.cpan.org/authors/id/E/EI/EIDOLON/YAML-Object-%{V_perl_yaml_object}.tar.gz michael@356: Source13: http://pecl.php.net/get/syck-%{V_php_syck}.tgz michael@356: Source14: http://pecl.php.net/get/yaml-%{V_php_yaml}.tgz michael@357: Source15: http://yaml.org/spec/history/%{V_yaml_spec}/%{V_yaml_spec}.pdf michael@357: Source16: yaml.yml michael@356: Patch0: yaml.patch michael@356: michael@356: # build information michael@357: Prefix: %{l_prefix} michael@357: BuildRoot: %{l_buildroot} michael@357: BuildPreReq: OpenPKG, openpkg >= 20060823, make, bison michael@357: PreReq: OpenPKG, openpkg >= 20060823 michael@356: %if "%{with_perl}" == "yes" michael@356: BuildPreReq: perl, perl-openpkg, perl-module michael@356: PreReq: perl michael@356: %endif michael@356: %if "%{with_php}" == "yes" michael@356: BuildPreReq: php, autoconf michael@356: PreReq: php michael@356: %endif michael@356: %if "%{with_ruby}" == "yes" michael@356: BuildPreReq: ruby michael@356: PreReq: ruby michael@356: %endif michael@356: %if "%{with_java}" == "yes" michael@356: BuildPreReq: java, JAVA-JDK, ant michael@356: PreReq: java, JAVA-JDK michael@356: %endif michael@357: AutoReq: no michael@357: AutoReqProv: no michael@356: michael@356: %description michael@356: YAML Ain't Markup Language (YAML) is an international collaboration michael@356: to make a sophisticated data serialization language which is both michael@356: human readable and computationally powerful. This OpenPKG package michael@356: provides C, and JavaScript plus optionally Perl, PHP, and Ruby APIs michael@356: for the generation and parsing of YAML. michael@356: michael@356: %track michael@356: prog yaml:libsyck = { michael@356: version = %{V_libsyck} michael@356: url = http://github.com/indeyets/syck/downloads michael@356: regex = syck-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:libyaml = { michael@356: version = %{V_libyaml} michael@356: url = http://pyyaml.org/download/libyaml/ michael@356: regex = yaml-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:YAML = { michael@356: version = %{V_perl_yaml} michael@356: url = http://www.cpan.org/modules/by-module/YAML/ michael@356: regex = YAML-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:YAML-Syck = { michael@356: version = %{V_perl_yaml_syck} michael@356: url = http://www.cpan.org/modules/by-module/YAML/ michael@356: regex = YAML-Syck-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:YAML-Tiny = { michael@356: version = %{V_perl_yaml_tiny} michael@356: url = http://www.cpan.org/modules/by-module/YAML/ michael@356: regex = YAML-Tiny-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:YAML-AppConfig = { michael@356: version = %{V_perl_yaml_appconfig} michael@356: url = http://www.cpan.org/modules/by-module/YAML/ michael@356: regex = YAML-AppConfig-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:YAML-LibYAML = { michael@356: version = %{V_perl_yaml_libyaml} michael@356: url = http://www.cpan.org/modules/by-module/YAML/ michael@356: regex = YAML-LibYAML-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:YAML-Active = { michael@356: comment = "rse: 1.08 requires Class::Accessor::Complex and this too many others" michael@356: version = %{V_perl_yaml_active} michael@356: url = http://www.cpan.org/modules/by-module/YAML/ michael@356: regex = YAML-Active-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:IO-YAML = { michael@356: version = %{V_perl_io_yaml} michael@356: url = http://www.cpan.org/authors/id/N/NK/NKUITSE/ michael@356: regex = IO-YAML-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:yaml-javascript = { michael@356: version = %{V_yaml_javascript} michael@356: url = http://sourceforge.net/projects/yaml-javascript/files/ michael@356: regex = yaml-javascript-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:yaml-spec = { michael@356: disabled michael@356: comment = "rse: website references not existing 2004-12-30 and no updates since recently anyway" michael@356: version = %{V_yaml_spec} michael@356: url = http://yaml.org/spec/ michael@356: regex = (\d{4}-\d{2}-\d{2})\.pdf michael@356: } michael@356: prog yaml:java-jvyaml = { michael@356: version = %{V_java_jvyaml} michael@356: url = http://jvyaml.dev.java.net/servlets/ProjectDocumentList michael@356: regex = jvyaml-src-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:java-jyaml = { michael@356: version = %{V_java_jyaml} michael@356: url = http://sourceforge.net/projects/jyaml/files/ michael@356: regex = jyaml-src-(__VER__)\.tgz michael@356: } michael@356: prog yaml:YAML-Object = { michael@356: version = %{V_perl_yaml_object} michael@356: url = http://www.cpan.org/authors/id/E/EI/EIDOLON/ michael@356: regex = YAML-Object-(__VER__)\.tar\.gz michael@356: } michael@356: prog yaml:PHP-Syck = { michael@356: version = %{V_php_syck} michael@356: url = http://pecl.php.net/package/syck michael@356: regex = syck-(__VER__)\.tgz michael@356: } michael@356: prog yaml:PHP-YAML = { michael@356: version = %{V_php_yaml} michael@356: url = http://pecl.php.net/package/yaml michael@356: regex = yaml-(__VER__)\.tgz michael@356: } michael@356: michael@356: %prep michael@356: %setup -q -c michael@356: %setup -q -T -D -a 1 michael@356: %setup -q -T -D -a 2 michael@356: %setup -q -T -D -a 3 michael@356: %setup -q -T -D -a 4 michael@356: %setup -q -T -D -a 5 michael@356: %setup -q -T -D -a 6 michael@356: %setup -q -T -D -a 7 michael@356: %setup -q -T -D -a 8 michael@356: %setup -q -T -D -a 9 michael@356: %setup -q -T -D -a 10 michael@356: %setup -q -T -D -a 11 michael@356: %setup -q -T -D -a 12 michael@356: %setup -q -T -D -a 13 michael@356: %setup -q -T -D -a 14 michael@356: %patch -p0 michael@356: michael@356: %build michael@356: # build YAML C API michael@356: ( cd yaml-%{V_libyaml} michael@356: CC="%{l_cc}" \ michael@356: CFLAGS="%{l_cflags -O}" \ michael@356: ./configure \ michael@356: --prefix=%{l_prefix} \ michael@356: --disable-shared michael@356: %{l_make} %{l_mflags -O} michael@356: ) || exit $? michael@356: michael@356: # build Syck C API michael@356: ( cd syck-%{V_libsyck} michael@356: CC="%{l_cc}" \ michael@356: CFLAGS="%{l_cflags -O}" \ michael@356: ./configure \ michael@356: --prefix=%{l_prefix} \ michael@356: --disable-shared michael@356: %{l_make} %{l_mflags} michael@356: ) || exit $? michael@356: michael@356: # build PHP API michael@356: %if "%{with_php}" == "yes" michael@356: ( cd syck-%{V_php_syck} michael@356: %{l_prefix}/bin/phpize michael@356: CC="%{l_cc}" \ michael@356: CFLAGS="%{l_cflags -O}" \ michael@356: CPPFLAGS="-I`pwd`/../syck-%{V_libsyck}/lib" \ michael@356: LDFLAGS="-L`pwd`/../syck-%{V_libsyck}/lib" \ michael@356: ./configure \ michael@356: --with-syck=`pwd`/../syck-%{V_libsyck} michael@356: %{l_make} %{l_mflags} michael@356: ) || exit $? michael@356: ( cd yaml-%{V_php_yaml} michael@356: %{l_prefix}/bin/phpize michael@356: CC="%{l_cc}" \ michael@356: CFLAGS="%{l_cflags -O}" \ michael@356: CPPFLAGS="-I`pwd`/../yaml-%{V_libyaml}/include" \ michael@356: LDFLAGS="-L`pwd`/../yaml-%{V_libyaml}/src/.libs" \ michael@356: ./configure \ michael@356: --with-yaml=`pwd`/../yaml-%{V_libyaml} michael@356: %{l_make} %{l_mflags} michael@356: ) || exit $? michael@356: %endif michael@356: michael@356: # build Ruby API michael@356: %if "%{with_ruby}" == "yes" michael@356: ( cd syck-%{V_libsyck}/ext/ruby michael@356: %{l_prefix}/bin/ruby install.rb config --prefix=%{l_prefix} michael@356: %{l_prefix}/bin/ruby install.rb setup michael@356: ) || exit $? michael@356: %endif michael@356: michael@356: # build Perl API michael@356: %if "%{with_perl}" == "yes" michael@356: %{l_prefix}/bin/perl-openpkg prepare michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-%{V_perl_yaml} configure build michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-Syck-%{V_perl_yaml_syck} configure build michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-Tiny-%{V_perl_yaml_tiny} configure build michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-AppConfig-%{V_perl_yaml_appconfig} configure build michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-LibYAML-%{V_perl_yaml_libyaml} configure build michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-Active-%{V_perl_yaml_active} configure build michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-Object-%{V_perl_yaml_object} configure build michael@356: %{l_prefix}/bin/perl-openpkg -d IO-YAML-%{V_perl_io_yaml} configure build michael@356: %endif michael@356: michael@356: # build Java API michael@356: %if "%{with_java}" == "yes" michael@356: ( cd jvyaml-%{V_java_jvyaml} michael@356: %{l_prefix}/bin/ant michael@356: ) || exit $? michael@356: ( cd jyaml michael@356: %{l_prefix}/bin/ant michael@356: ) || exit $? michael@356: %endif michael@356: michael@356: %install michael@357: rm -rf $RPM_BUILD_ROOT michael@356: michael@356: # install YAML C API michael@356: ( cd yaml-%{V_libyaml} michael@356: %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" michael@356: ) || exit $? michael@356: michael@356: # install Syck C API michael@356: ( cd syck-%{V_libsyck} michael@356: %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" michael@356: ) || exit $? michael@356: michael@356: # install PHP API michael@356: %if "%{with_php}" == "yes" michael@356: ( cd syck-%{V_php_syck} michael@356: %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT michael@356: ) || exit $? michael@356: ( cd yaml-%{V_php_yaml} michael@356: %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT michael@356: ) || exit $? michael@356: %endif michael@356: michael@356: # install Ruby API michael@356: %if "%{with_ruby}" == "yes" michael@356: ( cd syck-%{V_libsyck}/ext/ruby michael@356: %{l_prefix}/bin/ruby install.rb install --prefix=$RPM_BUILD_ROOT michael@356: ) || exit $? michael@356: %endif michael@356: michael@356: # install Perl API michael@356: %if "%{with_perl}" == "yes" michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-%{V_perl_yaml} install michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-Syck-%{V_perl_yaml_syck} install michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-Tiny-%{V_perl_yaml_tiny} install michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-AppConfig-%{V_perl_yaml_appconfig} install michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-LibYAML-%{V_perl_yaml_libyaml} install michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-Active-%{V_perl_yaml_active} install michael@356: %{l_prefix}/bin/perl-openpkg -d YAML-Object-%{V_perl_yaml_object} install michael@356: %{l_prefix}/bin/perl-openpkg -d IO-YAML-%{V_perl_io_yaml} install michael@356: %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup michael@356: %else michael@356: >perl-openpkg-files michael@356: %endif michael@356: michael@356: # install Java API michael@356: %if "%{with_java}" == "yes" michael@356: %{l_shtool} mkdir -f -p -m 755 \ michael@356: $RPM_BUILD_ROOT%{l_prefix}/lib/yaml michael@356: %{l_shtool} install -c -m 644 \ michael@356: jvyaml-%{V_java_jvyaml}/lib/jvyaml.jar \ michael@356: $RPM_BUILD_ROOT%{l_prefix}/lib/yaml/ michael@356: %{l_shtool} install -c -m 644 \ michael@356: jyaml/dist/jyaml-*.jar \ michael@356: $RPM_BUILD_ROOT%{l_prefix}/lib/yaml/jyaml.jar michael@356: %endif michael@356: michael@356: # install JavaScript API michael@356: %{l_shtool} mkdir -f -p -m 755 \ michael@356: $RPM_BUILD_ROOT%{l_prefix}/share/yaml michael@356: %{l_shtool} install -c -m 644 \ michael@356: yaml-javascript-%{V_yaml_javascript}/yaml_dumper.js \ michael@356: $RPM_BUILD_ROOT%{l_prefix}/share/yaml/ michael@356: michael@356: # install YAML specification and quick reference michael@356: %{l_shtool} install -c -m 644 \ michael@356: %{SOURCE %{V_yaml_spec}.pdf} \ michael@356: $RPM_BUILD_ROOT%{l_prefix}/share/yaml/yaml.pdf michael@356: %{l_shtool} install -c -m 644 \ michael@356: %{SOURCE yaml.yml} \ michael@356: $RPM_BUILD_ROOT%{l_prefix}/share/yaml/ michael@356: michael@356: # determine installation files michael@356: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@356: %{l_files_std} `cat perl-openpkg-files` michael@356: michael@356: %files -f files michael@356: michael@356: %clean michael@357: rm -rf $RPM_BUILD_ROOT michael@356: