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