]>
Commit | Line | Data |
---|---|---|
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 | 14 | Summary: OpenSource Erlang/OTP |
285f449f | 15 | Summary(pl.UTF-8): Erlang/OTP z otwartymi źródłami |
c6ed8a25 | 16 | Name: erlang |
4003f6ea | 17 | # A - unstable, B - stable line, keep stable |
daa5c507 | 18 | Version: R14A |
4003f6ea | 19 | Release: 1.1 |
c7068bd4 | 20 | Epoch: 1 |
9a059664 | 21 | %define _version %(echo %{version} | tr _ -) |
c7068bd4 JK |
22 | License: distributable |
23 | Group: Development/Languages | |
c6ed8a25 | 24 | Source0: http://www.erlang.org/download/otp_src_%{_version}.tar.gz |
daa5c507 | 25 | # Source0-md5: a24873bbace9ab3c307f3d2492d9e134 |
462ee014 | 26 | Source1: http://www.erlang.org/download/otp_doc_man_%{_version}.tar.gz |
daa5c507 | 27 | # Source1-md5: b57a7846818ad144b1b6ecc0a54de2ae |
d6d0a605 | 28 | Patch0: %{name}-fPIC.patch |
75067de0 | 29 | Patch1: %{name}-tinfo.patch |
daa5c507 | 30 | Patch2: %{name}-link.patch |
c7068bd4 | 31 | URL: http://www.erlang.org/ |
9a059664 | 32 | %{?with_java:BuildRequires: /usr/bin/jar} |
d5ce2f9c | 33 | BuildRequires: xorg-lib-libX11-devel |
5c54a479 | 34 | BuildRequires: autoconf |
d6d0a605 | 35 | BuildRequires: automake |
5c54a479 | 36 | BuildRequires: flex |
9a059664 | 37 | %{?with_java:BuildRequires: jdk >= 1.2} |
e6190289 | 38 | BuildRequires: ncurses-devel |
52fa868e | 39 | BuildRequires: openssl-devel >= 0.9.7 |
be00b460 | 40 | BuildRequires: openssl-tools |
5c54a479 | 41 | BuildRequires: perl-base |
38af531e | 42 | %if %{with odbc} |
9a059664 | 43 | BuildRequires: unixODBC-devel |
38af531e | 44 | %else |
9a059664 | 45 | BuildConflicts: unixODBC-devel |
38af531e | 46 | %endif |
c7068bd4 | 47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9a059664 | 48 | |
75067de0 | 49 | %define _erl_target %(echo %{_build}-gnu | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/') |
c7068bd4 JK |
50 | |
51 | %description | |
52 | Erlang is a programming language designed at the Ericsson Computer | |
53 | Science Laboratory. Open-source Erlang is being released to help | |
54 | encourage the spread of Erlang outside Ericsson. | |
5c54a479 | 55 | |
9ac92939 JR |
56 | %description -l pl.UTF-8 |
57 | Erlang to język programowania opracowany w Ericsson Computer Science | |
58 | Laboratory. Open-source Erlang został wydany, aby pomóc w | |
5c54a479 JB |
59 | rozpowszechnianiu 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 |
7df53499 | 66 | %patch2 -p1 |
c7068bd4 JK |
67 | |
68 | %build | |
d6d0a605 | 69 | find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub |
c7068bd4 JK |
70 | %{__autoconf} |
71 | cd lib | |
72 | %{__autoconf} | |
73 | cd erl_interface | |
74 | %{__autoconf} | |
75 | cd ../gs | |
76 | %{__autoconf} | |
77 | cd ../megaco | |
78 | %{__autoconf} | |
5fe0b29c AZ |
79 | cd ../odbc |
80 | %{__autoconf} | |
c7068bd4 JK |
81 | cd ../snmp |
82 | %{__autoconf} | |
5c54a479 | 83 | cd ../../erts/ |
c7068bd4 JK |
84 | %{__autoconf} |
85 | cd .. | |
3bb4a699 | 86 | %configure \ |
1485134d | 87 | %ifarch sparc |
88 | CFLAGS="%{rpmcflags} -mv8plus" \ | |
89 | %endif | |
75067de0 | 90 | --with%{!?with_java:out}-javac |
a952def8 | 91 | rm -f lib/ssl/SKIP |
c7068bd4 | 92 | ERL_TOP=`pwd`; export ERL_TOP |
82844de3 | 93 | %{__make} -j1 \ |
6cba5783 | 94 | TARGET="%{_erl_target}" \ |
8738d875 | 95 | || { find . -name erl_crash.dump | xargs cat ; exit 1 ; } |
c7068bd4 JK |
96 | |
97 | %install | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
64f81501 | 100 | %{__make} -j1 install \ |
e043a03d | 101 | TARGET="%{_erl_target}" \ |
3685cbd2 JK |
102 | INSTALL_PREFIX=$RPM_BUILD_ROOT |
103 | ||
c6ed8a25 | 104 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/*.html |
3685cbd2 JK |
105 | |
106 | sed -i -e"s#$RPM_BUILD_ROOT##" \ | |
c6ed8a25 | 107 | $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl} |
3685cbd2 | 108 | |
82844de3 | 109 | for l in erl erlc escript dialyzer epmd run_erl to_erl typer; do |
c6ed8a25 | 110 | ln -sf %{_libdir}/%{name}/bin/$l $RPM_BUILD_ROOT%{_bindir} |
3685cbd2 | 111 | done |
c6ed8a25 | 112 | ERTSDIR=`echo $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-* | sed -e"s#^$RPM_BUILD_ROOT##"` |
49d2322c | 113 | for l in epmd ; do |
3685cbd2 JK |
114 | ln -sf $ERTSDIR/bin/$l $RPM_BUILD_ROOT%{_bindir} |
115 | done | |
c6ed8a25 JK |
116 | ln -sf $ERTSDIR/bin/epmd $RPM_BUILD_ROOT%{_libdir}/%{name}/bin |
117 | ||
118 | cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name} | |
119 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9 | |
c7068bd4 | 120 | |
e043a03d JK |
121 | # some files in the library need +x, so we build the list here |
122 | echo "%%defattr(644,root,root,755)" > lib.list | |
123 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \ | |
124 | | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list | |
125 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \ | |
126 | | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_libdir}/%%{name}/#" >> lib.list | |
127 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \ | |
128 | | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list | |
129 | ||
5482576a | 130 | rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib |
43071f9a JK |
131 | rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal |
132 | ||
c7068bd4 JK |
133 | %clean |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
e043a03d | 136 | %files -f lib.list |
c7068bd4 | 137 | %defattr(644,root,root,755) |
75067de0 | 138 | %doc AUTHORS EPLICENCE COPYRIGHT |
c7068bd4 | 139 | %attr(755,root,root) %{_bindir}/* |
3685cbd2 | 140 | %dir %{_libdir}/erlang |
c6ed8a25 | 141 | %dir %{_libdir}/%{name}/bin |
5482576a | 142 | %attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer |
c6ed8a25 JK |
143 | %attr(755,root,root) %{_libdir}/%{name}/bin/epmd |
144 | %attr(755,root,root) %{_libdir}/%{name}/bin/erl | |
145 | %attr(755,root,root) %{_libdir}/%{name}/bin/erlc | |
82844de3 | 146 | %attr(755,root,root) %{_libdir}/%{name}/bin/escript |
c6ed8a25 JK |
147 | %attr(755,root,root) %{_libdir}/%{name}/bin/run_erl |
148 | %attr(755,root,root) %{_libdir}/%{name}/bin/start | |
149 | %attr(755,root,root) %{_libdir}/%{name}/bin/start_erl | |
150 | %attr(755,root,root) %{_libdir}/%{name}/bin/to_erl | |
82844de3 | 151 | %attr(755,root,root) %{_libdir}/%{name}/bin/typer |
c6ed8a25 JK |
152 | %{_libdir}/%{name}/bin/start*.* |
153 | %dir %{_libdir}/%{name}/erts-* | |
154 | %{_libdir}/%{name}/erts-*/doc | |
155 | %{_libdir}/%{name}/erts-*/man | |
156 | %{_libdir}/%{name}/erts-*/src | |
43071f9a JK |
157 | %{_libdir}/%{name}/erts-*/include |
158 | #%{_libdir}/%{name}/erts-*/*.ear | |
c6ed8a25 JK |
159 | %dir %{_libdir}/%{name}/erts-*/bin |
160 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam* | |
161 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child* | |
5482576a | 162 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer |
75067de0 | 163 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dyn_erl |
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 |