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