]> git.pld-linux.org Git - packages/erlang.git/blob - erlang.spec
- up to 17.1; epoch 2; new versioning scheme used by erlang
[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:        17.1
18 Release:        1
19 Epoch:          2
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:  9c90706ce70e01651adde34a2b79bf4c
25 Source1:        http://www.erlang.org/download/otp_doc_man_%{_version}.tar.gz
26 # Source1-md5:  a64a5d0214936211bfb3bac4b824ad49
27 Patch0:         %{name}-fPIC.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}-gnu | 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.UTF-8
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
63 %build
64 find . -name config.sub | xargs -n 1 cp -f /usr/share/automake/config.sub
65 curd=$(pwd)
66 for i in $(find . -type f -name configure.in); do
67         cd $(dirname $i)
68         %{__autoconf}
69         cd $curd
70 done
71 %configure \
72 %ifarch sparc
73         CFLAGS="%{rpmcflags} -mv8plus" \
74 %endif
75         --with-javac%{!?with_java:=no}
76 rm -f lib/ssl/SKIP
77 ERL_TOP=`pwd`; export ERL_TOP
78  %{__make} -j1 \
79         TARGET="%{_erl_target}" \
80         || { find . -name erl_crash.dump | xargs cat ; exit 1 ; }
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %{__make} -j1 install \
86         TARGET="%{_erl_target}" \
87         INSTALL_PREFIX=$RPM_BUILD_ROOT
88
89 sed -i -e"s#$RPM_BUILD_ROOT##" \
90         $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/{erl,start,start_erl}
91
92 cp -r man $RPM_BUILD_ROOT%{_libdir}/%{name}
93 find $RPM_BUILD_ROOT%{_libdir}/%{name}/man -type f | xargs gzip -9
94
95 # some files in the library need +x, so we build the list here
96 echo "%%defattr(644,root,root,755)" > lib.list
97 find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type d \
98         | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%dir %%{_libdir}/%%{name}/#" >> lib.list
99 find $RPM_BUILD_ROOT%{_libdir}/%{name}/lib -type f -perm -500 \
100         | sed -e"s#^$RPM_BUILD_ROOT%{_libdir}/%{name}/#%%attr(755,root,root) %%{_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}/#%%{_libdir}/%%{name}/#" >> lib.list
103
104 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/lib
105 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/erts-*/include/internal
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %files -f lib.list
111 %defattr(644,root,root,755)
112 %doc AUTHORS EPLICENCE COPYRIGHT
113 %attr(755,root,root) %{_bindir}/ct_run
114 %attr(755,root,root) %{_bindir}/dialyzer
115 %attr(755,root,root) %{_bindir}/epmd
116 %attr(755,root,root) %{_bindir}/erl
117 %attr(755,root,root) %{_bindir}/erlc
118 %attr(755,root,root) %{_bindir}/escript
119 %attr(755,root,root) %{_bindir}/run_erl
120 %attr(755,root,root) %{_bindir}/to_erl
121 %attr(755,root,root) %{_bindir}/typer
122 %dir %{_libdir}/erlang
123 %dir %{_libdir}/%{name}/bin
124 %attr(755,root,root) %{_libdir}/%{name}/bin/ct_run
125 %attr(755,root,root) %{_libdir}/%{name}/bin/dialyzer
126 %attr(755,root,root) %{_libdir}/%{name}/bin/epmd
127 %attr(755,root,root) %{_libdir}/%{name}/bin/erl
128 %attr(755,root,root) %{_libdir}/%{name}/bin/erlc
129 %attr(755,root,root) %{_libdir}/%{name}/bin/escript
130 %attr(755,root,root) %{_libdir}/%{name}/bin/run_erl
131 %attr(755,root,root) %{_libdir}/%{name}/bin/start
132 %attr(755,root,root) %{_libdir}/%{name}/bin/start_erl
133 %attr(755,root,root) %{_libdir}/%{name}/bin/to_erl
134 %attr(755,root,root) %{_libdir}/%{name}/bin/typer
135 %{_libdir}/%{name}/bin/start*.*
136 %dir %{_libdir}/%{name}/erts-*
137 %{_libdir}/%{name}/erts-*/doc
138 %{_libdir}/%{name}/erts-*/man
139 %{_libdir}/%{name}/erts-*/src
140 %{_libdir}/%{name}/erts-*/include
141 #%{_libdir}/%{name}/erts-*/*.ear
142 %dir %{_libdir}/%{name}/erts-*/bin
143 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/beam*
144 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/child*
145 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/ct_run
146 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dialyzer
147 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/dyn_erl
148 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/e*
149 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/heart*
150 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/inet_gethost
151 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/run_erl
152 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/start
153 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/to_erl
154 %attr(755,root,root) %{_libdir}/%{name}/erts-*/bin/typer
155 %{_libdir}/%{name}/erts-*/bin/start*.*
156 # (file list dynamically generated) %{_libdir}/%{name}/lib
157 %dir %{_libdir}/%{name}/misc
158 %attr(755,root,root) %{_libdir}/%{name}/misc/*
159 %{_libdir}/%{name}/releases
160 %{_libdir}/%{name}/usr
161 %doc %{_libdir}/%{name}/man
162 %attr(755,root,root) %{_libdir}/%{name}/Install
This page took 0.04892 seconds and 3 git commands to generate.