Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37633725
en ru br
ALT Linux repositórios
S:25.3-alt1
D:R12B.3-alt0.7
5.0: R12B.5-alt10
4.1: R11B.5-alt1
4.0: R11B.5-alt1
3.0: R10B.0-alt1
+backports:R10B.10-alt0.M30.1

Outros repositórios
Upstream:12.B.1

Group :: Desenvolvimento/Outros
RPM: erlang

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%def_without icc
%def_with otp_debug
%def_enable threads
%def_enable smp
%def_enable kernel_poll
%def_enable hipe
%def_enable megaco_flex_scanner_lineno
%def_with ssl
%def_with ssl_zlib
%def_with java
#Can build jinterface with gcj or Sun java
%def_enable gcj
%def_disable sctp
%def_enable tsp
#Can't build dialyzer with --enable-elib-malloc
%def_disable elib_malloc
%def_enable fixalloc
%def_enable clock_gettime
%def_enable hybrid_heap
%def_disable lock_checking
%def_with gmp

%def_disable gnu_ld
%def_without minimal_src
#----------------------------------------------------------------------
%define set_disable() %{expand:%%force_disable %{1}} %{expand:%%undefine _enable_%{1}}
%define set_without() %{expand:%%force_without %{1}} %{expand:%%undefine _with_%{1}}
%define subst_enable_to() %{expand:%%{?_enable_%{1}:--enable-%{2}}} %{expand:%%{?_disable_%{1}:--disable-%{2}}}
%define subst_with_to() %{expand:%%{?_with_%{1}:--with-%{2}}} %{expand:%%{?_without_%{1}:--without-%{2}}}
%{?_enable_smp_io_thread:%set_disable port_tasks}

%ifnarch %ix86 x86_64
%set_without icc
%endif

%define Name Erlang
Name: erlang
%define ver R12B
%define subver 3
Version: %ver.%subver
Release: alt0.7
Summary: A programming language developed by Ericsson
License: EPL
Group: Development/Other
URL: http://www.%name.org
Source: otp%{?_with_minimal_src:_minimal}_src_%ver-%subver.tar
Patch0: otp_src_R12B-1-alt-arch.patch
Patch1: otp_src_R12B-3-ffi.patch
Patch2: otp-sslrpath.patch
Requires: %name-otp = %version-%release

# Automatically added by buildreq on Tue Jun 05 2007 (-bi)

#BuildRequires: flex java-devel libgmp-devel libncurses-devel libssl-devel libunixODBC-devel openssl symlinks tcl

BuildRequires: gcc-c++ flex libncurses-devel libunixODBC-devel symlinks
BuildRequires: zlib-devel libgd2-devel sh libffi-devel
BuildRequires: rpm-build-%name >= 0.3.1
%{?_with_icc:BuildRequires: icc}
%if_with java
%if_enabled gcj
BuildRequires: jdkgcj
%else
BuildRequires: /proc java-devel
%endif
%endif
%{?_with_ssl:BuildRequires: libssl-devel openssl}
%{?_with_gmp:BuildRequires: libgmp-devel}

%description
%Name is a programming language developed at Ericsson Computer Science
Laboratory. %Name provides many features which are more commonly
associated with an operating system: concurrent processes, scheduling,
memory management, distribution, networking, etc.


%package megaco
Summary: H.248 support for %Name
Group: Development/Other
Requires: %name = %version-%release
Requires: %name-megaco-modules = %version-%release

%description megaco
Megaco (aka H.248) is a signalling protocol used in VoIP networks.
This package adds support for Megaco to your %Name installation.


%package megaco-modules
Summary: H.248 support for %Name - modules
Group: Development/Other
BuildArch: noarch
Requires: %name-megaco = %version-%release
Requires: %name-visual-modules = %version-%release

%description megaco-modules
Megaco (aka H.248) is a signalling protocol used in VoIP networks.
This package contains standard modules for Megaco.


