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