Revision: | 1.14 |
Committed: | Mon Mar 30 18:38:50 2009 UTC (16 years, 1 month ago) by valya |
Branch: | MAIN |
CVS Tags: | MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, T0Mon_100518_1, T0Mon_100503_1, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, DAS_20100302_slc5_amd64_gcc434, DBS_20100226_slc5_amd64_gcc434, DBS_20100217_slc5_amd64_gcc434, FILEMOVER_20100217_slc5_amd64_gcc434, DAS_20100217_slc5_amd64_gcc434, DAS_20100216b_slc5_amd64_gcc434, T0Mon_100216_1, DAS_20100216_slc5_amd64_gcc434, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, dg20100201-dbs3, FILEMOVER_20100201_slc5_amd64_gcc434, FILEMOVER_20100128b_slc5_amd64_gcc434, dg20100129-dbs3, dg20100128-dbs3, FILEMOVER_20100128_slc5_amd64_gcc434, DAS_20100127_slc5_amd64_gcc434, T0Mon_100127_1, DAS_20100126_slc5_amd64_gcc434, FILEMOVER_20100122_slc5_amd64_gcc434, DAS_20100119_slc5_amd64_gcc434, DAS_20100115_slc5_amd64_gcc434, DBS_20100115_slc5_amd64_gcc434, DBS_20100112_slc5_amd64_gcc434, DBS_20100111_slc5_amd64_gcc434, DAS_20100105_slc5_amd64_gcc434, DAS_20091221_slc5_amd64_gcc434, DAS_20091214_slc5_amd64_gcc434, DD_20091208_slc5_amd64_gcc434, DAS_20091208_slc5_amd64_gcc434, FILEMOVER_20091208_slc5_amd64_gcc434, DBS_20091208_slc5_amd64_gcc434, dg20091203b-comp-base, dg20091203-comp-base, DAS_20091202, DQMCATTEST_0_0_1, pe20091117a-fromDAS_20090709, DAS_20091117, pe20091116b-fromDAS_20090709, pe20091116a-fromDAS_20090709, T0Mon_091111_1, BUILDBOT_01, CERNOIDv02, DAS_20091104, CouchDB_0_10_0, DAS_20091016, CERNOIDv01, DAS_20091014, WMCORE-before-refactor, PerfSuiteDB_20090930, PerfSuiteDB_20090916, pe20090910-fromDAS_20090709, PerfSuiteDB_20090904_almost_stable, PerfSuiteDB_20090904, PerfSuiteDB_20090901, forHEARTBEATr04, RPMVERIFY_0_2, forHEARTBEATr01, DAS_20090709, DAS_20090607, DAS_20090604, DAS_20090603, ap20090520-osx105, ap20090519-osx105, DAS_20090514_3, DAS_20090514_2, DAS_20090514_1, DAS_20090514, DAS_20090408, DAS_20090330 |
Changes since 1.13: | +16 -0 lines |
Log Message: | *** empty log message *** |
# | User | Rev | Content |
---|---|---|---|
1 | valya | 1.1 | ### RPM external erlang R12B-5 |
2 | Source: http://erlang.org/download/otp_src_R12B-5.tar.gz | ||
3 | valya | 1.4 | Requires: gcc openssl |
4 | valya | 1.12 | |
5 | # 32-bit | ||
6 | Provides: libc.so.6(GLIBC_PRIVATE) | ||
7 | # 64-bit | ||
8 | valya | 1.8 | Provides: libc.so.6(GLIBC_PRIVATE)(64bit) |
9 | valya | 1.1 | |
10 | %prep | ||
11 | valya | 1.5 | %setup -n otp_src_R12B-5 |
12 | valya | 1.1 | |
13 | %build | ||
14 | valya | 1.11 | ./configure --prefix=%i |
15 | make | ||
16 | valya | 1.1 | |
17 | %install | ||
18 | make install | ||
19 | valya | 1.14 | |
20 | export ERLANG_INSTALL_DIR=%i | ||
21 | cat %i/lib/erlang/bin/erl | sed "s,$ERLANG_INSTALL_DIR,\$ERLANG_ROOT,g" > %i/lib/erlang/bin/erl.new | ||
22 | mv %i/lib/erlang/bin/erl.new %i/lib/erlang/bin/erl | ||
23 | chmod a+x %i/lib/erlang/bin/erl | ||
24 | |||
25 | valya | 1.1 | # SCRAM ToolBox toolfile |
26 | mkdir -p %i/etc/scram.d | ||
27 | cat << \EOF_TOOLFILE >%i/etc/scram.d/%n | ||
28 | <doc type=BuildSystem::ToolDoc version=1.0> | ||
29 | <Tool name=Erlang version=%v> | ||
30 | <lib name=erlang> | ||
31 | <client> | ||
32 | <Environment name=ERLANG_BASE default="%i"></Environment> | ||
33 | <Environment name=INCLUDE default="$ERLANG_BASE/include"></Environment> | ||
34 | <Environment name=LIBDIR default="$ERLANG_BASE/lib"></Environment> | ||
35 | </client> | ||
36 | <Runtime name=PATH value="$ERLANG_BASE/bin" type=path> | ||
37 | </Tool> | ||
38 | EOF_TOOLFILE | ||
39 | |||
40 | valya | 1.13 | # This will generate the correct dependencies-setup.sh/dependencies-setup.csh |
41 | # using the information found in the Requires statements of the different | ||
42 | # specs and their dependencies. | ||
43 | mkdir -p %i/etc/profile.d | ||
44 | echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh | ||
45 | echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh | ||
46 | echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` | ||
47 | for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` | ||
48 | do | ||
49 | case X$tool in | ||
50 | Xdistcc|Xccache ) | ||
51 | ;; | ||
52 | * ) | ||
53 | toolcap=`echo $tool | tr a-z- A-Z_` | ||
54 | eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh | ||
55 | eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh | ||
56 | ;; | ||
57 | esac | ||
58 | done | ||
59 | perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh | ||
60 | perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh | ||
61 | |||
62 | valya | 1.1 | %post |
63 | %{relocateConfig}etc/scram.d/%n | ||
64 | valya | 1.8 | %{relocateConfig}etc/profile.d/dependencies-setup.sh |
65 | %{relocateConfig}etc/profile.d/dependencies-setup.csh | ||
66 | valya | 1.1 | |
67 | valya | 1.14 | # setup approripate links and made post install procedure |
68 | . $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh | ||
69 | rm -f $ERLANG_ROOT/bin/* | ||
70 | rm -f $ERLANG_ROOT/lib/erlang/bin/epmd | ||
71 | ln -s $ERLANG_ROOT/lib/erlang/erts-5.6.5/bin/epmd $ERLANG_ROOT/lib/erlang/bin/epmd | ||
72 | for pkg in dialyzer epmd erl erlc escript run_erl to_erl typer | ||
73 | do | ||
74 | ln -s $ERLANG_ROOT/lib/erlang/bin/$pkg $ERLANG_ROOT/bin/$pkg | ||
75 | done | ||
76 |