%package visual
Summary: Standart visual applications for %Name
Group: Development/Other
BuildArch: noarch
Requires: %name = %version-%release
Requires: %name-visual-modules = %version-%release
Requires: tk

%description visual
Standard visual applications for %Name programming language.


%package visual-modules
Summary: Standart visual applications for %Name - modules
Group: Development/Other
BuildArch: noarch
Requires: %name-visual = %version-%release

%description visual-modules
Standard visual applications for %Name programming language.
This package contains standard modules for visual applications.


%package odbc
Summary: ODBC support for %Name
Group: Development/Other
Requires: %name = %version-%release
Requires: %name-odbc-modules = %version-%release

%description odbc
ODBC support for %Name programming language.


%package odbc-modules
Summary: ODBC support for %Name - modules
Group: Development/Other
BuildArch: noarch
Requires: %name-odbc = %version-%release

%description odbc-modules
ODBC support for %Name programming language.
This package contains standard modules for odbc.


%package common_test
Summary: A portable framework for automatic testing %Name applications
Group: Development/Other
Requires: %name = %version-%release
Requires: %name-common_test-modules = %version-%release

%description common_test
A portable framework for automatic testing %Name applications.


%package common_test-modules
Summary: A portable framework for automatic testing %Name applications - modules
Group: Development/Other
BuildArch: noarch
Requires: %name-common_test = %version-%release

%description common_test-modules
A portable framework for automatic testing %Name applications.
This package contains standard modules for common_test.


%package docbuilder
Summary: Tool for generating HTML documentation for %Name applications
Group: Development/Other
BuildArch: noarch
Requires: %name = %version-%release
Requires: %name-docbuilder-modules = %version-%release

%description docbuilder
Tool for generating HTML documentation for %Name applications.


%package docbuilder-modules
Summary: Tool for generating HTML documentation for %Name applications - modules
Group: Development/Other
BuildArch: noarch
Requires: %name-docbuilder = %version-%release

%description docbuilder-modules
Tool for generating HTML documentation for %Name applications.
This package contains standard modules for docbuilder.


%package examples
Summary: OTP examples
Group: Development/Other
BuildArch: noarch
Requires: %name = %version-%release

%description examples
OTP examples.


%package otp
Summary: Standard OTP
Group: Development/Other
Provides: otp = %version-%release
Requires: %name = %version-%release
Requires: %name-otp-modules = %version-%release

%description otp
Standard OTP.


%package otp-modules
Summary: Standard OTP modules
Group: Development/Other
BuildArch: noarch
Provides: otp-modules = %version-%release
Requires: %name-otp = %version-%release

%description otp-modules
Standard OTP modules.


%package jinterface
Summary: %Name's level interface to Java
Group: Development/Other
BuildArch: noarch
Requires: %name-otp = %version-%release

%description jinterface
%Name's level interface to Java.


%package full
Summary: Full %Name/OTP package
Group: Development/Other
BuildArch: noarch
Requires: %name = %version-%release
Requires: %name-megaco = %version-%release
Requires: %name-odbc = %version-%release
Requires: %name-visual = %version-%release
Requires: %name-docbuilder = %version-%release
Requires: %name-common_test = %version-%release
Requires: %name-examples = %version-%release
Requires: %name-jinterface = %version-%release

%description full
%Name is a programming language developed at Ericsson Computer Science
Laboratory. %Name provides many features which are more commonly
associated with an operating system: concurrent processes, scheduling,
memory management, distribution, networking, etc.
This package requires all standard %Name/OTP subpackages.


%if_with otp_debug
%package otp-modules-debug
Summary: Standard OTP modules with debug information
Group: Development/Other
BuildArch: noarch
Provides: otp-modules-debug = %version-%release
Requires: %name-otp = %version-%release
#Provides: %name-otp-modules = %version-%release

%description otp-modules-debug
Standard OTP modules with debug information.


%package megaco-modules-debug
Summary: H.248 support for %Name - modules with debug information
Group: Development/Other
BuildArch: noarch
Requires: %name-megaco = %version-%release
#Provides: %name-megaco-modules = %version-%release

