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