ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/erlang.spec
Revision: 1.16
Committed: Wed Dec 9 13:22:25 2009 UTC (15 years, 4 months ago) by diego
Branch: MAIN
CVS Tags: builder_2010-10-13_13-04-14_dbs-apps, builder_2010-10-13_12-53-04_dbs-web, HG1009c, HG1009b, HG1009a, dg-base-rev21, dg-base-rev20, dg-base-rev19, dg-base-rev18, dg-base-rev17, FRONTEND_CONF_3_30_20100724, FRONTEND_CONF_3_29_20100723, dg-base-rev16, ge20100722-rpm-osx-64-bit, dg-base-rev15, ge20100621-bootstrap-rpm-4-8-macosx, ge20100611-apt-rpm-4-8-gcc-4-5-0, MotT0_1_0_15, MotT0_1_0_14, MotT0_1_0_13, MotT0_1_0_12, MotT0_1_0_11, MotT0_1_0_10, MotT0_1_0_9, dg-base-rev14, MotT0_1_0_8, MotT0_1_0_6, MotT0_1_0_5, MotT0_1_0_4, MotT0_1_0_3, dg-base-rev13, ge20100521b-new-rpm, ge20100521-new-rpm, ge20100519-new-apt, ge20100427-rpm-on-linux, dg-base-rev12, ge20100422-rpm-4-8-0, dg-base-rev11, dg-base-rev10, dg-base-rev9, FRONTEND_CONF_3_24_20100217, T0Mon_100204_2, dg20100115-security, dg20100112-security, dg20100111-security, dg20100107b-wmcore, dg20100107-wmcore, dg20091211-couchdb, dg20091210-phedex, dg20091203c-comp-base
Changes since 1.15: +3 -3 lines
Log Message:
Updated couchdb to 0.10.1.

File Contents

# User Rev Content
1 diego 1.16 ### RPM external erlang R12B_5
2     %define downloadv %(echo %realversion | tr _ -)
3 elmer 1.15 Source: http://erlang.org/download/otp_src_%{downloadv}.tar.gz
4     Requires: openssl
5 valya 1.12
6     # 32-bit
7     Provides: libc.so.6(GLIBC_PRIVATE)
8     # 64-bit
9 valya 1.8 Provides: libc.so.6(GLIBC_PRIVATE)(64bit)
10 valya 1.1
11     %prep
12 elmer 1.15 %setup -n otp_src_%{downloadv}
13 valya 1.1
14     %build
15 valya 1.11 ./configure --prefix=%i
16     make
17 valya 1.1
18     %install
19     make install
20 valya 1.14
21     export ERLANG_INSTALL_DIR=%i
22     cat %i/lib/erlang/bin/erl | sed "s,$ERLANG_INSTALL_DIR,\$ERLANG_ROOT,g" > %i/lib/erlang/bin/erl.new
23     mv %i/lib/erlang/bin/erl.new %i/lib/erlang/bin/erl
24     chmod a+x %i/lib/erlang/bin/erl
25    
26 valya 1.1 # SCRAM ToolBox toolfile
27     mkdir -p %i/etc/scram.d
28     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
29     <doc type=BuildSystem::ToolDoc version=1.0>
30 diego 1.16 <Tool name=Erlang version=%{realver}>
31 valya 1.1 <lib name=erlang>
32     <client>
33     <Environment name=ERLANG_BASE default="%i"></Environment>
34     <Environment name=INCLUDE default="$ERLANG_BASE/include"></Environment>
35     <Environment name=LIBDIR default="$ERLANG_BASE/lib"></Environment>
36     </client>
37     <Runtime name=PATH value="$ERLANG_BASE/bin" type=path>
38     </Tool>
39     EOF_TOOLFILE
40    
41 valya 1.13 # This will generate the correct dependencies-setup.sh/dependencies-setup.csh
42     # using the information found in the Requires statements of the different
43     # specs and their dependencies.
44     mkdir -p %i/etc/profile.d
45     echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
46     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
47     echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
48     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
49     do
50     case X$tool in
51     Xdistcc|Xccache )
52     ;;
53     * )
54     toolcap=`echo $tool | tr a-z- A-Z_`
55     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
56     eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
57     ;;
58     esac
59     done
60     perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
61     perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
62    
63 valya 1.1 %post
64     %{relocateConfig}etc/scram.d/%n
65 valya 1.8 %{relocateConfig}etc/profile.d/dependencies-setup.sh
66     %{relocateConfig}etc/profile.d/dependencies-setup.csh
67 valya 1.1
68 valya 1.14 # setup approripate links and made post install procedure
69     . $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
70     rm -f $ERLANG_ROOT/bin/*
71     rm -f $ERLANG_ROOT/lib/erlang/bin/epmd
72     ln -s $ERLANG_ROOT/lib/erlang/erts-5.6.5/bin/epmd $ERLANG_ROOT/lib/erlang/bin/epmd
73     for pkg in dialyzer epmd erl erlc escript run_erl to_erl typer
74     do
75     ln -s $ERLANG_ROOT/lib/erlang/bin/$pkg $ERLANG_ROOT/bin/$pkg
76     done
77