%description megaco-modules-debug
Megaco (aka H.248) is a signalling protocol used in VoIP networks.
This package contains modules for Megaco with debug information.


%package visual-modules-debug
Summary: Standart visual applications for %Name - modules with debug information
Group: Development/Other
BuildArch: noarch
Requires: %name-visual = %version-%release
#Provides: %name-visual-modules = %version-%release

%description visual-modules-debug
Standard visual applications for %Name programming language.
This package contains modules for visual applications with debug
information.


%package odbc-modules-debug
Summary: ODBC support for %Name - modules with debug information
Group: Development/Other
BuildArch: noarch
Requires: %name-odbc = %version-%release
#Provides: %name-odbc-modules = %version-%release

%description odbc-modules-debug
ODBC support for %Name programming language.
This package contains modules for odbc with debug information.


%package common_test-modules-debug
Summary: A portable framework for automatic testing %Name applications - modules with debug information
Group: Development/Other
BuildArch: noarch
Requires: %name-common_test = %version-%release
#Provides: %name-common_test-modules = %version-%release

%description common_test-modules-debug
A portable framework for automatic testing %Name applications.
This package contains modules for common_test with debug information.


%package docbuilder-modules-debug
Summary: Tool for generating HTML documentation for %Name applications - modules with debug information
Group: Development/Other
BuildArch: noarch
Requires: %name-docbuilder = %version-%release
#Provides: %name-docbuilder-modules = %version-%release

%description docbuilder-modules-debug
Tool for generating HTML documentation for %Name applications.
This package contains modules for docbuilder with debug information.
%endif


%prep
%setup -n otp_src_%ver-%subver
chmod -R u+w ./
%patch0 -p1
%patch1 -p1
%patch2 -p1


%build
%define _optlevel 3
%if_with icc
%add_optflags -vec-guard-write -opt-multi-version-aggressive %{?_disable_gnu_ld:-ip}
%else
%add_optflags -fno-stack-protector
%endif
export CFLAGS="%optflags"
%undefine __libtoolize
%define _configure_script ./otp_build configure
./otp_build autoconf
%configure \
   --libdir=%_libexecdir \
   %{subst_enable threads} \
   %{subst_enable_to smp smp-support} \
   %{subst_enable kernel_poll kernel-poll} \
   %{subst_enable hipe} \
   %{subst_enable_to megaco_flex_scanner_lineno megaco-flex-scanner-lineno} \
   %{subst_with ssl} \
   %{subst_with_to ssl_zlib ssl-zlib} \
   %{subst_with gmp} \
   %{subst_enable sctp} \
   %{subst_enable tsp} \
   %{subst_enable fixalloc} \
   %{subst_enable_to elib_malloc elib-malloc} \
   %{subst_enable_to hybrid_heap hybrid-heap} \
   %{subst_enable_to lock_checking lock-checking} \
   %{subst_enable_to clock_gettime clock-gettime} \
   --disable-erlang-mandir \
   %{?_with_icc:CC=icc %{?_enable_gnu_ld:LD=gcc LIBADD="-lirc"}}

%{?_without_otp_debug:subst "/^[[:blank:]]*ERL_COMPILE_FLAGS[[:blank:]]*/ s/[[:blank:]]*+debug_info//g" make/%_target_platform%_gnu/otp.mk}
%make TARGET=%_target_platform%_gnu %{?_with_icc:%{?_enable_gnu_ld:LD=gcc LIBADD="-lirc"}}

%if_with otp_debug
for d in lib/*/ebin; do
   m=$(basename $(dirname "$d"))
   if [ "$m" != "dialyzer" ]; then
mv "$d"{,.debug}
mkdir "$d"
   fi
done
subst "/^[[:blank:]]*ERL_COMPILE_FLAGS[[:blank:]]*/ s/[[:blank:]]*+debug_info//g" make/%_target_platform%_gnu/otp.mk
echo "Dialyzer already built" > lib/dialyzer/SKIP
%make BUILD_ALL=true TARGET=%_target_platform%_gnu %{?_with_icc:%{?_enable_gnu_ld:LD=gcc LIBADD="-lirc"}} libs
rm -f lib/dialyzer/SKIP
%endif


