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