+# NOTE: Building requires working DNS setup. Build may hang
+# even if _only_ first dns specified in resolv.conf
+# is unreachable.
+# TODO
+# - separate -devel (at least header files!)
+# - modularize (odbc, etc)
+# - manuals to %{_mandir}
#
# Conditional build:
%bcond_with java # with Java support
-#
+%bcond_without odbc # without unixODBC support
+#
Summary: OpenSource Erlang/OTP
Summary(pl): Erlang/OTP z otwartymi ¼ród³ami
Name: erlang
-Version: R10B_7
+Version: R11B_0
Release: 1
Epoch: 1
+%define _version %(echo %{version} | tr _ -)
License: distributable
Group: Development/Languages
-%define _version %(echo %{version} | tr _ -)
Source0: http://www.erlang.org/download/otp_src_%{_version}.tar.gz
-# Source0-md5: fc039c62862ebae141e27370401aaab0
-Source1: http://www.erlang.org/download/otp_doc_man_R10B-6.tar.gz
-# Source1-md5: 0243d2ff01fb2bac03115bcbe2284b20
+# Source0-md5: 367d9d3ba979cd278b78d6d0393982ba
+Source1: http://www.erlang.org/download/otp_doc_man_R11B-0.tar.gz
+# Source1-md5: 172591538db42e81b814a77f30da4fa4
Patch0: %{name}-fPIC.patch
Patch1: %{name}-optional_java.patch
Patch2: %{name}-hipe_optimistic_regalloc_once_only.patch
URL: http://www.erlang.org/
-BuildRequires: XFree86-devel
+%{?with_java:BuildRequires: /usr/bin/jar}
+BuildRequires: xorg-lib-libX11-devel
BuildRequires: autoconf
BuildRequires: automake
-%{?with_java:BuildRequires: jdk >= 1.2}
-%{?with_java:BuildRequires: /usr/bin/jar}
BuildRequires: flex
+%{?with_java:BuildRequires: jdk >= 1.2}
BuildRequires: ncurses-devel
BuildRequires: openssl-devel >= 0.9.7
Buildrequires: openssl-tools
BuildRequires: perl-base
+%if %{with odbc}
+BuildRequires: unixODBC-devel
+%else
+BuildConflicts: unixODBC-devel
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
+
%define _erl_target %(echo %{_build} | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/')
%description
%configure \
--with%{!?with_java:out}-java
ERL_TOP=`pwd`; export ERL_TOP
-%{__make} \
- TARGET="%{_erl_target}"
+ %{__make} \
+ TARGET="%{_erl_target}" \
+ || { find . -name erl_crash.dump | xargs cat ; exit 1 ; }
%install
rm -rf $RPM_BUILD_ROOT
sed -i -e"s#$RPM_BUILD_ROOT##" \
$RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl}
-for l in erl erlc ; do
+for l in erl erlc dialyzer epmd run_erl to_erl ; do
ln -sf %{_libdir}/%{name}/bin/$l $RPM_BUILD_ROOT%{_bindir}
done
ERTSDIR=`echo $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-* | sed -e"s#^$RPM_BUILD_ROOT##"`
find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \
| sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list
-rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib/internal
+rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal
%clean
%attr(755,root,root) %{_bindir}/*
%dir %{_libdir}/erlang
%dir %{_libdir}/%{name}/bin
+%attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer
%attr(755,root,root) %{_libdir}/%{name}/bin/epmd
%attr(755,root,root) %{_libdir}/%{name}/bin/erl
%attr(755,root,root) %{_libdir}/%{name}/bin/erlc
%dir %{_libdir}/%{name}/erts-*/bin
%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child*
+%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer
%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/e*
%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/heart*
%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/inet_gethost