%install
%make_install TARGET=%_target_platform%_gnu INSTALL_PREFIX=%buildroot install

install -d -m 0755 %buildroot{%_libexecdir/%name/usr/include,%_includedir/%name}
ln -sf %buildroot%_libexecdir/%name/{erts-*/include/*.h,usr/include/}
ln -sf %buildroot{%_libexecdir/%name/usr/include,%_includedir/%name}

for l in %buildroot%_libexecdir/%name/lib/*; do
   if [ -d $l/src ]; then
H=$(find $l/src -type f -name '*.hrl' | grep -v '.*_internal\.hrl$') ||:
if [ -n "$H" ]; then
   install -d -m 0755 $l/include/
   mv $H $l/include/
   for f in $H; do
ln -sf $l/include/$(basename $f) $f
   done
   find $l/src/* -not -type l -delete
else
   rm -rf $l/src
fi
   fi
done
rm -rf %buildroot%_libexecdir/%name/{lib/*/{{c,java}_src,*.mk,priv/obj},erts-*/src}
rm -f %buildroot%_libexecdir/%name/lib/*/*/*.{asn1,erl}
rm -f %buildroot%_libexecdir/%name/lib/orber-*/COSS/CosNaming/*.erl
rm -f %buildroot%_libexecdir/%name/lib/*/priv/bin/*.bat
find %buildroot -type f -name '*.src' -delete
find %buildroot -empty -delete

install -d -m 0755 %buildroot%_docdir/%name-%version
install -m 0644 AUTHORS EPLICENCE %buildroot%_docdir/%name-%version/

rm -rf %buildroot%_libexecdir/%name/{Install,misc,usr/lib}

subst 's|%buildroot||' %buildroot%_libexecdir/%name/{{,erts-*/}bin/{erl,start},releases/RELEASES}

%if_with otp_debug
for d in lib/*/ebin; do
   dm=$(dirname "$d")
   m=$(basename "$dm")
   if [ "$m" != "dialyzer" ]; then
v=$(sed -n '/^.*_VSN[[:blank:]]*=[[:blank:]]*[[:digit:]]/s/^.*_VSN[[:blank:]]*=[[:blank:]]*//p' "$dm/vsn.mk")
install -d -m 0755 %buildroot%_libexecdir/%name/lib/$m-$v/ebin.debug
install -m 0644 "$d.debug"/* %buildroot%_libexecdir/%name/lib/$m-$v/ebin.debug/
   fi
done

cat > %buildroot%_libexecdir/%name/bin/erl.debug <<__EOF__
#!/bin/sh
exec %_libexecdir/%name/bin/erl -pa \$(ls -d %_libexecdir/%name/lib/*/ebin.debug) \$ at
__EOF__

chmod 755 %buildroot%_libexecdir/%name/bin/erl.debug
ln -sf %buildroot%_libexecdir/%name/bin/erl.debug %buildroot%_bindir/
%endif

for f in dialyzer erl erlc escript run_erl start to_erl typer; do
   ln -sf %buildroot%_libexecdir/%name{/erts-*,}/bin/$f
done

symlinks -cdr %buildroot
symlinks -scdr %buildroot

sed 's|^ROOTDIR=|&%buildroot|' %buildroot%_bindir/erl > erl.buildroot
chmod 755 erl.buildroot
%define __erlang %buildsubdir/erl.buildroot

