]> git.pld-linux.org Git - packages/erlang.git/blame_incremental - erlang.spec
- up to R14B01; replace strcpy with memcpy because fortify source won't allow to...
[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
17# A - unstable, B - stable line, keep stable
18Version: R14B01
19Release: 1
20Epoch: 1
21%define _version %(echo %{version} | tr _ -)
22License: distributable
23Group: Development/Languages
24Source0: http://www.erlang.org/download/otp_src_%{_version}.tar.gz
25# Source0-md5: ce595447571128bc66f630a8fa13339a
26Source1: http://www.erlang.org/download/otp_doc_man_%{_version}.tar.gz
27# Source1-md5: 55376d3b1994d083cd21c9d849517c6c
28Patch0: %{name}-fPIC.patch
29Patch1: %{name}-tinfo.patch
30Patch2: %{name}-link.patch
31Patch3: %{name}-fortify.patch
32URL: http://www.erlang.org/
33%{?with_java:BuildRequires: /usr/bin/jar}
34BuildRequires: xorg-lib-libX11-devel
35BuildRequires: autoconf
36BuildRequires: automake
37BuildRequires: flex
38%{?with_java:BuildRequires: jdk >= 1.2}
39BuildRequires: ncurses-devel
40BuildRequires: openssl-devel >= 0.9.7
41BuildRequires: openssl-tools
42BuildRequires: perl-base
43%if %{with odbc}
44BuildRequires: unixODBC-devel
45%else
46BuildConflicts: unixODBC-devel
47%endif
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50%define _erl_target %(echo %{_build}-gnu | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/')
51
52%description
53Erlang is a programming language designed at the Ericsson Computer
54Science Laboratory. Open-source Erlang is being released to help
55encourage the spread of Erlang outside Ericsson.
56
57%description -l pl.UTF-8
58Erlang to język programowania opracowany w Ericsson Computer Science
59Laboratory. Open-source Erlang został wydany, aby pomóc w
60rozpowszechnianiu Erlanga poza Ericssonem.
61
62%prep
63%setup -q -n otp_src_%{_version}
64%{__tar} xzf %{SOURCE1} man/ COPYRIGHT
65#%patch0 -p1
66%patch1 -p1
67%patch2 -p1
68%patch3 -p1
69
70%build
71find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub
72curd=$(pwd)
73for i in $(find . -type f -name configure.in); do
74 cd $(dirname $i)
75 %{__autoconf}
76 cd $curd
77done
78%configure \
79%ifarch sparc
80 CFLAGS="%{rpmcflags} -mv8plus" \
81%endif
82 --with%{!?with_java:out}-javac
83rm -f lib/ssl/SKIP
84ERL_TOP=`pwd`; export ERL_TOP
85 %{__make} -j1 \
86 TARGET="%{_erl_target}" \
87 || { find . -name erl_crash.dump | xargs cat ; exit 1 ; }
88
89%install
90rm -rf $RPM_BUILD_ROOT
91
92%{__make} -j1 install \
93 TARGET="%{_erl_target}" \
94 INSTALL_PREFIX=$RPM_BUILD_ROOT
95
96rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/*.html
97
98sed -i -e"s#$RPM_BUILD_ROOT##" \
99 $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl}
100
101for l in erl erlc escript dialyzer epmd run_erl to_erl typer; do
102 ln -sf %{_libdir}/%{name}/bin/$l $RPM_BUILD_ROOT%{_bindir}
103done
104ERTSDIR=`echo $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-* | sed -e"s#^$RPM_BUILD_ROOT##"`
105for l in epmd ; do
106 ln -sf $ERTSDIR/bin/$l $RPM_BUILD_ROOT%{_bindir}
107done
108ln -sf $ERTSDIR/bin/epmd $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
109
110cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name}
111find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9
112
113# some files in the library need +x, so we build the list here
114echo "%%defattr(644,root,root,755)" > lib.list
115find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \
116 | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list
117find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \
118 | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_libdir}/%%{name}/#" >> lib.list
119find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \
120 | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list
121
122rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib
123rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal
124
125%clean
126rm -rf $RPM_BUILD_ROOT
127
128%files -f lib.list
129%defattr(644,root,root,755)
130%doc AUTHORS EPLICENCE COPYRIGHT
131%attr(755,root,root) %{_bindir}/*
132%dir %{_libdir}/erlang
133%dir %{_libdir}/%{name}/bin
134%attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer
135%attr(755,root,root) %{_libdir}/%{name}/bin/epmd
136%attr(755,root,root) %{_libdir}/%{name}/bin/erl
137%attr(755,root,root) %{_libdir}/%{name}/bin/erlc
138%attr(755,root,root) %{_libdir}/%{name}/bin/escript
139%attr(755,root,root) %{_libdir}/%{name}/bin/run_erl
140%attr(755,root,root) %{_libdir}/%{name}/bin/start
141%attr(755,root,root) %{_libdir}/%{name}/bin/start_erl
142%attr(755,root,root) %{_libdir}/%{name}/bin/to_erl
143%attr(755,root,root) %{_libdir}/%{name}/bin/typer
144%{_libdir}/%{name}/bin/start*.*
145%dir %{_libdir}/%{name}/erts-*
146%{_libdir}/%{name}/erts-*/doc
147%{_libdir}/%{name}/erts-*/man
148%{_libdir}/%{name}/erts-*/src
149%{_libdir}/%{name}/erts-*/include
150#%{_libdir}/%{name}/erts-*/*.ear
151%dir %{_libdir}/%{name}/erts-*/bin
152%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
153%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child*
154%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer
155%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dyn_erl
156%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/e*
157%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/heart*
158%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/inet_gethost
159%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/run_erl
160%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/start
161%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/to_erl
162%attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/typer
163%{_libdir}/%{name}/erts-*/bin/start*.*
164# (file list dynamically generated) %{_libdir}/%{name}/lib
165%dir %{_libdir}/%{name}/misc
166%attr(755,root,root) %{_libdir}/%{name}/misc/*
167%{_libdir}/%{name}/releases
168%{_libdir}/%{name}/usr
169%doc %{_libdir}/%{name}/man
170%attr(755,root,root) %{_libdir}/%{name}/Install
This page took 0.0352710000000001 seconds and 4 git commands to generate.