]>
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 | # |
63c8129b | 14 | |
9758a21d | 15 | %define erts_version 13.1.2 |
63c8129b | 16 | |
c7068bd4 | 17 | Summary: OpenSource Erlang/OTP |
285f449f | 18 | Summary(pl.UTF-8): Erlang/OTP z otwartymi źródłami |
c6ed8a25 | 19 | Name: erlang |
9758a21d AM |
20 | Version: 25.1.2 |
21 | Release: 1 | |
e6c74a08 | 22 | Epoch: 2 |
9a059664 | 23 | %define _version %(echo %{version} | tr _ -) |
f3cae02e | 24 | License: APLv2 |
c7068bd4 | 25 | Group: Development/Languages |
862a8417 | 26 | Source0: https://github.com/erlang/otp/archive/OTP-%{version}.tar.gz |
9758a21d | 27 | # Source0-md5: ac654a239f8e9c3514b183c657bca4bf |
3921da30 AM |
28 | Source2: epmd.service |
29 | Source3: epmd.socket | |
30 | Source4: epmd@.service | |
31 | Source5: epmd@.socket | |
d6d0a605 | 32 | Patch0: %{name}-fPIC.patch |
83a5839d | 33 | Patch1: x32.patch |
6f79b258 JB |
34 | # disable pdf docs (require libxslt-progs and fop > 1.0, with -cache option) |
35 | Patch2: %{name}-no-fop.patch | |
9758a21d | 36 | |
4cae44a6 | 37 | Patch4: %{name}-ac.patch |
c7068bd4 | 38 | URL: http://www.erlang.org/ |
9a059664 | 39 | %{?with_java:BuildRequires: /usr/bin/jar} |
4cae44a6 | 40 | BuildRequires: autoconf >= 2.69 |
d6d0a605 | 41 | BuildRequires: automake |
5c54a479 | 42 | BuildRequires: flex |
9a059664 | 43 | %{?with_java:BuildRequires: jdk >= 1.2} |
e6190289 | 44 | BuildRequires: ncurses-devel |
52fa868e | 45 | BuildRequires: openssl-devel >= 0.9.7 |
be00b460 | 46 | BuildRequires: openssl-tools |
5c54a479 | 47 | BuildRequires: perl-base |
d43136e6 | 48 | BuildRequires: rpm-build >= 4.6 |
12cd9099 | 49 | BuildRequires: rpmbuild(macros) >= 1.752 |
3921da30 | 50 | BuildRequires: xorg-lib-libX11-devel |
38af531e | 51 | %if %{with odbc} |
9a059664 | 52 | BuildRequires: unixODBC-devel |
38af531e | 53 | %else |
9a059664 | 54 | BuildConflicts: unixODBC-devel |
38af531e | 55 | %endif |
3921da30 AM |
56 | Requires: systemd-units >= 38 |
57 | Requires(post,preun,postun): systemd-units >= 38 | |
c7068bd4 | 58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9a059664 | 59 | |
83a5839d | 60 | %define _erl_target %(echo %{_build}%{?_gnu} | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/;s/x32/x86_64/') |
c7068bd4 JK |
61 | |
62 | %description | |
63 | Erlang is a programming language designed at the Ericsson Computer | |
64 | Science Laboratory. Open-source Erlang is being released to help | |
65 | encourage the spread of Erlang outside Ericsson. | |
5c54a479 | 66 | |
9ac92939 JR |
67 | %description -l pl.UTF-8 |
68 | Erlang to język programowania opracowany w Ericsson Computer Science | |
69 | Laboratory. Open-source Erlang został wydany, aby pomóc w | |
5c54a479 JB |
70 | rozpowszechnianiu Erlanga poza Ericssonem. |
71 | ||
12cd9099 JB |
72 | %package doc |
73 | Summary: Erlang documentation | |
74 | Summary(pl.UTF-8): Dokumentacja do Erlanga | |
75 | Group: Documentation | |
9cba35e9 | 76 | Requires: %{name} = %{epoch}:%{version}-%{release} |
aa893b76 | 77 | BuildArch: noarch |
12cd9099 JB |
78 | |
79 | %description doc | |
80 | Erlang documentation. | |
81 | ||
82 | %description doc -l pl.UTF-8 | |
83 | Dokumentacja do Erlanga. | |
84 | ||
c7068bd4 | 85 | %prep |
862a8417 | 86 | %setup -q -n otp-OTP-%{_version} |
43071f9a | 87 | #%patch0 -p1 |
83a5839d | 88 | %patch1 -p1 |
6f79b258 | 89 | %patch2 -p1 |
9758a21d | 90 | |
4cae44a6 | 91 | %patch4 -p1 |
c7068bd4 JK |
92 | |
93 | %build | |
4cae44a6 | 94 | ./otp_build update_configure --no-commit |
862a8417 | 95 | |
3bb4a699 | 96 | %configure \ |
1485134d | 97 | %ifarch sparc |
98 | CFLAGS="%{rpmcflags} -mv8plus" \ | |
83a5839d AM |
99 | %endif |
100 | %ifarch x32 | |
101 | --disable-hipe \ | |
1485134d | 102 | %endif |
3921da30 AM |
103 | --disable-silent-rules \ |
104 | --enable-smp-support \ | |
923bfddf AM |
105 | --with-javac%{!?with_java:=no} \ |
106 | --with-ssl-lib-subdir=%{_lib} | |
107 | ||
a952def8 | 108 | rm -f lib/ssl/SKIP |
c7068bd4 | 109 | ERL_TOP=`pwd`; export ERL_TOP |
82844de3 | 110 | %{__make} -j1 \ |
6cba5783 | 111 | TARGET="%{_erl_target}" \ |
8738d875 | 112 | || { find . -name erl_crash.dump | xargs cat ; exit 1 ; } |
c7068bd4 | 113 | |
862a8417 AM |
114 | %{__make} -j1 docs |
115 | ||
c7068bd4 JK |
116 | %install |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
64f81501 | 119 | %{__make} -j1 install \ |
e043a03d | 120 | TARGET="%{_erl_target}" \ |
3685cbd2 JK |
121 | INSTALL_PREFIX=$RPM_BUILD_ROOT |
122 | ||
862a8417 AM |
123 | env ERL_LIBS="$RPM_BUILD_ROOT%{_libdir}/erlang/lib" \ |
124 | %{__make} install-docs \ | |
125 | DESTDIR=$RPM_BUILD_ROOT | |
126 | ||
3921da30 AM |
127 | install -D -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/epmd.service |
128 | install -D -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/epmd.socket | |
129 | install -D -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/epmd@.service | |
130 | install -D -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/epmd@.socket | |
131 | ||
a398297e | 132 | %{__sed} -i -e"s#$RPM_BUILD_ROOT##" \ |
c6ed8a25 | 133 | $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl} |
3685cbd2 | 134 | |
a398297e JB |
135 | %{__sed} -i -e '1s,/usr/bin/env escript,/usr/bin/escript,' \ |
136 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/diameter-*/bin/diameterc \ | |
f4803c5f | 137 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/edoc-*/bin/edoc \ |
a398297e JB |
138 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/erl_docgen-*/priv/bin/{codeline_preprocessing,xml_from_edoc}.escript \ |
139 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/reltool-*/examples/{display_args,mnesia_core_dump_viewer} \ | |
140 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/snmp-*/bin/snmpc \ | |
141 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/snmp-*/src/compiler/snmpc.src | |
142 | ||
862a8417 AM |
143 | #cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name} |
144 | #find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9 | |
c7068bd4 | 145 | |
e043a03d JK |
146 | # some files in the library need +x, so we build the list here |
147 | echo "%%defattr(644,root,root,755)" > lib.list | |
148 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \ | |
a398297e | 149 | | %{__sed} -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list |
e043a03d | 150 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \ |
a398297e | 151 | | %{__sed} -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_libdir}/%%{name}/#" >> lib.list |
e043a03d | 152 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \ |
a398297e | 153 | | %{__sed} -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list |
e043a03d | 154 | |
63c8129b JR |
155 | # Move noarch docs to _datadir |
156 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/erts-%{erts_version} | |
157 | %{__mv} $RPM_BUILD_ROOT{%{_libdir},%{_datadir}}/%{name}/doc | |
158 | %{__ln} -s %{_datadir}/%{name}/doc $RPM_BUILD_ROOT%{_libdir}/%{name}/doc | |
159 | %{__mv} $RPM_BUILD_ROOT{%{_libdir},%{_datadir}}/%{name}/erts-%{erts_version}/doc | |
160 | %{__ln} -s %{_datadir}/%{name}/erts-%{erts_version}/doc $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-%{erts_version}/doc | |
43071f9a | 161 | |
c7068bd4 JK |
162 | %clean |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
3921da30 AM |
165 | %post |
166 | %systemd_post epmd.service | |
167 | %systemd_post epmd@.service | |
168 | ||
169 | %preun | |
170 | %systemd_preun epmd.service | |
171 | %systemd_preun epmd@.service | |
172 | ||
173 | %postun | |
174 | %systemd_reload | |
175 | ||
e043a03d | 176 | %files -f lib.list |
c7068bd4 | 177 | %defattr(644,root,root,755) |
862a8417 | 178 | %doc AUTHORS |
1907c92f JB |
179 | %attr(755,root,root) %{_bindir}/ct_run |
180 | %attr(755,root,root) %{_bindir}/dialyzer | |
181 | %attr(755,root,root) %{_bindir}/epmd | |
182 | %attr(755,root,root) %{_bindir}/erl | |
183 | %attr(755,root,root) %{_bindir}/erlc | |
184 | %attr(755,root,root) %{_bindir}/escript | |
185 | %attr(755,root,root) %{_bindir}/run_erl | |
1907c92f | 186 | %attr(755,root,root) %{_bindir}/to_erl |
391c9c83 | 187 | %attr(755,root,root) %{_bindir}/typer |
3685cbd2 | 188 | %dir %{_libdir}/erlang |
c6ed8a25 | 189 | %dir %{_libdir}/%{name}/bin |
065a0167 | 190 | %attr(755,root,root) %{_libdir}/%{name}/bin/ct_run |
5482576a | 191 | %attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer |
c6ed8a25 JK |
192 | %attr(755,root,root) %{_libdir}/%{name}/bin/epmd |
193 | %attr(755,root,root) %{_libdir}/%{name}/bin/erl | |
f4803c5f | 194 | %attr(755,root,root) %{_libdir}/%{name}/bin/erl_call |
c6ed8a25 | 195 | %attr(755,root,root) %{_libdir}/%{name}/bin/erlc |
82844de3 | 196 | %attr(755,root,root) %{_libdir}/%{name}/bin/escript |
2d1c147c | 197 | %attr(755,root,root) %{_libdir}/%{name}/bin/no_dot_erlang.boot |
c6ed8a25 JK |
198 | %attr(755,root,root) %{_libdir}/%{name}/bin/run_erl |
199 | %attr(755,root,root) %{_libdir}/%{name}/bin/start | |
200 | %attr(755,root,root) %{_libdir}/%{name}/bin/start_erl | |
201 | %attr(755,root,root) %{_libdir}/%{name}/bin/to_erl | |
82844de3 | 202 | %attr(755,root,root) %{_libdir}/%{name}/bin/typer |
c6ed8a25 | 203 | %{_libdir}/%{name}/bin/start*.* |
63c8129b | 204 | %dir %{_libdir}/%{name}/erts-%{erts_version} |
4cae44a6 | 205 | %{_libdir}/%{name}/erts-%{erts_version}/info |
63c8129b JR |
206 | %{_libdir}/%{name}/erts-%{erts_version}/man |
207 | %{_libdir}/%{name}/erts-%{erts_version}/src | |
208 | %{_libdir}/%{name}/erts-%{erts_version}/include | |
4cae44a6 | 209 | %dir %{_libdir}/%{name}/erts-%{erts_version}/lib |
4cae44a6 JB |
210 | %dir %{_libdir}/%{name}/erts-%{erts_version}/lib/internal |
211 | %{_libdir}/%{name}/erts-%{erts_version}/lib/internal/liberts_internal*.a | |
212 | %{_libdir}/%{name}/erts-%{erts_version}/lib/internal/libethread.a | |
63c8129b JR |
213 | #%{_libdir}/%{name}/erts-%{erts_version}/*.ear |
214 | %dir %{_libdir}/%{name}/erts-%{erts_version}/bin | |
215 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/beam* | |
216 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/ct_run | |
217 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/dialyzer | |
218 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/dyn_erl | |
219 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/e* | |
220 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/heart* | |
221 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/inet_gethost | |
222 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/run_erl | |
223 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/start | |
224 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/to_erl | |
225 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/typer | |
f4803c5f | 226 | %attr(755,root,root) %{_libdir}/%{name}/erts-%{erts_version}/bin/yielding_c_fun |
63c8129b | 227 | %{_libdir}/%{name}/erts-%{erts_version}/bin/start*.* |
e043a03d | 228 | # (file list dynamically generated) %{_libdir}/%{name}/lib |
c6ed8a25 JK |
229 | %dir %{_libdir}/%{name}/misc |
230 | %attr(755,root,root) %{_libdir}/%{name}/misc/* | |
231 | %{_libdir}/%{name}/releases | |
232 | %{_libdir}/%{name}/usr | |
233 | %doc %{_libdir}/%{name}/man | |
234 | %attr(755,root,root) %{_libdir}/%{name}/Install | |
3921da30 | 235 | |
63c8129b JR |
236 | %{_libdir}/%{name}/doc |
237 | %{_libdir}/%{name}/erts-%{erts_version}/doc | |
238 | ||
3921da30 AM |
239 | %{systemdunitdir}/epmd.service |
240 | %{systemdunitdir}/epmd.socket | |
241 | %{systemdunitdir}/epmd@.service | |
242 | %{systemdunitdir}/epmd@.socket | |
12cd9099 JB |
243 | |
244 | %files doc | |
245 | %defattr(644,root,root,755) | |
63c8129b | 246 | %dir %{_datadir}/%{name} |
8ef9e63a | 247 | %dir %{_datadir}/%{name}/erts-%{erts_version} |
63c8129b JR |
248 | %{_datadir}/%{name}/doc |
249 | %{_datadir}/%{name}/erts-%{erts_version}/doc |