%add_findreq_skiplist %_libexecdir/%name/lib/megaco-*/examples/meas/*.sh.skel


%files
%dir %_docdir/%name-%version
%_docdir/%name-%version/*
%_bindir/*
%dir %_libexecdir/%name
%dir %_libexecdir/%name/bin
%_libexecdir/%name/bin/*
%_libexecdir/%name/erts-*
%_libexecdir/%name/releases
%_libexecdir/%name/usr/include
%dir %_libexecdir/%name/lib
%_libexecdir/%name/usr
%_includedir/%name
%exclude %_libexecdir/%name/bin/erl.debug
%exclude %_bindir/erl.debug


%files otp
%_libexecdir/%name/lib/*
%exclude %_libexecdir/%name/lib/megaco-*
%exclude %_libexecdir/%name/lib/appmon-*
%exclude %_libexecdir/%name/lib/common_test-*
%exclude %_libexecdir/%name/lib/dialyzer-*
%exclude %_libexecdir/%name/lib/debugger-*
%exclude %_libexecdir/%name/lib/et-*
%exclude %_libexecdir/%name/lib/gs-*
%exclude %_libexecdir/%name/lib/pman-*
%exclude %_libexecdir/%name/lib/toolbar-*
%exclude %_libexecdir/%name/lib/tv-*
%exclude %_libexecdir/%name/lib/typer-*
%exclude %_libexecdir/%name/lib/odbc-*
%exclude %_libexecdir/%name/lib/docbuilder-*
%exclude %_libexecdir/%name/lib/jinterface-*
%exclude %_libexecdir/%name/lib/*/ebin
%exclude %_libexecdir/%name/lib/*/ebin.debug
%exclude %_libexecdir/%name/lib/*/examples
%exclude %_libexecdir/%name/lib/*/contribs


%files otp-modules
%_libexecdir/%name/lib/*/ebin
%exclude %_libexecdir/%name/lib/megaco-*
%exclude %_libexecdir/%name/lib/appmon-*
%exclude %_libexecdir/%name/lib/common_test-*
%exclude %_libexecdir/%name/lib/dialyzer-*
%exclude %_libexecdir/%name/lib/debugger-*
%exclude %_libexecdir/%name/lib/et-*
%exclude %_libexecdir/%name/lib/gs-*
%exclude %_libexecdir/%name/lib/hipe-*/ebin/hipe_tool*
%exclude %_libexecdir/%name/lib/observer-*/ebin/etop*
%exclude %_libexecdir/%name/lib/observer-*/ebin/ttb_et*
%exclude %_libexecdir/%name/lib/pman-*
%exclude %_libexecdir/%name/lib/toolbar-*
%exclude %_libexecdir/%name/lib/tv-*
%exclude %_libexecdir/%name/lib/typer-*
%exclude %_libexecdir/%name/lib/odbc-*
%exclude %_libexecdir/%name/lib/docbuilder-*


%files megaco
%_libexecdir/%name/lib/megaco-*
%exclude %_libexecdir/%name/lib/megaco-*/examples
%exclude %_libexecdir/%name/lib/megaco-*/ebin
%exclude %_libexecdir/%name/lib/megaco-*/ebin.debug


%files megaco-modules
%_libexecdir/%name/lib/megaco-*/ebin


%files visual
%_libexecdir/%name/lib/appmon-*
%_libexecdir/%name/lib/debugger-*
%_libexecdir/%name/lib/dialyzer-*
%_libexecdir/%name/lib/et-*
%_libexecdir/%name/lib/gs-*
%_libexecdir/%name/lib/pman-*
%_libexecdir/%name/lib/toolbar-*
%_libexecdir/%name/lib/tv-*
%_libexecdir/%name/lib/typer-*
%exclude %_libexecdir/%name/lib/*/examples
%exclude %_libexecdir/%name/lib/*/contribs
%exclude %_libexecdir/%name/lib/*/ebin
%exclude %_libexecdir/%name/lib/*/ebin.debug


