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