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