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