]> git.pld-linux.org Git - packages/erlang.git/blame_incremental - erlang.spec
Up to 25.1.2.
[packages/erlang.git] / erlang.spec
... / ...
CommitLineData
1# NOTE: Building requires working DNS setup. Build may hang
2# even if _only_ first dns specified in resolv.conf
3# is unreachable.
4# TODO
5# - separate -devel (at least header files!)
6# - modularize (odbc, etc)
7# - manuals to %{_mandir}
8# - investigate fPIC.patch
9#
10# Conditional build:
11%bcond_with java # with Java support
12%bcond_without odbc # without unixODBC support
13#
14Summary: OpenSource Erlang/OTP
15Summary(pl.UTF-8): Erlang/OTP z otwartymi źródłami
16Name: erlang
17Version: 20.3
18Release: 2
19Epoch: 2
20%define _version %(echo %{version} | tr _ -)
21License: APLv2
22Group: Development/Languages
23Source0: http://www.erlang.org/download/otp_src_%{_version}.tar.gz
24# Source0-md5: a683c8c0aacfe0305c4bf47b3abfde6a
25Source1: http://www.erlang.org/download/otp_doc_man_%{_version}.tar.gz
26# Source1-md5: 9cce536d5b60d56834c90740d5259c23
27Source2: epmd.service
28Source3: epmd.socket
29Source4: epmd@.service
30Source5: epmd@.socket
31Patch0: %{name}-fPIC.patch
32URL: http://www.erlang.org/
33%{?with_java:BuildRequires: /usr/bin/jar}
34BuildRequires: autoconf
35BuildRequires: automake
36BuildRequires: flex
37%{?with_java:BuildRequires: jdk >= 1.2}
38BuildRequires: ncurses-devel
39BuildRequires: openssl-devel >= 0.9.7
40BuildRequires: openssl-tools
41BuildRequires: perl-base
42BuildRequires: xorg-lib-libX11-devel
43%if %{with odbc}
44BuildRequires: unixODBC-devel
45%else
46BuildConflicts: unixODBC-devel
47%endif
48Requires: systemd-units >= 38
49Requires(post,preun,postun): systemd-units >= 38
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%define _erl_target %(echo %{_build}-gnu | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/')
53
54%description
55Erlang is a programming language designed at the Ericsson Computer
56Science Laboratory. Open-source Erlang is being released to help
57encourage the spread of Erlang outside Ericsson.
58
59%description -l pl.UTF-8
60Erlang to język programowania opracowany w Ericsson Computer Science
61Laboratory. Open-source Erlang został wydany, aby pomóc w
62rozpowszechnianiu Erlanga poza Ericssonem.
63
64%prep
65%setup -q -n otp_src_%{_version}
66%{__tar} xzf %{SOURCE1} man/ COPYRIGHT
67#%patch0 -p1
68
69%build
70find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub
71curd=$(pwd)
72for i in $(find . -type f -name configure.in); do
73 cd $(dirname $i)
74 %{__autoconf}
75 cd $curd
76done
77%configure \
78%ifarch sparc
79 CFLAGS="%{rpmcflags} -mv8plus" \
80%endif
81 --disable-silent-rules \
82 --enable-smp-support \
83 --with-javac%{!?with_java:=no}
84rm -f lib/ssl/SKIP
85ERL_TOP=`pwd`; export ERL_TOP
86 %{__make} -j1 \
87 TARGET="%{_erl_target}" \
88 || { find . -name erl_crash.dump | xargs cat ; exit 1 ; }
89
90%install
91rm -rf $RPM_BUILD_ROOT
92
93%{__make} -j1 install \
94 TARGET="%{_erl_target}" \
95 INSTALL_PREFIX=$RPM_BUILD_ROOT
96
97install -D -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/epmd.service
98install -D -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/epmd.socket
99install -D -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/epmd@.service
100install -D -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/epmd@.socket
101
102sed -i -e"s#$RPM_BUILD_ROOT##" \
103 $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl}
104
105cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name}
106find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9
107
108# some files in the library need +x, so we build the list here
109echo "%%defattr(644,root,root,755)" > lib.list
110find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \
111 | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list
112find $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
114find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \
115 | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list
116
117%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib
118%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
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
134%files -f lib.list
135%defattr(644,root,root,755)
136%doc AUTHORS COPYRIGHT
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
144%attr(755,root,root) %{_bindir}/to_erl
145%dir %{_libdir}/erlang
146%dir %{_libdir}/%{name}/bin
147%attr(755,root,root) %{_libdir}/%{name}/bin/ct_run
148%attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer
149%attr(755,root,root) %{_libdir}/%{name}/bin/epmd
150%attr(755,root,root) %{_libdir}/%{name}/bin/erl
151%attr(755,root,root) %{_libdir}/%{name}/bin/erlc
152%attr(755,root,root) %{_libdir}/%{name}/bin/escript
153%attr(755,root,root) %{_libdir}/%{name}/bin/no_dot_erlang.boot
154%attr(755,root,root) %{_libdir}/%{name}/bin/run_erl
155%attr(755,root,root) %{_libdir}/%{name}/bin/start
156%attr(755,root,root) %{_libdir}/%{name}/bin/start_erl
157%attr(755,root,root) %{_libdir}/%{name}/bin/to_erl
158%attr(755,root,root) %{_libdir}/%{name}/bin/typer
159%{_libdir}/%{name}/bin/start*.*
160%dir %{_libdir}/%{name}/erts-*
161%{_libdir}/%{name}/erts-*/doc
162%{_libdir}/%{name}/erts-*/man
163%{_libdir}/%{name}/erts-*/src
164%{_libdir}/%{name}/erts-*/include
165#%{_libdir}/%{name}/erts-*/*.ear
166%dir %{_libdir}/%{name}/erts-*/bin
167%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
168%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/ct_run
169%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer
170%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dyn_erl
171%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/e*
172%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/heart*
173%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/inet_gethost
174%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/run_erl
175%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/start
176%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/to_erl
177%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/typer
178%{_libdir}/%{name}/erts-*/bin/start*.*
179# (file list dynamically generated) %{_libdir}/%{name}/lib
180%dir %{_libdir}/%{name}/misc
181%attr(755,root,root) %{_libdir}/%{name}/misc/*
182%{_libdir}/%{name}/releases
183%{_libdir}/%{name}/usr
184%doc %{_libdir}/%{name}/man
185%attr(755,root,root) %{_libdir}/%{name}/Install
186
187%{systemdunitdir}/epmd.service
188%{systemdunitdir}/epmd.socket
189%{systemdunitdir}/epmd@.service
190%{systemdunitdir}/epmd@.socket
This page took 0.034899 seconds and 4 git commands to generate.