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