]>
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 |
862a8417 AM |
17 | Version: 21.3.8.6 |
18 | Release: 1 | |
e6c74a08 | 19 | Epoch: 2 |
9a059664 | 20 | %define _version %(echo %{version} | tr _ -) |
f3cae02e | 21 | License: APLv2 |
c7068bd4 | 22 | Group: Development/Languages |
862a8417 AM |
23 | Source0: https://github.com/erlang/otp/archive/OTP-%{version}.tar.gz |
24 | # Source0-md5: a5fbab93f78c4db98ecc11ce75f67ac4 | |
3921da30 AM |
25 | Source2: epmd.service |
26 | Source3: epmd.socket | |
27 | Source4: epmd@.service | |
28 | Source5: epmd@.socket | |
d6d0a605 | 29 | Patch0: %{name}-fPIC.patch |
83a5839d | 30 | Patch1: x32.patch |
c7068bd4 | 31 | URL: http://www.erlang.org/ |
9a059664 | 32 | %{?with_java:BuildRequires: /usr/bin/jar} |
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 |
3921da30 | 41 | BuildRequires: xorg-lib-libX11-devel |
38af531e | 42 | %if %{with odbc} |
9a059664 | 43 | BuildRequires: unixODBC-devel |
38af531e | 44 | %else |
9a059664 | 45 | BuildConflicts: unixODBC-devel |
38af531e | 46 | %endif |
3921da30 AM |
47 | Requires: systemd-units >= 38 |
48 | Requires(post,preun,postun): systemd-units >= 38 | |
c7068bd4 | 49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9a059664 | 50 | |
83a5839d | 51 | %define _erl_target %(echo %{_build}%{?_gnu} | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/;s/x32/x86_64/') |
c7068bd4 JK |
52 | |
53 | %description | |
54 | Erlang is a programming language designed at the Ericsson Computer | |
55 | Science Laboratory. Open-source Erlang is being released to help | |
56 | encourage the spread of Erlang outside Ericsson. | |
5c54a479 | 57 | |
9ac92939 JR |
58 | %description -l pl.UTF-8 |
59 | Erlang to język programowania opracowany w Ericsson Computer Science | |
60 | Laboratory. Open-source Erlang został wydany, aby pomóc w | |
5c54a479 JB |
61 | rozpowszechnianiu Erlanga poza Ericssonem. |
62 | ||
c7068bd4 | 63 | %prep |
862a8417 | 64 | %setup -q -n otp-OTP-%{_version} |
43071f9a | 65 | #%patch0 -p1 |
83a5839d | 66 | %patch1 -p1 |
c7068bd4 JK |
67 | |
68 | %build | |
862a8417 AM |
69 | ./otp_build autoconf |
70 | ||
3bb4a699 | 71 | %configure \ |
1485134d | 72 | %ifarch sparc |
73 | CFLAGS="%{rpmcflags} -mv8plus" \ | |
83a5839d AM |
74 | %endif |
75 | %ifarch x32 | |
76 | --disable-hipe \ | |
1485134d | 77 | %endif |
3921da30 AM |
78 | --disable-silent-rules \ |
79 | --enable-smp-support \ | |
1907c92f | 80 | --with-javac%{!?with_java:=no} |
a952def8 | 81 | rm -f lib/ssl/SKIP |
c7068bd4 | 82 | ERL_TOP=`pwd`; export ERL_TOP |
82844de3 | 83 | %{__make} -j1 \ |
6cba5783 | 84 | TARGET="%{_erl_target}" \ |
8738d875 | 85 | || { find . -name erl_crash.dump | xargs cat ; exit 1 ; } |
c7068bd4 | 86 | |
862a8417 AM |
87 | %{__make} -j1 docs |
88 | ||
c7068bd4 JK |
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 | ||
862a8417 AM |
96 | env ERL_LIBS="$RPM_BUILD_ROOT%{_libdir}/erlang/lib" \ |
97 | %{__make} install-docs \ | |
98 | DESTDIR=$RPM_BUILD_ROOT | |
99 | ||
3921da30 AM |
100 | install -D -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/epmd.service |
101 | install -D -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/epmd.socket | |
102 | install -D -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/epmd@.service | |
103 | install -D -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/epmd@.socket | |
104 | ||
a398297e | 105 | %{__sed} -i -e"s#$RPM_BUILD_ROOT##" \ |
c6ed8a25 | 106 | $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl} |
3685cbd2 | 107 | |
a398297e JB |
108 | %{__sed} -i -e '1s,/usr/bin/env escript,/usr/bin/escript,' \ |
109 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/diameter-*/bin/diameterc \ | |
110 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/erl_docgen-*/priv/bin/{codeline_preprocessing,xml_from_edoc}.escript \ | |
111 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/reltool-*/examples/{display_args,mnesia_core_dump_viewer} \ | |
112 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/snmp-*/bin/snmpc \ | |
113 | $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/snmp-*/src/compiler/snmpc.src | |
114 | ||
862a8417 AM |
115 | #cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name} |
116 | #find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9 | |
c7068bd4 | 117 | |
e043a03d JK |
118 | # some files in the library need +x, so we build the list here |
119 | echo "%%defattr(644,root,root,755)" > lib.list | |
120 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \ | |
a398297e | 121 | | %{__sed} -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list |
e043a03d | 122 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \ |
a398297e | 123 | | %{__sed} -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_libdir}/%%{name}/#" >> lib.list |
e043a03d | 124 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \ |
a398297e | 125 | | %{__sed} -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list |
e043a03d | 126 | |
1907c92f JB |
127 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib |
128 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal | |
43071f9a | 129 | |
c7068bd4 JK |
130 | %clean |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
3921da30 AM |
133 | %post |
134 | %systemd_post epmd.service | |
135 | %systemd_post epmd@.service | |
136 | ||
137 | %preun | |
138 | %systemd_preun epmd.service | |
139 | %systemd_preun epmd@.service | |
140 | ||
141 | %postun | |
142 | %systemd_reload | |
143 | ||
e043a03d | 144 | %files -f lib.list |
c7068bd4 | 145 | %defattr(644,root,root,755) |
862a8417 | 146 | %doc AUTHORS |
1907c92f JB |
147 | %attr(755,root,root) %{_bindir}/ct_run |
148 | %attr(755,root,root) %{_bindir}/dialyzer | |
149 | %attr(755,root,root) %{_bindir}/epmd | |
150 | %attr(755,root,root) %{_bindir}/erl | |
151 | %attr(755,root,root) %{_bindir}/erlc | |
152 | %attr(755,root,root) %{_bindir}/escript | |
153 | %attr(755,root,root) %{_bindir}/run_erl | |
1907c92f | 154 | %attr(755,root,root) %{_bindir}/to_erl |
391c9c83 | 155 | %attr(755,root,root) %{_bindir}/typer |
3685cbd2 | 156 | %dir %{_libdir}/erlang |
c6ed8a25 | 157 | %dir %{_libdir}/%{name}/bin |
065a0167 | 158 | %attr(755,root,root) %{_libdir}/%{name}/bin/ct_run |
5482576a | 159 | %attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer |
c6ed8a25 JK |
160 | %attr(755,root,root) %{_libdir}/%{name}/bin/epmd |
161 | %attr(755,root,root) %{_libdir}/%{name}/bin/erl | |
162 | %attr(755,root,root) %{_libdir}/%{name}/bin/erlc | |
82844de3 | 163 | %attr(755,root,root) %{_libdir}/%{name}/bin/escript |
2d1c147c | 164 | %attr(755,root,root) %{_libdir}/%{name}/bin/no_dot_erlang.boot |
c6ed8a25 JK |
165 | %attr(755,root,root) %{_libdir}/%{name}/bin/run_erl |
166 | %attr(755,root,root) %{_libdir}/%{name}/bin/start | |
167 | %attr(755,root,root) %{_libdir}/%{name}/bin/start_erl | |
168 | %attr(755,root,root) %{_libdir}/%{name}/bin/to_erl | |
82844de3 | 169 | %attr(755,root,root) %{_libdir}/%{name}/bin/typer |
c6ed8a25 JK |
170 | %{_libdir}/%{name}/bin/start*.* |
171 | %dir %{_libdir}/%{name}/erts-* | |
172 | %{_libdir}/%{name}/erts-*/doc | |
173 | %{_libdir}/%{name}/erts-*/man | |
174 | %{_libdir}/%{name}/erts-*/src | |
43071f9a JK |
175 | %{_libdir}/%{name}/erts-*/include |
176 | #%{_libdir}/%{name}/erts-*/*.ear | |
c6ed8a25 JK |
177 | %dir %{_libdir}/%{name}/erts-*/bin |
178 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam* | |
065a0167 | 179 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/ct_run |
5482576a | 180 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer |
75067de0 | 181 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dyn_erl |
c6ed8a25 JK |
182 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/e* |
183 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/heart* | |
184 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/inet_gethost | |
185 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/run_erl | |
186 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/start | |
187 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/to_erl | |
49d2322c | 188 | %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/typer |
c6ed8a25 | 189 | %{_libdir}/%{name}/erts-*/bin/start*.* |
e043a03d | 190 | # (file list dynamically generated) %{_libdir}/%{name}/lib |
c6ed8a25 JK |
191 | %dir %{_libdir}/%{name}/misc |
192 | %attr(755,root,root) %{_libdir}/%{name}/misc/* | |
193 | %{_libdir}/%{name}/releases | |
194 | %{_libdir}/%{name}/usr | |
195 | %doc %{_libdir}/%{name}/man | |
196 | %attr(755,root,root) %{_libdir}/%{name}/Install | |
3921da30 AM |
197 | |
198 | %{systemdunitdir}/epmd.service | |
199 | %{systemdunitdir}/epmd.socket | |
200 | %{systemdunitdir}/epmd@.service | |
201 | %{systemdunitdir}/epmd@.socket |