From c329d03bb8a03c8d2527bde0c13d510888817669 Mon Sep 17 00:00:00 2001 From: Andy Li Date: Oct 23 2015 14:38:05 +0000 Subject: Initial import (#1270554). --- diff --git a/haxe-3.2.1.tar.gz b/haxe-3.2.1.tar.gz new file mode 100644 index 0000000..1688824 Binary files /dev/null and b/haxe-3.2.1.tar.gz differ diff --git a/haxe.spec b/haxe.spec new file mode 100644 index 0000000..d2a5145 --- /dev/null +++ b/haxe.spec @@ -0,0 +1,107 @@ +%global commit_ocamllibs 7a83e902634e1db204f6e3a48c2439f63d83c141 +%global commit_haxelib 4fefbd17a2d9a98200b621de801018af3896d68a + +Name: haxe +Version: 3.2.1 +Release: 1%{?dist} +Summary: Multi-target universal programming language + +# As described in http://haxe.org/foundation/open-source.html: +# * The Haxe Compiler - GPLv2+ +# * The Haxe Standard Library - MIT +# * The Neko Runtime Library - LGPLv2+ +# +# The source files: +# * All files in the std folder is MIT licensed, except: +# * std/cs/_std/haxe/ds/IntMap.hx - BSD (2 clause) +# * std/haxe/xml/Printer.hx - BSD (3 clause) +# * Ocamllibs in the libs folder: +# * the zlib headers in libs/extc/zlib - zlib +# * extc, ilib, javalib, neko, swflib - GPLv2+ +# * everything else - LGPLv2.1+ +License: GPLv2+ and MIT and LGPLv2+ and BSD + +URL: http://www.haxe.org/ + +Source0: https://github.com/HaxeFoundation/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: https://github.com/HaxeFoundation/ocamllibs/archive/%{commit_ocamllibs}.tar.gz#/ocamllibs-%{commit_ocamllibs}.tar.gz +Source2: https://github.com/HaxeFoundation/haxelib/archive/%{commit_haxelib}.tar.gz#/haxelib-%{commit_haxelib}.tar.gz + +BuildRequires: nekovm >= 2.0.0 +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: zlib-devel +BuildRequires: help2man +Requires: nekovm >= 2.0.0 +Requires: %{name}-stdlib = %{version} + +%description +Haxe is an open source toolkit based on a modern, +high level, strictly typed programming language, a cross-compiler, +a complete cross-platform standard library and ways to access each +platform's native capabilities. + +%package stdlib +Summary: The Haxe standard library +BuildArch: noarch + +%description stdlib +The %{name}-stdlib package contains the standard library used +by the Haxe compiler. + +%prep +%setup -q +pushd libs && tar -xf %{SOURCE1} --strip-components=1 && popd +pushd extra/haxelib_src && tar -xf %{SOURCE2} --strip-components=1 && popd + +# script-without-shebang +# https://github.com/HaxeFoundation/haxe/commit/7ecbc2baaef0e2f653f43b01071ffff0050ec5d3 +chmod a-x std/js/Boot.hx std/js/_std/Type.hx std/php/_std/haxe/ds/StringMap.hx +chmod a-x libs/extlib/extList.ml + +%build +# note that the Makefile does not support parallel building + +# Check to see if ocamlopt exists. If not, bytecompile everything. +# It is because ocamlopt may be missing in some architectures. +command -v ocamlopt && make || make BYTECODE=1 + +# Compile haxelib +make tools + +chmod 755 haxe haxelib + +%install +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_datadir}/%{name} + +cp -p haxe %{buildroot}%{_bindir} +cp -p haxelib %{buildroot}%{_bindir} +cp -rfp std %{buildroot}%{_datadir}/%{name} + +# Generate man pages +mkdir -p %{buildroot}%{_mandir}/man1 +help2man ./haxe --version-option=-version --no-discard-stderr --no-info --output=%{buildroot}%{_mandir}/man1/haxe.1 +help2man ./haxelib --help-option=help --version-option=version --no-info --output=%{buildroot}%{_mandir}/man1/haxelib.1 + +%check +%{buildroot}%{_bindir}/haxe -version +pushd tests/unit && %{buildroot}%{_bindir}/haxe compile-macro.hxml && popd + +%files +%doc README.md +%license extra/LICENSE.txt +%{_bindir}/haxe +%{_bindir}/haxelib +%{_mandir}/man1/haxe.1* +%{_mandir}/man1/haxelib.1* + +%files stdlib +%doc README.md +%license extra/LICENSE.txt +%{_datadir}/%{name}/ + +%changelog +* Wed Oct 07 2015 Andy Li - 3.2.1-1 +- Initial RPM release + diff --git a/haxelib-4fefbd17a2d9a98200b621de801018af3896d68a.tar.gz b/haxelib-4fefbd17a2d9a98200b621de801018af3896d68a.tar.gz new file mode 100644 index 0000000..097aece Binary files /dev/null and b/haxelib-4fefbd17a2d9a98200b621de801018af3896d68a.tar.gz differ diff --git a/ocamllibs-7a83e902634e1db204f6e3a48c2439f63d83c141.tar.gz b/ocamllibs-7a83e902634e1db204f6e3a48c2439f63d83c141.tar.gz new file mode 100644 index 0000000..abb4eca Binary files /dev/null and b/ocamllibs-7a83e902634e1db204f6e3a48c2439f63d83c141.tar.gz differ