%define mlton_bootstrap 0 Name: mlton Version: 20051202 Release: 8%{?dist} Summary: Optimizing compiler for Standard ML Group: Development/Languages License: BSD style and MIT URL: http://mlton.org/ Source0: http://mlton.org/pages/Download/attachments/mlton-%{version}-1.src.tgz %if %{mlton_bootstrap} # taken from mlton_20060213-1 from Debian Source1: mlton-bootstrap.i386.tar.bz2 Source2: mlton-bootstrap.ppc.tar.bz2 %endif Patch0: mlton-pdf-docs.patch Patch1: mlton-debuginfo.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gmp-devel htmldoc tetex-latex which %if ! %{mlton_bootstrap} BuildRequires: mlton %endif Requires: gmp-devel gcc # not yet available for 64-bit arch ExcludeArch: x86_64 # description taken from the Debian package by Stephen Weeks %description MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. %prep %setup -q # build documentation as PDF %patch -P 0 -p1 # enable -g and disable strip so debuginfo packages work %patch -P 1 -p1 # set correct version of PDF guide until this is fixed upstream sed -i 's/\(^version=\).*$/\1%{version}/g' bin/make-pdf-guide %if %{mlton_bootstrap} %ifarch i386 %setup -T -D -q -a 1 %endif %ifarch ppc %setup -T -D -q -a 2 %endif sed -i 's/\(^lib=\).*$/\1\$MLTON_BOOTSTRAP_DIR\/usr\/lib\/mlton/g' \ bootstrap/usr/bin/mlton %endif %build %if %{mlton_bootstrap} export MLTON_BOOTSTRAP_DIR=$(pwd)/bootstrap export PATH="${PATH}":$MLTON_BOOTSTRAP_DIR/usr/bin %endif make %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT MAN_PREFIX_EXTRA=/share \ TDOC=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} # remove unecessary regression test rm -rf $RPM_BUILD_ROOT%{_libdir}/mlton/sml/ckit-lib/regression # move some documentation around mv $RPM_BUILD_ROOT%{_libdir}/mlton/sml/ckit-lib/doc \ $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ckit-lib mv $RPM_BUILD_ROOT%{_libdir}/mlton/sml/smlnj-lib/Doc \ $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/smlnj-lib %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc %{_docdir}/%{name}-%{version} %{_bindir}/ml* %{_libdir}/mlton %{_mandir}/man1/* %changelog * Sun Jul 9 2006 Adam Goode - 20051202-8 - Conditionalize bootstrapping and disable it * Sat Jul 1 2006 Adam Goode - 20051202-7 - Fix macro in changelog - Remove mixed use of tabs and spaces * Sun Jun 25 2006 Adam Goode - 20051202-6 - Build runtime with -g, but not -gstabs+ - Re-enable debuginfo packages * Wed Jun 21 2006 Adam Goode - 20051202-5 - Disable empty debuginfo packages * Wed Jun 21 2006 Adam Goode - 20051202-4 - Be more specific about license - Add "which" to BuildRequires until everyone is running new mock * Tue Jun 20 2006 Adam Goode - 20051202-3 - Create PDF documentation for mlyacc and mllex (instead of .ps.gz) - Move ckit-lib/doc and smlnj-lib/Doc to %%{_docdir} - Remove regression files from ckit * Thu Jun 8 2006 Adam Goode - 20051202-2 - Change to use bootstrap * Wed Jun 7 2006 Adam Goode - 20051202-1 - Initial release for FC5