]> git.pld-linux.org Git - packages/erlang.git/blame - erlang.spec
- rel 1, builds
[packages/erlang.git] / erlang.spec
CommitLineData
a57a4f81
AM
1# NOTE: Building requires working DNS setup. Build may hang
2# even if _only_ first dns specified in resolv.conf
3# is unreachable.
7863299b
ER
4# TODO
5# - separate -devel (at least header files!)
6# - modularize (odbc, etc)
1bfec8a4 7# - manuals to %{_mandir}
9dab2fdc 8# - investigate fPIC.patch
3bb4a699
JK
9#
10# Conditional build:
11%bcond_with java # with Java support
38af531e 12%bcond_without odbc # without unixODBC support
9a059664 13#
c7068bd4 14Summary: OpenSource Erlang/OTP
285f449f 15Summary(pl.UTF-8): Erlang/OTP z otwartymi źródłami
c6ed8a25 16Name: erlang
64f81501 17Version: R12B_2
50937ca9 18iRelease: 1
c7068bd4 19Epoch: 1
9a059664 20%define _version %(echo %{version} | tr _ -)
c7068bd4
JK
21License: distributable
22Group: Development/Languages
c6ed8a25 23Source0: http://www.erlang.org/download/otp_src_%{_version}.tar.gz
64f81501 24# Source0-md5: 05861c7f75d7b2ed5af42c93cebe5801
462ee014 25Source1: http://www.erlang.org/download/otp_doc_man_%{_version}.tar.gz
26# Source1-md5: 645a4486f02338a5cf22be7563b862f9
d6d0a605 27Patch0: %{name}-fPIC.patch
de154c22 28Patch1: %{name}-optional_java.patch
e06bff62 29Patch2: %{name}-tinfo.patch
64f81501 30Patch3: %{name}-new_glibc.patch
c7068bd4 31URL: http://www.erlang.org/
9a059664 32%{?with_java:BuildRequires: /usr/bin/jar}
d5ce2f9c 33BuildRequires: xorg-lib-libX11-devel
5c54a479 34BuildRequires: autoconf
d6d0a605 35BuildRequires: automake
5c54a479 36BuildRequires: flex
9a059664 37%{?with_java:BuildRequires: jdk >= 1.2}
e6190289 38BuildRequires: ncurses-devel
52fa868e 39BuildRequires: openssl-devel >= 0.9.7
40Buildrequires: openssl-tools
5c54a479 41BuildRequires: perl-base
38af531e 42%if %{with odbc}
9a059664 43BuildRequires: unixODBC-devel
38af531e 44%else
9a059664 45BuildConflicts: unixODBC-devel
38af531e 46%endif
c7068bd4 47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
9a059664 48
3bb4a699 49%define _erl_target %(echo %{_build} | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/')
c7068bd4
JK
50
51%description
52Erlang is a programming language designed at the Ericsson Computer
53Science Laboratory. Open-source Erlang is being released to help
54encourage the spread of Erlang outside Ericsson.
5c54a479 55
9ac92939
JR
56%description -l pl.UTF-8
57Erlang to język programowania opracowany w Ericsson Computer Science
58Laboratory. Open-source Erlang został wydany, aby pomóc w
5c54a479
JB
59rozpowszechnianiu Erlanga poza Ericssonem.
60
c7068bd4 61%prep
c6ed8a25 62%setup -q -n otp_src_%{_version}
d709612b 63%{__tar} xzf %{SOURCE1} man/ COPYRIGHT
43071f9a 64#%patch0 -p1
de154c22 65%patch1 -p1
29122d5e 66%patch2 -p1
64f81501 67%patch3 -p1
c7068bd4
JK
68
69%build
d6d0a605 70find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub
c7068bd4
JK
71%{__autoconf}
72cd lib
73%{__autoconf}
74cd erl_interface
75%{__autoconf}
76cd ../gs
77%{__autoconf}
78cd ../megaco
79%{__autoconf}
5fe0b29c
AZ
80cd ../odbc
81%{__autoconf}
c7068bd4
JK
82cd ../snmp
83%{__autoconf}
5c54a479 84cd ../../erts/
c7068bd4
JK
85%{__autoconf}
86cd ..
3bb4a699 87%configure \
1485134d 88%ifarch sparc
89 CFLAGS="%{rpmcflags} -mv8plus" \
90%endif
3bb4a699 91 --with%{!?with_java:out}-java
a952def8 92rm -f lib/ssl/SKIP
c7068bd4 93ERL_TOP=`pwd`; export ERL_TOP
82844de3 94 %{__make} -j1 \
6cba5783 95 TARGET="%{_erl_target}" \
8738d875 96 || { find . -name erl_crash.dump | xargs cat ; exit 1 ; }
c7068bd4
JK
97
98%install
99rm -rf $RPM_BUILD_ROOT
100
64f81501 101%{__make} -j1 install \
e043a03d 102 TARGET="%{_erl_target}" \
3685cbd2
JK
103 INSTALL_PREFIX=$RPM_BUILD_ROOT
104
c6ed8a25 105rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/*.html
3685cbd2
JK
106
107sed -i -e"s#$RPM_BUILD_ROOT##" \
c6ed8a25 108 $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl}
3685cbd2 109
82844de3 110for l in erl erlc escript dialyzer epmd run_erl to_erl typer; do
c6ed8a25 111 ln -sf %{_libdir}/%{name}/bin/$l $RPM_BUILD_ROOT%{_bindir}
3685cbd2 112done
c6ed8a25 113ERTSDIR=`echo $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-* | sed -e"s#^$RPM_BUILD_ROOT##"`
49d2322c 114for l in epmd ; do
3685cbd2
JK
115 ln -sf $ERTSDIR/bin/$l $RPM_BUILD_ROOT%{_bindir}
116done
c6ed8a25
JK
117ln -sf $ERTSDIR/bin/epmd $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
118
119cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name}
120find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9
c7068bd4 121
e043a03d
JK
122# some files in the library need +x, so we build the list here
123echo "%%defattr(644,root,root,755)" > lib.list
124find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \
125 | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list
126find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \
127 | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_libdir}/%%{name}/#" >> lib.list
128find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \
129 | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list
130
5482576a 131rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib
43071f9a
JK
132rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal
133
c7068bd4
JK
134%clean
135rm -rf $RPM_BUILD_ROOT
136
e043a03d 137%files -f lib.list
c7068bd4 138%defattr(644,root,root,755)
43071f9a 139%doc AUTHORS EPLICENCE README COPYRIGHT
c7068bd4 140%attr(755,root,root) %{_bindir}/*
3685cbd2 141%dir %{_libdir}/erlang
c6ed8a25 142%dir %{_libdir}/%{name}/bin
5482576a 143%attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer
c6ed8a25
JK
144%attr(755,root,root) %{_libdir}/%{name}/bin/epmd
145%attr(755,root,root) %{_libdir}/%{name}/bin/erl
146%attr(755,root,root) %{_libdir}/%{name}/bin/erlc
82844de3 147%attr(755,root,root) %{_libdir}/%{name}/bin/escript
c6ed8a25
JK
148%attr(755,root,root) %{_libdir}/%{name}/bin/run_erl
149%attr(755,root,root) %{_libdir}/%{name}/bin/start
150%attr(755,root,root) %{_libdir}/%{name}/bin/start_erl
151%attr(755,root,root) %{_libdir}/%{name}/bin/to_erl
82844de3 152%attr(755,root,root) %{_libdir}/%{name}/bin/typer
c6ed8a25
JK
153%{_libdir}/%{name}/bin/start*.*
154%dir %{_libdir}/%{name}/erts-*
155%{_libdir}/%{name}/erts-*/doc
156%{_libdir}/%{name}/erts-*/man
157%{_libdir}/%{name}/erts-*/src
43071f9a
JK
158%{_libdir}/%{name}/erts-*/include
159#%{_libdir}/%{name}/erts-*/*.ear
c6ed8a25
JK
160%dir %{_libdir}/%{name}/erts-*/bin
161%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
162%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child*
5482576a 163%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer
c6ed8a25
JK
164%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/e*
165%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/heart*
166%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/inet_gethost
167%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/run_erl
168%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/start
169%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/to_erl
49d2322c 170%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/typer
c6ed8a25 171%{_libdir}/%{name}/erts-*/bin/start*.*
e043a03d 172# (file list dynamically generated) %{_libdir}/%{name}/lib
c6ed8a25
JK
173%dir %{_libdir}/%{name}/misc
174%attr(755,root,root) %{_libdir}/%{name}/misc/*
175%{_libdir}/%{name}/releases
176%{_libdir}/%{name}/usr
177%doc %{_libdir}/%{name}/man
178%attr(755,root,root) %{_libdir}/%{name}/Install
This page took 0.088519 seconds and 4 git commands to generate.