]> git.pld-linux.org Git - packages/erlang.git/blobdiff - erlang.spec
- Release: 1
[packages/erlang.git] / erlang.spec
index c031aac6a0b71a558df222fb6783e04be49c1551..45829d827020bd6ef4f596ab65fb230d28c53185 100644 (file)
@@ -1,22 +1,37 @@
+#
+# Conditional build:
+%bcond_with    java            # with Java support
+# 
 Summary:       OpenSource Erlang/OTP
 Summary(pl):   Erlang/OTP z otwartymi ¼ród³ami
 Name:          erlang
-Version:       R9C_2
-Release:       0.1
+Version:       R10B_7
+Release:       1
 Epoch:         1
 License:       distributable
 Group:         Development/Languages
 %define                _version        %(echo %{version} | tr _ -)
 Source0:       http://www.erlang.org/download/otp_src_%{_version}.tar.gz
-# Source0-md5: 3cdb1c58671995d6b334e0f8da414816
-Source1:       http://www.erlang.org/download/otp_man_R9C-0.tar.gz
-# Source1-md5: 80ab1a76fb2bf59cf83832096cf7f63b
+# Source0-md5: fc039c62862ebae141e27370401aaab0
+Source1:       http://www.erlang.org/download/otp_doc_man_R10B-6.tar.gz
+# Source1-md5: 0243d2ff01fb2bac03115bcbe2284b20
+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
 BuildRequires: autoconf
+BuildRequires: automake
+%{?with_java:BuildRequires:    jdk >= 1.2}
+%{?with_java:BuildRequires:    /usr/bin/jar}
 BuildRequires: flex
+BuildRequires: ncurses-devel
+BuildRequires: openssl-devel >= 0.9.7
+Buildrequires: openssl-tools
 BuildRequires: perl-base
 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
 Erlang is a programming language designed at the Ericsson Computer
@@ -30,9 +45,13 @@ rozpowszechnianiu Erlanga poza Ericssonem.
 
 %prep
 %setup -q -n otp_src_%{_version}
-%{__tar} xf %{SOURCE1} man/ COPYRIGHT
+%{__tar} xzf %{SOURCE1} man/ COPYRIGHT
+#%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
+find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub
 %{__autoconf}
 cd lib
 %{__autoconf}
@@ -42,21 +61,24 @@ cd ../gs
 %{__autoconf}
 cd ../megaco
 %{__autoconf}
+cd ../odbc
+%{__autoconf}
 cd ../snmp
 %{__autoconf}
 cd ../../erts/
 %{__autoconf}
 cd ..
-%configure
+%configure \
+       --with%{!?with_java:out}-java
 ERL_TOP=`pwd`; export ERL_TOP
 %{__make} \
-       TARGET="%{_build}"
+       TARGET="%{_erl_target}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-       TARGET="%{_build}" \
+       TARGET="%{_erl_target}" \
        INSTALL_PREFIX=$RPM_BUILD_ROOT
 
 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/*.html
@@ -76,12 +98,24 @@ ln -sf $ERTSDIR/bin/epmd $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
 cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name}
 find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9
 
+# some files in the library need +x, so we build the list here
+echo "%%defattr(644,root,root,755)" > lib.list
+find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \
+       | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list
+find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \
+       | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_libdir}/%%{name}/#" >> lib.list
+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-*/include/internal
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%files -f lib.list
 %defattr(644,root,root,755)
-%doc AUTHORS EPLICENCE README erts/notes.html COPYRIGHT
+%doc AUTHORS EPLICENCE README COPYRIGHT
 %attr(755,root,root) %{_bindir}/*
 %dir %{_libdir}/erlang
 %dir %{_libdir}/%{name}/bin
@@ -97,7 +131,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/%{name}/erts-*/doc
 %{_libdir}/%{name}/erts-*/man
 %{_libdir}/%{name}/erts-*/src
-%{_libdir}/%{name}/erts-*/*.ear
+%{_libdir}/%{name}/erts-*/include
+#%{_libdir}/%{name}/erts-*/*.ear
 %dir %{_libdir}/%{name}/erts-*/bin
 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child*
@@ -108,7 +143,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/start
 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/to_erl
 %{_libdir}/%{name}/erts-*/bin/start*.*
-%{_libdir}/%{name}/lib
+# (file list dynamically generated) %{_libdir}/%{name}/lib
 %dir %{_libdir}/%{name}/misc
 %attr(755,root,root) %{_libdir}/%{name}/misc/*
 %{_libdir}/%{name}/releases
This page took 0.038994 seconds and 4 git commands to generate.