Fedora RPM and RPMSpec for Haxe

118 views
Skip to first unread message

TopHattedCoder

unread,
Feb 22, 2013, 8:25:55 PM2/22/13
to haxe...@googlegroups.com
Hey Haxers,
I've spent the last few hours working on an RPMSpec for Haxe to install on my machine. It's based on the Arch User Repository's haxe-svn PKGBUILD and works like a charm. I've included the spec, source RPM and an x86 RPM.
haxe-3.0-1.fc18.x86_64.rpm
haxe-3.0-1.fc18.src.rpm

TopHattedCoder

unread,
Feb 22, 2013, 8:31:52 PM2/22/13
to haxe...@googlegroups.com
Here's the spec file (it refuses to attach it as a file, sorry):

Name: haxe
Version: 3.0
Release: 1%{?dist}
License: GPLv2
Group: Development/Languages
URL: http://code.google.com/p/haxe/
Source: %{name}-%{version}.tar.gz
#Source1: https://github.com/haxe-mirrors/haxe/archive/master.tar.gz
Summary: A cross-target language akin to AS3 and Java.
BuildRequires: subversion, ocaml, sed, zlib, nekovm, ocaml-camlp4, ocaml-camlp4-devel, zlib-static
%description
Haxe is a cross-target programming language inspired by Java and AS3 that allows you compile to lots of other programming languages/binaries.
%prep
%setup -q -n %{name}
%build
make clean > /dev/null
sed --in-place=.orig -e "s/\\(Haxe Compiler %d.%.2d\\) -/\\1 [SVN r$pkgver] -/" main.ml 
make libs
make haxe
make tools
mkdir -p "%{_builddir}/%{name}/doc"
cd %{_builddir}/%{name}/doc
rm -rf content *.xml
HAXE_LIBRARY_PATH=%{_builddir}/%{name}/std %{_builddir}/%{name}/haxe all.hxml
[ ! \( -f flash8.xml -a -f flash9.xml -a -f neko.xml -a -f js.xml -a -f php.xml -a -f cpp.xml \) ] && return 1
  %{_builddir}/%{name}/std/tools/haxedoc/haxedoc -v "flash8.xml;flash8;flash" "neko.xml;neko" "js.xml;js" "flash9.xml;flash" "php.xml;php" "cpp.xml;cpp"
  _res=$?
%install
rm -r %{buildroot}
mkdir -p %{buildroot}%{_libdir}/haxe/std
mkdir -p %{buildroot}%{_libdir}/haxe/doc
mkdir -p %{buildroot}%{_bindir}
cp %{_builddir}/%{name}/haxe %{buildroot}%{_libdir}/haxe
cp %{_builddir}/%{name}/haxelib %{buildroot}%{_libdir}/haxe
cp %{_builddir}/%{name}/haxedoc %{buildroot}%{_libdir}/haxe
cp -r %{_builddir}/%{name}/std %{buildroot}%{_libdir}/haxe
cp -r %{_builddir}/%{name}/doc %{buildroot}%{_libdir}/haxe
#ln -s %{buildroot}%{_libdir}/haxe %{buildroot}%{_bindir}/haxe
#ln -s %{buildroot}%{_libdir}/haxelib %{buildroot}%{_bindir}/haxelib
#ln -s %{buildroot}%{_libdir}/haxedoc %{buildroot}%{_bindir}/haxedoc
%files
%{_libdir}/haxe/*
%post
env HAXE_LIBRARY_PATH=%{_libdir}/haxe
ln -s %{_libdir}/haxe/haxe %{_bindir}/haxe
ln -s %{_libdir}/haxe/haxedoc %{_bindir}/haxedoc
ln -s %{_libdir}/haxe/haxelib %{_bindir}/haxelib
%postun
unlink %{_bindir}/haxe
unlink %{_bindir}/haxedoc
unlink %{_bindir}/haxelib

Francois Nicaise

unread,
Feb 22, 2013, 11:39:08 PM2/22/13
to haxe...@googlegroups.com, haxe...@googlegroups.com
Cool, Thanks!

Thinkslow 
Cross- platform gaming experiments 
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxelang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

TopHattedCoder

unread,
Feb 23, 2013, 8:46:04 AM2/23/13
to haxe...@googlegroups.com
Here's a newer version that sets up the environment variables and haxelib for you.
Name: haxe
Version: 3.0
Release: 3%{?dist}
mkdir -p %{buildroot}%{_datarootdir}/haxe/std
mkdir -p %{buildroot}%{_datarootdir}/haxe/doc
mkdir -p %{buildroot}%{_datarootdir}/haxe/lib
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}/etc/profile.d
cp %{_builddir}/%{name}/haxe %{buildroot}%{_bindir}
cp %{_builddir}/%{name}/haxelib %{buildroot}%{_bindir} 
cp %{_builddir}/%{name}/haxedoc %{buildroot}%{_bindir}
cp -r %{_builddir}/%{name}/std %{buildroot}%{_datarootdir}/haxe
cp -r %{_builddir}/%{name}/doc %{buildroot}%{_datarootdir}/haxe
echo "export HAXE_LIBRARY_PATH=%{_libdir}/haxe/std" >> %{buildroot}/etc/profile.d/haxe_init.sh

%files
%{_datarootdir}/haxe/*
/etc/profile.d/*
%{_bindir}/*

%post
haxelib setup %{_datarootdir}/lib
haxe-3.0-3.fc18.src.rpm
haxe-3.0-3.fc18.x86_64.rpm

TopHattedCoder

unread,
Feb 23, 2013, 9:19:57 AM2/23/13
to haxe...@googlegroups.com
Full haxelib support:
chmod -R 777 %{_datarootdir}/haxe/lib
haxelib setup %{_datarootdir}/haxe/lib
haxe-3.0-3.fc18.x86_64.rpm
haxe-3.0-3.fc18.src.rpm

TopHattedCoder

unread,
Feb 23, 2013, 8:27:01 PM2/23/13
to haxe...@googlegroups.com
Last one, I promise. Fixed library path environment var.
echo "export HAXE_LIBRARY_PATH=%{_datarootdir}/haxe/std" >> %{buildroot}/etc/profile.d/haxe_init.sh
haxe-3.0-3.fc18.src.rpm
haxe-3.0-3.fc18.x86_64.rpm
Reply all
Reply to author
Forward
0 new messages