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