]> git.pld-linux.org Git - packages/erlang.git/blob - erlang.spec
- oops, docs weren't updated - sorry :(
[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 #
5 # Conditional build:
6 %bcond_with     java            # with Java support
7 %bcond_without  odbc            # without unixODBC support
8 #
9 Summary:        OpenSource Erlang/OTP
10 Summary(pl):    Erlang/OTP z otwartymi ¼ród³ami
11 Name:           erlang
12 Version:        R10B_10
13 Release:        1
14 Epoch:          1
15 %define         _version        %(echo %{version} | tr _ -)
16 License:        distributable
17 Group:          Development/Languages
18 Source0:        http://www.erlang.org/download/otp_src_%{_version}.tar.gz
19 # Source0-md5:  c1405c885f07d661b7362b822d571586
20 Source1:        http://www.erlang.org/download/otp_doc_man_R10B-10.tar.gz
21 # Source1-md5:  207e00bcaf5a9428bd86e3973f9b699f
22 Patch0:         %{name}-fPIC.patch
23 Patch1:         %{name}-optional_java.patch
24 Patch2:         %{name}-hipe_optimistic_regalloc_once_only.patch
25 URL:            http://www.erlang.org/
26 %{?with_java:BuildRequires:     /usr/bin/jar}
27 BuildRequires:  XFree86-devel
28 BuildRequires:  autoconf
29 BuildRequires:  automake
30 BuildRequires:  flex
31 %{?with_java:BuildRequires:     jdk >= 1.2}
32 BuildRequires:  ncurses-devel
33 BuildRequires:  openssl-devel >= 0.9.7
34 Buildrequires:  openssl-tools
35 BuildRequires:  perl-base
36 %if %{with odbc}
37 BuildRequires:  unixODBC-devel
38 %else
39 BuildConflicts: unixODBC-devel
40 %endif
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define _erl_target %(echo %{_build} | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/')
44
45 %description
46 Erlang is a programming language designed at the Ericsson Computer
47 Science Laboratory. Open-source Erlang is being released to help
48 encourage the spread of Erlang outside Ericsson.
49
50 %description -l pl
51 Erlang to jêzyk programowania opracowany w Ericsson Computer Science
52 Laboratory. Open-source Erlang zosta³ wydany, aby pomóc w
53 rozpowszechnianiu Erlanga poza Ericssonem.
54
55 %prep
56 %setup -q -n otp_src_%{_version}
57 %{__tar} xzf %{SOURCE1} man/ COPYRIGHT
58 #%patch0 -p1
59 %patch1 -p1
60 %patch2 -p1
61
62 %build
63 find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub
64 %{__autoconf}
65 cd lib
66 %{__autoconf}
67 cd erl_interface
68 %{__autoconf}
69 cd ../gs
70 %{__autoconf}
71 cd ../megaco
72 %{__autoconf}
73 cd ../odbc
74 %{__autoconf}
75 cd ../snmp
76 %{__autoconf}
77 cd ../../erts/
78 %{__autoconf}
79 cd ..
80 %configure \
81         --with%{!?with_java:out}-java
82 ERL_TOP=`pwd`; export ERL_TOP
83 LD_ASSUME_KERNEL=2.4.19 %{__make} \
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} 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 ; 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 ear ecc elink escript ; 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/internal
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 README COPYRIGHT
129 %attr(755,root,root) %{_bindir}/*
130 %dir %{_libdir}/erlang
131 %dir %{_libdir}/%{name}/bin
132 %attr(755,root,root) %{_libdir}/%{name}/bin/epmd
133 %attr(755,root,root) %{_libdir}/%{name}/bin/erl
134 %attr(755,root,root) %{_libdir}/%{name}/bin/erlc
135 %attr(755,root,root) %{_libdir}/%{name}/bin/run_erl
136 %attr(755,root,root) %{_libdir}/%{name}/bin/start
137 %attr(755,root,root) %{_libdir}/%{name}/bin/start_erl
138 %attr(755,root,root) %{_libdir}/%{name}/bin/to_erl
139 %{_libdir}/%{name}/bin/start*.*
140 %dir %{_libdir}/%{name}/erts-*
141 %{_libdir}/%{name}/erts-*/doc
142 %{_libdir}/%{name}/erts-*/man
143 %{_libdir}/%{name}/erts-*/src
144 %{_libdir}/%{name}/erts-*/include
145 #%{_libdir}/%{name}/erts-*/*.ear
146 %dir %{_libdir}/%{name}/erts-*/bin
147 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
148 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child*
149 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/e*
150 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/heart*
151 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/inet_gethost
152 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/run_erl
153 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/start
154 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/to_erl
155 %{_libdir}/%{name}/erts-*/bin/start*.*
156 # (file list dynamically generated) %{_libdir}/%{name}/lib
157 %dir %{_libdir}/%{name}/misc
158 %attr(755,root,root) %{_libdir}/%{name}/misc/*
159 %{_libdir}/%{name}/releases
160 %{_libdir}/%{name}/usr
161 %doc %{_libdir}/%{name}/man
162 %attr(755,root,root) %{_libdir}/%{name}/Install
This page took 0.068769 seconds and 3 git commands to generate.