1 |
< |
### RPM external erlang R12B-5 |
2 |
< |
Source: http://erlang.org/download/otp_src_R12B-5.tar.gz |
3 |
< |
Requires: gcc openssl |
1 |
> |
### RPM external erlang R14B03 |
2 |
> |
Source: http://erlang.org/download/otp_src_%{realversion}.tar.gz |
3 |
> |
Patch0: erlang-ssl-connection |
4 |
> |
Patch1: erlang-ssl-session-cache |
5 |
> |
Requires: openssl |
6 |
> |
|
7 |
> |
# 32-bit |
8 |
> |
Provides: libc.so.6(GLIBC_PRIVATE) |
9 |
> |
# 64-bit |
10 |
|
Provides: libc.so.6(GLIBC_PRIVATE)(64bit) |
11 |
|
|
12 |
|
%prep |
13 |
< |
%setup -n otp_src_R12B-5 |
13 |
> |
%setup -n otp_src_%{realversion} |
14 |
> |
%patch0 -p0 |
15 |
> |
%patch1 -p0 |
16 |
> |
find . -name configure | xargs perl -p -i -e 's/-no-cpp-precomp//' |
17 |
|
|
18 |
|
%build |
19 |
< |
LANG=C; export LANG |
20 |
< |
if [ `uname -m` != 'x86_64' ]; then |
12 |
< |
LDEMULATION=elf_i386 LDFLAGS=-A`uname -m` ./configure --prefix=%i |
13 |
< |
LDEMULATION=elf_i386 LDFLAGS=-A`uname -m` make |
14 |
< |
else |
15 |
< |
./configure --prefix=%i |
16 |
< |
make |
17 |
< |
fi |
19 |
> |
./configure --prefix=%i |
20 |
> |
make |
21 |
|
|
22 |
|
%install |
23 |
|
make install |
21 |
– |
# SCRAM ToolBox toolfile |
22 |
– |
mkdir -p %i/etc/scram.d |
23 |
– |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
24 |
– |
<doc type=BuildSystem::ToolDoc version=1.0> |
25 |
– |
<Tool name=Erlang version=%v> |
26 |
– |
<lib name=erlang> |
27 |
– |
<client> |
28 |
– |
<Environment name=ERLANG_BASE default="%i"></Environment> |
29 |
– |
<Environment name=INCLUDE default="$ERLANG_BASE/include"></Environment> |
30 |
– |
<Environment name=LIBDIR default="$ERLANG_BASE/lib"></Environment> |
31 |
– |
</client> |
32 |
– |
<Runtime name=PATH value="$ERLANG_BASE/bin" type=path> |
33 |
– |
</Tool> |
34 |
– |
EOF_TOOLFILE |
24 |
|
|
25 |
< |
%post |
26 |
< |
%{relocateConfig}etc/scram.d/%n |
27 |
< |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
28 |
< |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
25 |
> |
# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment. |
26 |
> |
mkdir -p %i/etc/profile.d |
27 |
> |
: > %i/etc/profile.d/dependencies-setup.sh |
28 |
> |
: > %i/etc/profile.d/dependencies-setup.csh |
29 |
> |
for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do |
30 |
> |
root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root |
31 |
> |
if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then |
32 |
> |
echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
33 |
> |
echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh |
34 |
> |
fi |
35 |
> |
done |
36 |
|
|
37 |
+ |
%post |
38 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.*sh |
39 |
+ |
%{relocateConfig}lib/erlang/bin/{erl,start} |
40 |
+ |
%{relocateConfig}lib/erlang/erts-*/bin/{erl,start} |