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