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