%files visual-modules
%_libexecdir/%name/lib/appmon-*/ebin
%_libexecdir/%name/lib/debugger-*/ebin
%_libexecdir/%name/lib/dialyzer-*/ebin
%_libexecdir/%name/lib/et-*/ebin
%_libexecdir/%name/lib/gs-*/ebin
%_libexecdir/%name/lib/hipe-*/ebin/hipe_tool*
%_libexecdir/%name/lib/observer-*/ebin/etop*
%_libexecdir/%name/lib/observer-*/ebin/ttb_et*
%_libexecdir/%name/lib/pman-*/ebin
%_libexecdir/%name/lib/toolbar-*/ebin
%_libexecdir/%name/lib/tv-*/ebin
%_libexecdir/%name/lib/typer-*/ebin


%files odbc
%_libexecdir/%name/lib/odbc-*
%exclude %_libexecdir/%name/lib/odbc-*/ebin
%exclude %_libexecdir/%name/lib/odbc-*/ebin.debug


%files odbc-modules
%_libexecdir/%name/lib/odbc-*/ebin


%files common_test
%_libexecdir/%name/lib/common_test-*
%exclude %_libexecdir/%name/lib/common_test-*/ebin
%exclude %_libexecdir/%name/lib/common_test-*/ebin.debug


%files common_test-modules
%_libexecdir/%name/lib/common_test-*/ebin


%files docbuilder
%_libexecdir/%name/lib/docbuilder-*
%exclude %_libexecdir/%name/lib/docbuilder-*/ebin
%exclude %_libexecdir/%name/lib/docbuilder-*/ebin.debug


%files docbuilder-modules
%_libexecdir/%name/lib/docbuilder-*/ebin


%files examples
%_libexecdir/%name/lib/*/examples
%_libexecdir/%name/lib/*/contribs


%files full


%if_with otp_debug
%files otp-modules-debug
%_libexecdir/%name/lib/*/ebin.debug
%exclude %_libexecdir/%name/lib/megaco-*
%exclude %_libexecdir/%name/lib/appmon-*
%exclude %_libexecdir/%name/lib/common_test-*
%exclude %_libexecdir/%name/lib/debugger-*
%exclude %_libexecdir/%name/lib/et-*
%exclude %_libexecdir/%name/lib/gs-*
%exclude %_libexecdir/%name/lib/hipe-*/ebin.debug/hipe_tool*
%exclude %_libexecdir/%name/lib/observer-*/ebin.debug/etop*
%exclude %_libexecdir/%name/lib/observer-*/ebin.debug/ttb_et*
%exclude %_libexecdir/%name/lib/pman-*
%exclude %_libexecdir/%name/lib/toolbar-*
%exclude %_libexecdir/%name/lib/tv-*
%exclude %_libexecdir/%name/lib/typer-*
%exclude %_libexecdir/%name/lib/odbc-*
%exclude %_libexecdir/%name/lib/docbuilder-*
%_libexecdir/%name/bin/erl.debug
%_bindir/erl.debug


%files megaco-modules-debug
%_libexecdir/%name/lib/megaco-*/ebin.debug


%files visual-modules-debug
%_libexecdir/%name/lib/appmon-*/ebin.debug
%_libexecdir/%name/lib/debugger-*/ebin.debug
%_libexecdir/%name/lib/et-*/ebin.debug
%_libexecdir/%name/lib/gs-*/ebin.debug
%_libexecdir/%name/lib/hipe-*/ebin.debug/hipe_tool*
%_libexecdir/%name/lib/observer-*/ebin.debug/etop*
%_libexecdir/%name/lib/observer-*/ebin.debug/ttb_et*
%_libexecdir/%name/lib/pman-*/ebin.debug
%_libexecdir/%name/lib/toolbar-*/ebin.debug
%_libexecdir/%name/lib/tv-*/ebin.debug
%_libexecdir/%name/lib/typer-*/ebin.debug


%files odbc-modules-debug
%_libexecdir/%name/lib/odbc-*/ebin.debug


%files common_test-modules-debug
%_libexecdir/%name/lib/common_test-*/ebin.debug


%files docbuilder-modules-debug
%_libexecdir/%name/lib/docbuilder-*/ebin.debug
%endif


%files jinterface
%_libexecdir/%name/lib/jinterface-*


%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009