[erlang-questions] maybe a BUG in the build system of erlang?

Anthony Shipman als@REDACTED
Tue Sep 9 07:27:31 CEST 2008


On Tue, 9 Sep 2008 05:28:42 am Tuncer Ayaz wrote:
> > I have an RPM spec file that does the hacks to repair the various
> > scripts. This should show you what needs to be fixed to prepare a
> > package.
>
> Is it good enough as an addition to upstream?

I'm not sure what you mean by upstream. I've attached a copy. It is used at my 
company for producing Erlang rpms.

-- 
Anthony Shipman                    Mamas don't let your babies 
als@REDACTED                   grow up to be outsourced.
-------------- next part --------------
%define version 12B.4
%define release 1

Name: erlang
Summary: Erlang: A programming language for distributed systems.
Group: Development/Languages
Version: %{version}
Release: %{release}
License: The Erlang license (see "EPLICENCE" file included in distribution)
Packager: Symstream Technologies
URL: http://www.erlang.org/

Source0: otp_src_R12B-4.tar.gz
Source1: otp_doc_html_R12B-4.tar.gz
Source2: otp_doc_man_R12B-4.tar.gz

BuildRoot: /var/tmp/erlang-%{version}

%description
Erlang is a programming language designed at the Ericsson Computer Science Laboratory. 

%prep
%setup -a 0 -n otp_src_R12B-4

%build

./configure
make

%install
rm -rf $RPM_BUILD_ROOT
make INSTALL_PREFIX=$RPM_BUILD_ROOT install

#   Correct the symlinks
pushd $RPM_BUILD_ROOT/usr/local/bin
for f in dialyzer epmd erl erlc escript run_erl to_erl typer
do
    if [ -x $f ]
    then
	/bin/rm $f
	ln -s /usr/local/lib/erlang/bin/$f $f
    fi
done

cd ../lib/erlang/bin
if [ -x epmd ]
then
    /bin/rm epmd
    ln -s ../erts-5.6.4/bin/epmd epmd
fi

#   Correct the paths in the scripts
for dir in $RPM_BUILD_ROOT/usr/local/lib/erlang/bin $RPM_BUILD_ROOT/usr/local/lib/erlang/erts*/bin 
do
    cd $dir
    for f in erl start
    do
	if [ -x $f ]
	then
	    sed "s,$RPM_BUILD_ROOT,," <$f >$$
	    mv $$ $f
	    chmod 755 $f
	fi
    done
done

popd

#   Install the doco
pushd $RPM_BUILD_ROOT/usr/local/lib/erlang
tar zxvf %_sourcedir/otp_doc_html_R12B-4.tar.gz
tar zxvf %_sourcedir/otp_doc_man_R12B-4.tar.gz

popd

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/usr/local/bin
/usr/local/lib/erlang

%doc AUTHORS EPLICENCE README


More information about the erlang-questions mailing list