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