]> git.pld-linux.org Git - packages/erlang.git/blob - erlang.spec
- up to R11B_1
[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 #
9 # Conditional build:
10 %bcond_with     java            # with Java support
11 %bcond_without  odbc            # without unixODBC support
12 #
13 Summary:        OpenSource Erlang/OTP
14 Summary(pl):    Erlang/OTP z otwartymi ¼ród³ami
15 Name:           erlang
16 Version:        R11B_1
17 Release:        1
18 Epoch:          1
19 %define         _version        %(echo %{version} | tr _ -)
20 License:        distributable
21 Group:          Development/Languages
22 Source0:        http://www.erlang.org/download/otp_src_%{_version}.tar.gz
23 # Source0-md5:  1fe3707d9bed898bc51444cb529fdd79
24 Source1:        http://www.erlang.org/download/otp_doc_man_R11B-1.tar.gz
25 # Source1-md5:  dbd2d3da878fed7474b7a9aa03e13c7d
26 Patch0:         %{name}-fPIC.patch
27 Patch1:         %{name}-optional_java.patch
28 Patch2:         %{name}-hipe_optimistic_regalloc_once_only.patch
29 Patch3:         %{name}-tinfo.patch
30 URL:            http://www.erlang.org/
31 %{?with_java:BuildRequires:     /usr/bin/jar}
32 BuildRequires:  xorg-lib-libX11-devel
33 BuildRequires:  autoconf
34 BuildRequires:  automake
35 BuildRequires:  flex
36 %{?with_java:BuildRequires:     jdk >= 1.2}
37 BuildRequires:  ncurses-devel
38 BuildRequires:  openssl-devel >= 0.9.7
39 Buildrequires:  openssl-tools
40 BuildRequires:  perl-base
41 %if %{with odbc}
42 BuildRequires:  unixODBC-devel
43 %else
44 BuildConflicts: unixODBC-devel
45 %endif
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define _erl_target %(echo %{_build} | sed -e's/amd64/x86_64/;s/athlon/i686/;s/ppc/powerpc/')
49
50 %description
51 Erlang is a programming language designed at the Ericsson Computer
52 Science Laboratory. Open-source Erlang is being released to help
53 encourage the spread of Erlang outside Ericsson.
54
55 %description -l pl
56 Erlang to jêzyk programowania opracowany w Ericsson Computer Science
57 Laboratory. Open-source Erlang zosta³ wydany, aby pomóc w
58 rozpowszechnianiu Erlanga poza Ericssonem.
59
60 %prep
61 %setup -q -n otp_src_%{_version}
62 %{__tar} xzf %{SOURCE1} man/ COPYRIGHT
63 #%patch0 -p1
64 %patch1 -p1
65 %patch2 -p1
66 %patch3 -p1
67
68 %build
69 find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub
70 %{__autoconf}
71 cd lib
72 %{__autoconf}
73 cd erl_interface
74 %{__autoconf}
75 cd ../gs
76 %{__autoconf}
77 cd ../megaco
78 %{__autoconf}
79 cd ../odbc
80 %{__autoconf}
81 cd ../snmp
82 %{__autoconf}
83 cd ../../erts/
84 %{__autoconf}
85 cd ..
86 %configure \
87         --with%{!?with_java:out}-java
88 ERL_TOP=`pwd`; export ERL_TOP
89  %{__make} \
90         TARGET="%{_erl_target}" \
91         || { find . -name erl_crash.dump | xargs cat ; exit 1 ; }
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 %{__make} install \
97         TARGET="%{_erl_target}" \
98         INSTALL_PREFIX=$RPM_BUILD_ROOT
99
100 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/*.html
101
102 sed -i -e"s#$RPM_BUILD_ROOT##" \
103         $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl}
104
105 for l in erl erlc dialyzer epmd run_erl to_erl ; do
106         ln -sf %{_libdir}/%{name}/bin/$l $RPM_BUILD_ROOT%{_bindir}
107 done
108 ERTSDIR=`echo $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-* | sed -e"s#^$RPM_BUILD_ROOT##"`
109 for l in ear ecc elink escript ; do
110         ln -sf $ERTSDIR/bin/$l $RPM_BUILD_ROOT%{_bindir}
111 done
112 ln -sf $ERTSDIR/bin/epmd $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
113
114 cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name}
115 find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9
116
117 # some files in the library need +x, so we build the list here
118 echo "%%defattr(644,root,root,755)" > lib.list
119 find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \
120         | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list
121 find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \
122         | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_libdir}/%%{name}/#" >> lib.list
123 find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \
124         | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list
125
126 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib
127 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %files -f lib.list
133 %defattr(644,root,root,755)
134 %doc AUTHORS EPLICENCE README COPYRIGHT
135 %attr(755,root,root) %{_bindir}/*
136 %dir %{_libdir}/erlang
137 %dir %{_libdir}/%{name}/bin
138 %attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer
139 %attr(755,root,root) %{_libdir}/%{name}/bin/epmd
140 %attr(755,root,root) %{_libdir}/%{name}/bin/erl
141 %attr(755,root,root) %{_libdir}/%{name}/bin/erlc
142 %attr(755,root,root) %{_libdir}/%{name}/bin/run_erl
143 %attr(755,root,root) %{_libdir}/%{name}/bin/start
144 %attr(755,root,root) %{_libdir}/%{name}/bin/start_erl
145 %attr(755,root,root) %{_libdir}/%{name}/bin/to_erl
146 %{_libdir}/%{name}/bin/start*.*
147 %dir %{_libdir}/%{name}/erts-*
148 %{_libdir}/%{name}/erts-*/doc
149 %{_libdir}/%{name}/erts-*/man
150 %{_libdir}/%{name}/erts-*/src
151 %{_libdir}/%{name}/erts-*/include
152 #%{_libdir}/%{name}/erts-*/*.ear
153 %dir %{_libdir}/%{name}/erts-*/bin
154 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
155 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child*
156 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer
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 %{_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.038626 seconds and 3 git commands to generate.