]> git.pld-linux.org Git - packages/erlang.git/blob - erlang.spec
- up to R12B_4
[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 Version:        R12B_4
18 Release:        1
19 Epoch:          1
20 %define         _version        %(echo %{version} | tr _ -)
21 License:        distributable
22 Group:          Development/Languages
23 Source0:        http://www.erlang.org/download/otp_src_%{_version}.tar.gz
24 # Source0-md5:  ae81edda4a17506af7a9d73abca033b2
25 Source1:        http://www.erlang.org/download/otp_doc_man_%{_version}.tar.gz
26 # Source1-md5:  ef8f96d1721a2345cc87b208cde3de06
27 Patch0:         %{name}-fPIC.patch
28 Patch1:         %{name}-optional_java.patch
29 Patch2:         %{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.UTF-8
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
67 %build
68 find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub
69 %{__autoconf}
70 cd lib
71 %{__autoconf}
72 cd erl_interface
73 %{__autoconf}
74 cd ../gs
75 %{__autoconf}
76 cd ../megaco
77 %{__autoconf}
78 cd ../odbc
79 %{__autoconf}
80 cd ../snmp
81 %{__autoconf}
82 cd ../../erts/
83 %{__autoconf}
84 cd ..
85 %configure \
86 %ifarch sparc
87         CFLAGS="%{rpmcflags} -mv8plus" \
88 %endif
89         --with%{!?with_java:out}-java
90 rm -f lib/ssl/SKIP
91 ERL_TOP=`pwd`; export ERL_TOP
92  %{__make} -j1 \
93         TARGET="%{_erl_target}" \
94         || { find . -name erl_crash.dump | xargs cat ; exit 1 ; }
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98
99 %{__make} -j1 install \
100         TARGET="%{_erl_target}" \
101         INSTALL_PREFIX=$RPM_BUILD_ROOT
102
103 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/*.html
104
105 sed -i -e"s#$RPM_BUILD_ROOT##" \
106         $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl}
107
108 for l in erl erlc escript dialyzer epmd run_erl to_erl typer; do
109         ln -sf %{_libdir}/%{name}/bin/$l $RPM_BUILD_ROOT%{_bindir}
110 done
111 ERTSDIR=`echo $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-* | sed -e"s#^$RPM_BUILD_ROOT##"`
112 for l in epmd ; do
113         ln -sf $ERTSDIR/bin/$l $RPM_BUILD_ROOT%{_bindir}
114 done
115 ln -sf $ERTSDIR/bin/epmd $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
116
117 cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name}
118 find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9
119
120 # some files in the library need +x, so we build the list here
121 echo "%%defattr(644,root,root,755)" > lib.list
122 find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \
123         | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list
124 find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \
125         | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_libdir}/%%{name}/#" >> lib.list
126 find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f '!' -perm -500 \
127         | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%{_libdir}/%%{name}/#" >> lib.list
128
129 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib
130 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal
131
132 %clean
133 rm -rf $RPM_BUILD_ROOT
134
135 %files -f lib.list
136 %defattr(644,root,root,755)
137 %doc AUTHORS EPLICENCE README COPYRIGHT
138 %attr(755,root,root) %{_bindir}/*
139 %dir %{_libdir}/erlang
140 %dir %{_libdir}/%{name}/bin
141 %attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer
142 %attr(755,root,root) %{_libdir}/%{name}/bin/epmd
143 %attr(755,root,root) %{_libdir}/%{name}/bin/erl
144 %attr(755,root,root) %{_libdir}/%{name}/bin/erlc
145 %attr(755,root,root) %{_libdir}/%{name}/bin/escript
146 %attr(755,root,root) %{_libdir}/%{name}/bin/run_erl
147 %attr(755,root,root) %{_libdir}/%{name}/bin/start
148 %attr(755,root,root) %{_libdir}/%{name}/bin/start_erl
149 %attr(755,root,root) %{_libdir}/%{name}/bin/to_erl
150 %attr(755,root,root) %{_libdir}/%{name}/bin/typer
151 %{_libdir}/%{name}/bin/start*.*
152 %dir %{_libdir}/%{name}/erts-*
153 %{_libdir}/%{name}/erts-*/doc
154 %{_libdir}/%{name}/erts-*/man
155 %{_libdir}/%{name}/erts-*/src
156 %{_libdir}/%{name}/erts-*/include
157 #%{_libdir}/%{name}/erts-*/*.ear
158 %dir %{_libdir}/%{name}/erts-*/bin
159 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
160 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child*
161 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer
162 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/e*
163 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/heart*
164 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/inet_gethost
165 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/run_erl
166 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/start
167 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/to_erl
168 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/typer
169 %{_libdir}/%{name}/erts-*/bin/start*.*
170 # (file list dynamically generated) %{_libdir}/%{name}/lib
171 %dir %{_libdir}/%{name}/misc
172 %attr(755,root,root) %{_libdir}/%{name}/misc/*
173 %{_libdir}/%{name}/releases
174 %{_libdir}/%{name}/usr
175 %doc %{_libdir}/%{name}/man
176 %attr(755,root,root) %{_libdir}/%{name}/Install
This page took 0.07955 seconds and 4 git commands to generate.