File smlnj.spec of Package smlnj

#
# spec file for package smlnj (Version 110.69)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           smlnj
Summary:        Standard ML of New Jersey
Version:        110.69
Release:        1
Group:          Development/Languages/Other
License:        BSD 3-Clause
Url:            http://www.smlnj.org/
Source:         smlnj-%{version}.tar.bz2
Patch:          config.diff
Patch1:         runtime.diff
Patch2:         MLRISC.diff
ExclusiveArch:  %ix86 ppc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
SML/NJ is an interactive compiler for the Standard ML Programming
Language (1997 Revision).



%prep
%setup
tar -xzf config.tgz
cd config
%patch
cd ..
mkdir base
cd base
tar -xzf ../runtime.tgz
cd runtime
%patch1
cd ..
tar -xzf ../MLRISC.tgz
cd MLRISC
%patch2

%build
CFLAGS=$RPM_OPT_FLAGS config/install.sh

%install
mkdir -p $RPM_BUILD_ROOT%{_libdir}/smlnj
cp -a bin lib $RPM_BUILD_ROOT%{_libdir}/smlnj
mkdir -p $RPM_BUILD_ROOT%{_bindir}
for f in $RPM_BUILD_ROOT%{_libdir}/smlnj/bin/*; do
  sed -i -e "s,$PWD,%{_libdir}/smlnj," $f
  ln -sf ${f#$RPM_BUILD_ROOT} $RPM_BUILD_ROOT%{_bindir}
done
for f in $RPM_BUILD_ROOT%{_libdir}/smlnj/bin/.*-sml; do
  sed -i -e "s,$PWD,%{_libdir}/smlnj," $f
done

%files
%defattr(-, root, root)
%doc %{version}-* HISTORY
%{_bindir}/*
%{_libdir}/smlnj

%changelog
* Mon Feb 16 2009 schwab@suse.de
- Update to version 110.69.
* Thu Oct 30 2008 schwab@suse.de
- Fix embedded paths.
* Wed Feb 13 2008 schwab@suse.de
- Update to version 110.67.
* Fri Aug 10 2007 schwab@suse.de
- Update to version 110.65.
* Thu Mar 01 2007 schwab@suse.de
- Hack to build as non-root.
* Tue Nov 21 2006 schwab@suse.de
- Update to version 110.60.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jul 01 2005 schwab@suse.de
- Update to version 110.54.
* Fri Feb 11 2005 schwab@suse.de
- Update to version 110.52.
* Tue Nov 16 2004 schwab@suse.de
- Update to version 110.50.
* Thu Aug 05 2004 schwab@suse.de
- Update to version 110.47.
* Mon May 17 2004 schwab@suse.de
- Update to version 110.45.
- Also build on ppc.
* Mon May 12 2003 schwab@suse.de
- Fix file list.
* Thu Nov 14 2002 schwab@suse.de
- Fix invalid token pasting.
* Sat Feb 10 2001 schwab@suse.de
- Initial version 110.0.7.