LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File erlang.spec of Package erlang (Project home:Ledest:erlang:R15)

%def_without otp_debug
%def_without otp_native
%def_enable threads
%def_enable smp
%def_disable native_libs
%def_disable halfword
%def_enable shared_zlib
%def_enable kernel_poll
%def_enable hipe
%def_enable megaco_flex_scanner_lineno
%def_with ssl
%def_with ssl_zlib
%def_with java
%def_enable sctp
%def_disable tsp
%def_enable clock_gettime
%def_disable lock_checking
%def_disable lock_counting
%def_with termcap
%def_with gmp
%def_with libatomic_ops
%def_enable docs
%def_enable asm_optimize

%def_with odbc
%def_with wx

%def_enable strip_beam
%if 0%{?suse_version} >= 1220 || 0%{?centos_version} >= 700
%define java_target 7
%else
%define java_target 6
%endif
#----------------------------------------------------------------------
%define exclude_doc %{?_enable_docs:%exclude %_otplibdir/*/doc}
%define exclude_examples %exclude %_otplibdir/*/examples
%define exclude_inc \
%exclude %_otplibdir/*/include \
%exclude %_otplibdir/*/src

%{?_enable_smp_io_thread:%set_disable port_tasks}

%{?_enable_halfword:%set_disable hipe}
%{?_disable_hipe:%set_without otp_native}

%define Name Erlang
Name: erlang
Version: R15B03
%define plevel -1
%define ver %version%plevel
%define erts_ver 5.9.3.1
Release: 34
%define EVR %{?epoch:%epoch:}%version-%release
Summary: A programming language developed by Ericsson
License: ErlPL-1.1
Group: Development/Languages/Other
URL: http://www.%name.org
Source: otp_src_%ver.tar.xz
Source9: %name-rpmlintrc
Patch0: otp-%ver-alt.patch
Patch1: otp-%ver-led.patch
Patch11: otp-%ver-lib-gs.patch
Patch12: otp-%ver-lib-odbc.patch
Patch13: otp-%ver-lib-stdlib.patch
Patch14: otp-%ver-lib-wx.patch
Patch20: otp_src_R15B03-1-erts-lib.patch
Patch21: otp_src_R15B03-1-erts-ctype.patch
Patch22: otp_src_R15B03-1-compiler-printable.patch
Patch23: otp_src_R15B03-1-io_lib-printable.patch
Patch31: otp_src_R15B03-1-erts-drivers-gzio.patch
Patch32: otp_src_R15B03-1-erts-drivers-inet_drv.patch
Patch33: otp_src_R15B03-1-erts-erlexec.patch
Patch34: otp_src_R15B03-1-erts-erl_process.patch
Patch35: otp_src_R15B03-1-wx-gl_funcs.patch
Patch36: otp_src_R15B03-1-wx-wxe_gl.patch
Patch37: otp_src_R15B03-1-beam-ldflags.patch
Patch38: otp_src_R15B03-1-lib-stdlib-edlin.patch
Patch41: 0001-Handle-big-loadavg-values-correctly.patch
Patch42: 0002-Fix-reverting-of-implicit-funs.patch
Patch43: 0003-Fix-reverting-of-local-implicit-funs-in-erl_syntax.patch

Provides: erts = %erts_ver
Provides: %name-erts = %EVR
Provides: erts = %EVR
Provides: epmd = %EVR
Provides: %name-epmd = %EVR
Requires: %name-otp-base = %EVR
%{?_enable_sctp:Requires: lksctp-tools}

BuildRequires: rpm-macros-%name >= 0.13.0
BuildRequires: rpm-build-%name >= 0.12.0
BuildRequires: autoconf gcc-c++ flex
BuildRequires: fdupes diffutils
%{?_enable_shared_zlib:BuildRequires: zlib-devel}
%{?_enable_sctp:BuildRequires: lksctp-tools-devel}
%{?_enable_docs:BuildRequires: libxslt fop}
%{?_with_java:BuildRequires: java-devel >= 1.6.0}
%{?_with_ssl:BuildRequires: openssl-devel}
%{?_with_gmp:BuildRequires: gmp-devel}
%{?_with_termcap:BuildRequires: ncurses-devel}
%{?_with_libatomic_ops:BuildRequires: libatomic_ops-devel}
%{?_with_odbc:BuildRequires: unixODBC-devel}
%if_with wx
BuildRequires: pkgconfig(gl)
%if 0%{?suse_version} >= 1320
BuildRequires: wxWidgets-wxcontainer-devel >= 2.8.4
BuildConflicts: wxWidgets-wxcontainer-devel >= 2.9
%else
BuildRequires: wxGTK-devel >= 2.8.4
BuildConflicts: wxGTK-devel >= 2.9
%endif
%endif

%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 -n erts-devel
Summary: erts headers
Group: Development/Erlang
Requires: erts = %erts_ver
Provides: %name-erts-devel = %EVR

%description -n erts-devel
%summary.


%package -n liberts-devel-static
Summary: erts static libs
Group: Development/Erlang
# due glibc-devel-static
AutoReq: no
Requires: erts-devel = %erts_ver

%description -n liberts-devel-static
%summary.


%package -n erl_interface
Summary: Low level %Name interface to C
Group: Development/Erlang
Requires: %name-otp-base = %EVR

%description -n erl_interface
%summary.


%package devel
Summary: Libs and headers for devel for %Name
Group: Development/Languages/Other
Requires: erts-devel = %erts_ver
Requires: erl_interface = %EVR

%description devel
%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 contains Libs and headers for devel for %Name.


%package visual
Summary: Standard visual applications for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR
Requires: %name-appmon = %EVR
Requires: %name-debugger = %EVR
Requires: %name-dialyzer = %EVR
Requires: %name-et = %EVR
Requires: %name-gs = %EVR
Requires: %name-observer = %EVR
Requires: %name-pman = %EVR
Requires: %name-reltool = %EVR
Requires: %name-toolbar = %EVR
Requires: %name-tv = %EVR
Requires: %name-typer = %EVR
Requires: %name-wx = %EVR

%description visual
%summary.


%package visual-devel
Summary: Headers for standard visual apps for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-devel = %EVR

%description visual-devel
%summary.


%package otp-base
Summary: Base OTP libraries
Group: Development/Erlang
BuildArch: noarch
# due erlang_beam(hipe) and erlang_beam(crypto)
AutoReq: no
Provides: %name-compiler = %EVR
Provides: %name-erts = %EVR
Provides: %name-kernel = %EVR
Provides: %name-stdlib = %EVR
Provides: %name-otp-common = %EVR

%description otp-base
%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 contains Base Erlang/OTP libraries.


%package appmon
Summary: A utility used to supervise Applications executing on several %Name nodes
Group: Development/Erlang
BuildArch: noarch
Provides: appmon = %EVR
Requires: %name-otp-base = %EVR

%description appmon
%summary.


%package asn1
Summary: Support of Abstract Syntax Notation 1 (ASN.1) for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR
Requires: %name-asn1-driver = %EVR

%description asn1
%summary.


%package asn1-driver
Summary: Driver for %Name/OTP ASN.1
Group: Development/Erlang

%description asn1-driver
%summary.


%package crypto
Summary: Support cryptographical for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR
Requires: %name-crypto-driver = %EVR

%description crypto
%summary.


%package crypto-driver
Summary: Driver for %Name/OTP cryptographical support
Group: Development/Erlang

%description crypto-driver
%summary.


%package common_test
Summary: A portable framework for automatic testing %Name/OTP applications
Group: Development/Erlang
BuildArch: noarch
Provides: common_test = %EVR
Provides: %name-ct = %EVR
Provides: %name-common_test-devel = %EVR
Provides: common_test-devel = %EVR
Provides: %name-ct-devel = %EVR
Requires: %name-otp-base = %EVR
Requires: %name-test_server-devel = %EVR

%description common_test
%summary.


%package -n ct_run
Summary: Program used for starting %Name/OTP Common Test from the OS command line
Group: Development/Erlang
Requires: %name-common_test = %EVR

%description -n ct_run
%summary.


%package debugger
Summary: A debugger for debugging and testing of %Name programs
Group: Development/Erlang
BuildArch: noarch
# due gs/wx requires
AutoReq: no
Requires: %name-otp-base = %EVR
Requires: %name-gui = %EVR

%description debugger
%summary.


%package -n dialyzer
Summary: A DIscrepany AnaLYZer for ERlang programs
Group: Development/Erlang
Requires: %name-dialyzer = %EVR

%description -n dialyzer
DIALYZER, a DIscrepany AnaLYZer for ERlang programs.


%package dialyzer
Summary: A DIscrepany AnaLYZer for ERlang programs
Group: Development/Erlang
# due gs/wx requires
AutoReq: no
BuildArch: noarch
Requires: %name-otp-base = %EVR
Requires: %name-syntax_tools = %EVR
%{?_enabled_hipe:Requires: %name-hipe = %EVR}
Requires: %name-gui = %EVR

%description dialyzer
DIALYZER, a DIscrepany AnaLYZer for ERlang programs.


%package diameter
Summary: Diameter protocol implementation for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR

%description diameter
Diameter is an authentication, authorization and accounting protocol for computer
networks, and an alternative to RADIUS.
This package contains Diameter protocol implementation for %Name/OTP.


%package edoc
Summary: %Name/OTP utility used to generate documentation out of tags in source files
Group: Development/Erlang
BuildArch: noarch
Provides: edoc = %EVR
Requires: %name-otp-base = %EVR

%description edoc
%summary.


%package eldap
Summary: Erlang LDAP library
Group: Development/Erlang
BuildArch: noarch
Provides: eldap = %EVR
Requires: %name-otp-base = %EVR

%description eldap
%summary.


%package erl_docgen
Summary: erl_docgen of %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: erl_docgen = %EVR
Requires: %name-otp-base = %EVR

%description erl_docgen
%summary.


%package et
Summary: Event Tracer (ET), uses the built-in trace mechanism in %Name
Group: Development/Erlang
BuildArch: noarch
# due gs/wx requires
AutoReq: no
Provides: et = %EVR
Requires: %name-otp-base = %EVR
Requires: %name-runtime_tools = %EVR
Requires: %name-gui = %EVR

%description et
Event Tracer (ET), uses the built-in trace mechanism in %Name and provides tools
for collection and graphical viewing of trace data.


%package eunit
Summary: Support for unit testing of %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: eunit = %EVR
Provides: %name-eunit-devel = %EVR
Provides: eunit-devel = %EVR
Requires: %name-otp-base = %EVR

%description eunit
%summary.


%package gs
Summary: A Tk Graphics System %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: %name-gui = %EVR
Requires: %name-otp-base = %EVR

%description gs
A Tk Graphics System used to write platform independent user interfaces for
%Name/OTP.


%if_enabled hipe
%package hipe
Summary: Support of Abstract Syntax Notation 1 (ASN.1) for %Name/OTP
Group: Development/Erlang
Provides: hipe = %EVR
Requires: %name-otp-base = %EVR

%description hipe
%summary.


%package hipe_tool
Summary: hipe_tool module of %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: hipe_tool = %EVR
Requires: %name-hipe = %EVR

%description hipe_tool
%summary.
%endif


%package ic
Summary: orb Object Request Broker & IDL Applications for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: ic = %EVR
Requires: %name-otp-base = %EVR

%description ic
%summary.


%package inets
Summary: A set of services such as a Web server and a ftp client etc for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
# due mnesia requires
AutoReq: no
Provides: inets = %EVR
Requires: %name-otp-base = %EVR
Requires: %name-runtime_tools = %EVR
Requires: %name-ssl = %EVR

%description inets
%summary.


%package inviso
Summary: A trace tool for both development and delivered systems for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: inviso = %EVR
Requires: %name-otp-base = %EVR

%description inviso
%summary.


%if_with java
%package jinterface
Summary: %Name's level interface to Java
Group: Development/Erlang
BuildArch: noarch
Provides: jinterface = %EVR
Requires: %name-otp-base = %EVR

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


%package megaco
Summary: H.248 support for %Name
Group: Development/Erlang
BuildArch: noarch
Provides: megaco = %EVR
Requires: %name-megaco-driver = %EVR
Requires: %name-otp-base = %EVR

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


%package megaco-driver
Summary: H.248 support for %Name - drivers
Group: Development/Erlang
Provides: megaco-driver = %EVR

%description megaco-driver
Megaco (aka H.248) is a signalling protocol used in VoIP networks.
This package contains drivers for %Name/OTP Megaco files.


%package mnesia
Summary: %Name/OTP a heavy duty real-time distributed database
Group: Development/Erlang
BuildArch: noarch
Provides: mnesia = %EVR
Requires: %name-otp-base = %EVR

%description mnesia
%summary.


%package observer
Summary: Observer - tools for tracing and investigation of distributed systems %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: observer = %EVR
Provides: cdv = %EVR
Provides: etop = %EVR
Requires: %name-otp-base = %EVR

%description observer
Observer is a tools for tracing and investigation of distributed systems
%Name/OTP.


%package odbc
Summary: ODBC support for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR
Requires: %name-odbc-server = %EVR

%description odbc
%summary.


%package odbc-server
Summary: Server for %Name/OTP ODBC driver
Group: Development/Erlang

%description odbc-server
ODBC support for %Name programming language.
This package contains Server for %Name/OTP ODBC driver.


%package orber
Summary: A CORBA Object Request Broker for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: orber = %EVR
Provides: %name-cosEvent = %EVR
Provides: cosEvent = %EVR
Provides: %name-cosEventDomain = %EVR
Provides: cosEventDomain = %EVR
Provides: %name-cosFileTransfer = %EVR
Provides: cosFileTransfer = %EVR
Provides: %name-cosNotification = %EVR
Provides: cosNotification = %EVR
Provides: %name-cosProperty = %EVR
Provides: cosProperty = %EVR
Provides: %name-cosTime = %EVR
Provides: cosTime = %EVR
Provides: %name-cosTransactions = %EVR
Provides: cosTransactions = %EVR
Requires: %name-otp-base = %EVR

%description orber
%summary.


%package os_mon
Summary: A monitor which allows inspection of the underlying operating system for %Name/OTP
Group: Development/Erlang
Provides: os_mon = %EVR
Requires: %name-otp-base = %EVR

%description os_mon
%summary.


%package otp_mibs
Summary: SNMP management information base for %Name/OTP nodes
Group: Development/Erlang
BuildArch: noarch
Provides: otp_mibs = %EVR
Requires: %name-otp-base = %EVR

%description otp_mibs
%summary.


%package parsetools
Summary: A set of parsing and lexical analysis tools for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: parsetools = %EVR
Requires: %name-otp-base = %EVR

%description parsetools
%summary.


%package percept
Summary: A concurrency profiler tool for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: percept = %EVR
Requires: %name-otp-base = %EVR

%description percept
%summary.


%package pman
Summary: A graphical process manager used to inspect %Name processes
Group: Development/Erlang
BuildArch: noarch
Provides: pman = %EVR
Requires: %name-otp-base = %EVR

%description pman
%summary.


%package public_key
Summary: API to public key infrastructure for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: public_key = %EVR
Requires: %name-otp-base = %EVR

%description public_key
%summary.


%package reltool
Summary: A release management tool for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: reltool = %EVR
Requires: %name-otp-base = %EVR

%description reltool
Reltool is a release management tool. It analyses a given %Name/OTP installation
and determines various dependencies between applications. The graphical frontend
depicts the dependencies and enables interactive customization of a target
system. The backend provides a batch interface for generation of customized
target systems.


%package runtime_tools
Summary: Runtime tools, tools to include in a production system for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: runtime_tools = %EVR
Requires: %name-otp-base = %EVR
Requires: %name-runtime_tools-driver = %EVR

%description runtime_tools
%summary.


%package runtime_tools-driver
Summary: Driver for %Name/OTP runtime tools
Group: Development/Erlang
Provides: runtime_tools-driver = %EVR

%description runtime_tools-driver
%summary.


%package sasl
Summary: The System Architecture Support Libraries of %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR

%description sasl
The System Architecture Support Libraries is a set of tools for release upgrades
and alarm handling etc of %Name/OTP.


%package snmp
Summary: %Name/OTP Simple Network Management Protocol (SNMP) support
Group: Development/Erlang
BuildArch: noarch
Provides: snmp = %EVR
Requires: %name-otp-base = %EVR

%description snmp
%Name/OTP Simple Network Management Protocol (SNMP) support including a MIB
compiler and tools for creating SNMP agents.


%package ssh
Summary: Secure Shell application for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR

%description ssh
Secure Shell application with sftp and ssh support for %Name/OTP.


%package ssl
Summary: Secure Socket Layer for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR

%description ssl
%summary.


%package syntax_tools
Summary: A utility used to handle abstract Erlang syntax trees
Group: Development/Erlang
BuildArch: noarch
Provides: syntax_tools = %EVR
Requires: %name-otp-base = %EVR

%description syntax_tools
A utility used to handle abstract Erlang syntax trees, reading source files
differently, pretty-printing syntax trees.


%package test_server
Summary: An OTP Test Server
Group: Development/Erlang
BuildArch: noarch
Provides: test_server = %EVR
Requires: %name-otp-base = %EVR

%description test_server
%summary.


%package toolbar
Summary: A tool bar simplifying access to the %Name tools
Group: Development/Erlang
BuildArch: noarch
Provides: toolbar = %EVR
Requires: %name-otp-base = %EVR

%description toolbar
%summary.


%package tools
Summary: A set of programming tools including a coverage analyzer etc for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-base = %EVR
Requires: %name-tools-emem = %EVR

%description tools
%summary.


%package tools-emem
Summary: emem utility of %Name/OTP programming tools
Group: Development/Erlang
Provides: tools-emem = %EVR
Provides: emem = %EVR
Requires: %name-otp-base = %EVR

%description tools-emem
%summary.


%package tv
Summary: An ETS and MNESIA graphical table visualizer
Group: Development/Erlang
BuildArch: noarch
Provides: tv = %EVR
Requires: %name-otp-base = %EVR

%description tv
%summary.


%package typer
Summary: An %Name/OTP application that shows type information for %Name modules to the user
Group: Development/Erlang
# No noarch due bin/typer
#BuildArch: noarch
Provides: typer = %EVR
Requires: %name-otp-base = %EVR

%description typer
An %Name/OTP application that shows type information for %Name modules to the
user. Additionally, it can annotate the code of files with such type information.


%package webtool
Summary: A tool that simplifying the use of web based %Name/OTP tools
Group: Development/Erlang
BuildArch: noarch
Provides: webtool = %EVR
Requires: %name-otp-base = %EVR
Requires: %name-tools = %EVR

%description webtool
%summary.


%package wx
Summary: A wxWidgets Graphics System %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: wx = %EVR
Provides: %name-gui = %EVR
Requires: %name-otp-base = %EVR
Requires: %name-wx-driver = %EVR

%description wx
A wxWidgets Graphics System used to write platform independent user interfaces
for %Name/OTP.


%package wx-driver
Summary: Driver for wxWidgets Graphics System %Name/OTP
Group: Development/Erlang
Provides: wx-driver = %EVR

%description wx-driver
A wxWidgets Graphics System used to write platform independent user interfaces
for %Name/OTP.
This package contains driver for wx.


%package xmerl
Summary: XML 1.0 support for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: xmerl = %EVR
Requires: %name-otp-base = %EVR

%description xmerl
%summary.


%package examples
Summary: OTP examples
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp-full = %EVR
AutoProv: no
AutoReq: no

%description examples
OTP examples.


%package otp-base-devel
Summary: Base headers and libs for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: otp-base-devel = %EVR
Provides: %name-compiler-devel = %EVR
#Provides: compiler-devel = %EVR
Provides: %name-kernel-devel = %EVR
#Provides: kernel-devel = %EVR
Provides: %name-stdlib-devel = %EVR
#Provides: stdlib-devel = %EVR
Requires: %name-otp-base = %EVR

%description otp-base-devel
%summary.


%package otp-devel
Summary: Headers and libs for %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: otp-devel = %EVR
Provides: %name-appmon-devel = %EVR
Provides: appmon-devel = %EVR
Provides: %name-asn1-devel = %EVR
#Provides: asn1-devel = %EVR
Provides: %name-cosEvent-devel = %EVR
Provides: cosEvent-devel = %EVR
Provides: %name-cosEventDomain-devel = %EVR
Provides: cosEventDomain-devel = %EVR
Provides: %name-cosFileTransfer-devel = %EVR
Provides: cosFileTransfer-devel = %EVR
Provides: %name-cosNotification-devel = %EVR
Provides: cosNotification-devel = %EVR
Provides: %name-cosProperty-devel = %EVR
Provides: cosProperty-devel = %EVR
Provides: %name-cosTime-devel = %EVR
Provides: cosTime-devel = %EVR
Provides: %name-cosTransaction-devel = %EVR
Provides: cosTransaction-devel = %EVR
Provides: %name-debugger-devel = %EVR
#Provides: debugger-devel = %EVR
Provides: %name-dialyzer-devel = %EVR
Provides: dialyzer-devel = %EVR
Provides: %name-diameter-devel = %EVR
#Provides: diameter-devel = %EVR
Provides: %name-edoc-devel = %EVR
Provides: edoc-devel = %EVR
Provides: %name-et-devel = %EVR
Provides: et-devel = %EVR
Provides: %name-gs-devel = %EVR
#Provides: gs-devel = %EVR
%{?_enable_hipe:Provides: %name-hipe-devel = %EVR}
%{?_enable_hipe:Provides: hipe-devel = %EVR}
Provides: %name-ic-devel = %EVR
Provides: ic-devel = %EVR
Provides: %name-inets-devel = %EVR
Provides: inets-devel = %EVR
Provides: %name-megaco-devel = %EVR
Provides: megaco-devel = %EVR
Provides: %name-mnesia-devel = %EVR
Provides: mnesia-devel = %EVR
Provides: %name-observer-devel = %EVR
Provides: observer-devel = %EVR
Provides: %name-odbc-devel = %EVR
#Provides: odbc-devel = %EVR
Provides: %name-orber-devel = %EVR
Provides: orber-devel = %EVR
Provides: %name-os_mon-devel = %EVR
Provides: os_mon-devel = %EVR
Provides: %name-otp_mibs-devel = %EVR
Provides: otp_mibs-devel = %EVR
Provides: %name-parsetools-devel = %EVR
Provides: parsetools-devel = %EVR
Provides: %name-pman-devel = %EVR
Provides: pman-devel = %EVR
Provides: %name-public_key-devel = %EVR
Provides: public_key-devel = %EVR
Provides: %name-reltool-devel = %EVR
Provides: reltool-devel = %EVR
Provides: %name-runtime_tools-devel = %EVR
Provides: runtime_tools-devel = %EVR
Provides: %name-sasl-devel = %EVR
#Provides: sasl-devel = %EVR
Provides: %name-snmp-devel = %EVR
Provides: snmp-devel = %EVR
Provides: %name-ssh-devel = %EVR
#Provides: ssh-devel = %EVR
Provides: %name-ssl-devel = %EVR
#Provides: ssl-devel = %EVR
Provides: %name-test_server-devel = %EVR
Provides: test_server-devel = %EVR
Provides: %name-toolbar-devel = %EVR
Provides: toolbar-devel = %EVR
Provides: %name-tools-devel = %EVR
#Provides: tools-devel = %EVR
Provides: %name-tv-devel = %EVR
Provides: tv-devel = %EVR
Provides: %name-wx-devel = %EVR
Provides: wx-devel = %EVR
Provides: %name-xmerl-devel = %EVR
Provides: xmerl-devel = %EVR
Requires: %name-parsetools = %EVR
Requires: %name-otp-base-devel = %EVR
Requires: %name-eunit-devel = %EVR
Requires: %name-common_test-devel = %EVR

%description otp-devel
%summary.


%package otp
Summary: Standard %Name/OTP
Group: Development/Erlang
BuildArch: noarch
Provides: otp = %EVR
Requires: %name-otp-base = %EVR
Requires: %name-asn1 = %EVR
Requires: %name-crypto = %EVR
Requires: %name-diameter = %EVR
Requires: %name-edoc = %EVR
Requires: %name-eunit = %EVR
Requires: %name-eldap = %EVR
%{?_enable_hipe:Requires: %name-hipe = %EVR}
Requires: %name-ic = %EVR
Requires: %name-inets = %EVR
Requires: %name-inviso = %EVR
Requires: %name-mnesia = %EVR
Requires: %name-observer = %EVR
Requires: %name-orber = %EVR
Requires: %name-os_mon = %EVR
Requires: %name-otp_mibs = %EVR
Requires: %name-parsetools = %EVR
Requires: %name-percept = %EVR
Requires: %name-public_key = %EVR
Requires: %name-runtime_tools = %EVR
Requires: %name-sasl = %EVR
Requires: %name-snmp = %EVR
Requires: %name-ssh = %EVR
Requires: %name-ssl = %EVR
Requires: %name-syntax_tools = %EVR
Requires: %name-test_server = %EVR
Requires: %name-tools = %EVR
Requires: %name-webtool = %EVR
Requires: %name-xmerl = %EVR

%description otp
Standard %Name/OTP.


%package otp-full
Summary: Full %Name/OTP package
Group: Development/Erlang
BuildArch: noarch
Requires: %name-otp = %EVR
Requires: %name-megaco = %EVR
Requires: %name-odbc = %EVR
Requires: %name-visual = %EVR
Requires: %name-common_test = %EVR

%description otp-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.


%package full
Summary: Full %Name/OTP package
Group: Development/Erlang
BuildArch: noarch
Requires: %name = %EVR
Requires: %name-otp-full = %EVR
Requires: %name-examples = %EVR
%{?_with_java:Requires: %name-jinterface = %EVR}

%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_enabled docs
%package man
Summary: Man pages for %Name/OTP
Group: Development/Documentation
BuildArch: noarch
AutoReq: no
AutoProv: no

%description man
%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 contains man pages for %Name.


%package doc-html
Summary: Documentation for %Name/OTP in HTML format
Group: Documentation/HTML
BuildArch: noarch
AutoReq: no
AutoProv: no

%description doc-html
%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 contains documentation for %Name/OTP in HTML format.


%package doc-pdf
Summary: Documentation for %Name/OTP in PDF format
Group: Documentation/Other
BuildArch: noarch
AutoReq: no
AutoProv: no

%description doc-pdf
%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 contains documentation for %Name/OTP in PDF format.
%endif


%prep
%setup -q -n otp_src_%ver
%patch0 -p1
%patch1 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch20 -p1
#patch21 -p1
#patch22 -p1
#patch23 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1

# Can't parallel build  these dirs yet :(
#sed -i '/^bootstrap_setup_target:/s|:| $(BOOTSTRAP_ROOT)/bootstrap/target:|' Makefile.in
#sed -i '/^include .*\/make\/otp_subdir.mk/iMAKEFLAGS += -j1' system/doc/Makefile
echo ".NOTPARALLEL:" >> system/doc/Makefile
sed -i '/^SUB_DIRECTORIES =/aexamples/pre_post_condition: src' lib/ic/Makefile
sed -i '/^SUB_DIRECTORIES =/asrc: asn1' lib/public_key/Makefile
cat >> lib/diameter/src/subdirs.mk <<__EOF__


app: compiler
__EOF__
cat >> lib/snmp/subdirs.mk <<__EOF__
mibs: src/compile
src examples: mibs
__EOF__

sed -i -r 's/ -Wmissing-(prototypes|declarations)//g' {erts,lib/erl_interface}/configure.in

cat > bin/javac.sh <<__EOF__
#!/bin/sh
exec javac \${JAVA_TARGET:+-target \$JAVA_TARGET -source \$JAVA_TARGET} "\$@"
__EOF__
chmod 0755 bin/javac.sh


%build
%define _optlevel 2
%if %(echo "int main() {return 0;}" | gcc -c -flto -o /dev/null -xc - 2>/dev/null; echo $?) == 0
%add_optflags -flto -ffat-lto-objects
export BEAMLDFLAGS="-flto%{?_smp_mflags:$(echo %_smp_mflags | tr -d - | tr j =)} -O%_optlevel"
%else
export BEAMLDFLAGS="-O%_optlevel"
%endif
%{?_enable_asm_optimize:%add_optflags -DASM_OPTIMIZE}
%define eoptflags %{?_with_otp_debug:+debug_info} %{?_with_otp_native:+native +'{hipe,[o%_optlevel]}'}
./otp_build autoconf
export PATH=$PWD/bin:$PATH
%{?java_target:export JAVA_TARGET=%java_target}
%configure \
	--libdir=%_prefix/lib \
	%{subst_enable threads} \
	%{subst_enable_to smp smp-support} \
	%{subst_enable_to native_libs native-libs} \
	%{subst_enable_to halfword halfword-emulator} \
	%{subst_enable kernel_poll kernel-poll} \
	%{subst_enable hipe} \
	%{subst_enable_to megaco_flex_scanner_lineno megaco-flex-scanner-lineno} \
	%{subst_enable_to shared_zlib shared-zlib} \
	%{subst_with ssl} \
	--enable-dynamic-ssl-lib \
	%{subst_with_to ssl_zlib ssl-zlib} \
	%{subst_with termcap} \
	%{subst_with gmp} \
	%{subst_with libatomic_ops} \
	%{subst_enable sctp} \
	%{subst_enable tsp} \
	%{subst_enable_to lock_checking lock-checking} \
	%{subst_enable_to lock_counting lock-counting} \
	%{subst_enable_to clock_gettime clock-gettime} \
	%{subst_with odbc} \
	%{subst_with wx} \
	--without-perfctr \
	--with-javac=javac.sh \
	--enable-dynamic-ssl-lib \
	--enable-prefer-gcc-native-ethr-impls

# FIXME!
# Remove debug flags
sed -i '/^WX_LIBS[[:blank:]]/,/^endif[[:blank:]]*$/s/ -g / /g' lib/wx/c_src/Makefile
export ERL_LIBS=$PWD/lib ERL_COMPILE_FLAGS="%eoptflags"
%make_build OPT_LEVEL="-O%_optlevel" ERL_LIBS=$ERL_LIBS depend emulator bootstrap_setup libs local_setup

# skip Windows-specific modules
sed -i '/win32reg/d' lib/stdlib/ebin/stdlib.app
sed -i 's/,[[:blank:]]*nteventlog//' lib/os_mon/ebin/os_mon.app

%{?_enable_docs:%make_build docs release_docs}


%install
install -d -m 0755 %buildroot%_docdir/%name
export ERL_LIBS=%buildroot%_otpdir/lib
%make_install \
%if_enabled docs
	PATH=$PWD/bin:$PATH install-docs
mv %buildroot%_otpdir/{COPYRIGHT,PR.template,README} %buildroot%_docdir/%name/
gzip -9nf %buildroot%_erlmandir/man?/*
install -d -m 0755 %buildroot{%_mandir/man{1,3,4,6,7},%_docdir/%name/{pdf,html/lib}}
mv %buildroot{%_otpdir/{doc,erts-*/doc,lib/*/doc}/pdf/*.pdf,%_docdir/%name/pdf/}
rmdir %buildroot{%_erldocdir,%_otpdir/erts-*/doc,%_otplibdir/*/doc}/pdf
for i in %buildroot%_erldocdir/*; do
	ln -sf ${i#%buildroot} %buildroot%_docdir/%name/html/
done
ln -sf $(ls -d %buildroot%_otpdir/erts-*/doc/html | sed 's|^%buildroot||') %buildroot%_docdir/%name/html/erts
for i in %buildroot%_otplibdir/*/doc/html; do
	ln -sf ${i#%buildroot} %buildroot%_docdir/%name/html/lib/$(basename ${i%%/doc/html})
done
for i in %buildroot%_erlmandir/man3/*; do
	ln -sf ${i#%buildroot} %buildroot%_mandir/man3/$(basename $i .gz)erl.gz
done
for n in 1 4 6 7; do
	for i in %buildroot%_erlmandir/man$n/*; do
		ln -sf ${i#%buildroot} %buildroot%_mandir/man$n/
	done
done
%endif

ls -d %buildroot%_otplibdir/* | grep -v '^%buildroot%_otplibdir/erl_interface-.*' | while read i; do
	if [ -d $i/src ]; then
		H=$(find $i/src -type f -name '*.hrl' | grep -v '.*_internal\.hrl$') ||:
		if [ -n "$H" ]; then
			[ -d $i/include ] || install -d -m 0755 $i/include
			mv $H $i/include/
			for n in $H; do
				ln -sf ${i#%buildroot}/include/$(basename $n) $n
			done
			find $i/src/* -not -type l -not -type d -delete
		else
			rm -rf $i/src
		fi
	fi
done
rm -f %buildroot%_otplibdir/erl_interface-*/src/{INSTALL,Makefile*,*.mk,*/*.c}
rm -rf %buildroot%_otpdir/{lib/*/{{c,java}_src,*.mk,priv/obj},erts-*/src}
rm -f %buildroot%_otplibdir/*/*/*.{asn1,erl}
rm -f %buildroot%_otplibdir/orber-*/COSS/CosNaming/*.{erl,idl}
rm -rf %buildroot%_otplibdir/orber-*/priv/{src,include}
rm -f %buildroot%_otplibdir/*/priv/bin/*.bat
rm -f %buildroot%_otplibdir/*/priv/*.in
rm -f %buildroot%_otplibdir/*/info
find %buildroot%_otpdir -type f -name '*.src' -delete
find %buildroot%_otpdir -empty -delete
# Remove internal libs and headers
rm -rf %buildroot%_otpdir/erts-*/{lib,include}/internal
cmp -s %buildroot%_otpdir/erts-*/lib/liberts.a %buildroot%_otpdir/erts-*/lib/liberts_r.a && ln -sf liberts.a %buildroot%_otpdir/erts-*/lib/liberts_r.a
rm -rf %buildroot%_otpdir/usr/include
install -d -m 0755 %buildroot%_includedir
i="$(ls -d %buildroot%_otpdir/erts-*/include | sed 's|^%buildroot||')"
ln -sf "$i" %buildroot%_otpdir/usr/
ln -sf "$i" %buildroot%_includedir/%name

install -m 0644 AUTHORS EPLICENCE %buildroot%_docdir/%name/

install -d -m 0755 %buildroot%_otpdir/usr/make
install -m 0644 make/*.mk %buildroot%_otpdir/usr/make/
install -m 0755 make/{make_emakefile,save_args} %buildroot%_otpdir/usr/make/
for i in make/*/*.mk; do
	install -D -m 0644 $i %buildroot%_otpdir/usr/$i
	ln -s ${i#make/} %buildroot%_otpdir/usr/make/$(basename $i)
done

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

sed -i 's|%buildroot||' %buildroot%_otpdir/{{,erts-*/}bin/{erl,start},releases/RELEASES}

sed 's|^ROOTDIR=|&%buildroot|' %buildroot%_otpdir/bin/erl > erl.buildroot
chmod 755 erl.buildroot
%define __erlang %_builddir/%buildsubdir/erl.buildroot
%define __erlc env ERLC_EMULATOR=%__erlang %buildroot%_otpdir/bin/erlc
%define __escript env ESCRIPT_EMULATOR=%__erlang %buildroot%_otpdir/bin/escript

for i in ct_run dialyzer erl erlc escript run_erl start to_erl typer; do
	ln -sf %_otpdir/erts-%erts_ver/bin/$i %buildroot%_otpdir/bin/
done
ls %buildroot%_otplibdir/snmp-*/bin/* | while read i; do
	ln -sf ${i#%buildroot} %buildroot%_otpdir/bin/
done
ln -sf %_otpdir/bin/snmpc %buildroot%_bindir/
ln -sf $(ls %buildroot%_otplibdir/diameter-*/bin/diameterc | sed 's|^%buildroot||') %buildroot%_otpdir/bin/diameter_compile
ln -sf %_otpdir/bin/diameter_compile %buildroot%_bindir/
ln -sf $(ls %buildroot%_otplibdir/webtool-*/priv/bin/start_webtool | sed 's|^%buildroot||') %buildroot%_otpdir/bin/
ln -sf %_otpdir/bin/start_webtool %buildroot%_bindir/
ls %buildroot%_otplibdir/observer-*/priv/bin/* | while read i; do
	ln -sf ${i#%buildroot} %buildroot%_otpdir/bin/
done
for i in cdv etop getop; do
	ln -sf %_otpdir/bin/$i %buildroot%_bindir/
done
mv %buildroot%_otplibdir/erl_interface-*/bin/erl_call %buildroot%_otpdir/bin/
ln -sf %_otpdir/bin/erl_call %buildroot%_bindir/
rmdir %buildroot%_otplibdir/erl_interface-*/bin

install -d -m 0755 %buildroot%_otpdir/erts-%erts_ver/example
install -m 0644 erts/example/* %buildroot%_otpdir/erts-%erts_ver/example/

install -d -m 0755 %buildroot%_datadir/pixmaps
ln -f %buildroot%_otplibdir/edoc-*/priv/%name.png %buildroot%_datadir/pixmaps/

%fdupes %buildroot%_otpdir

%{?_enable_strip_beam:%__erlang -noshell -run beam_lib strip_release %buildroot%_otpdir -run init stop}

# skip Windows-specific modules
%add_erlang_req_beam_skiplist win32reg nteventlog
# skip hipe modules
%add_erlang_req_beam_skiplist hipe

%disable_strip_erlang_beam


%files
%defattr(-,root,root)
%dir %_otpdir
%dir %_otpdir/erts-*
%dir %_otpdir/erts-*/bin
%dir %_otpdir/bin
%dir %_docdir/%name
%_docdir/%name/EPLICENCE
%_docdir/%name/AUTHORS
%_otpdir/releases
%_otpdir/erts-*/bin/beam*
%_otpdir/erts-*/bin/child_setup
%_otpdir/erts-*/bin/epmd
%_otpdir/erts-*/bin/erl*
%_otpdir/erts-*/bin/escript
%_otpdir/erts-*/bin/heart
%_otpdir/erts-*/bin/inet_gethost
%_otpdir/erts-*/bin/start
%_otpdir/erts-*/bin/*_erl
%_otpdir/bin/epmd
%_otpdir/bin/erl*
%_otpdir/bin/escript
%_otpdir/bin/run_erl
%_otpdir/bin/start*
%exclude %_otpdir/bin/start_webtool
%_otpdir/bin/to_erl
%_bindir/epmd
%_bindir/erl*
%_bindir/escript
%_bindir/*_erl
%if_enabled docs
%_docdir/%name/COPYRIGHT
%_docdir/%name/PR.template
%_docdir/%name/README
%_otpdir/erts-*/info
%dir %_erlmandir
%dir %_erlmandir/man1
%dir %_erlmandir/man4
%_erlmandir/man1/epmd.*
%_erlmandir/man1/erl*
%_erlmandir/man1/escript.*
%_erlmandir/man1/run_erl.*
%_erlmandir/man1/start.*
%_mandir/man1/epmd.*
%_mandir/man1/erl*
%_mandir/man1/escript.*
%_mandir/man1/run_erl.*
%_mandir/man1/start.*
%_erlmandir/man4/script.*
%_mandir/man4/script.*
%exclude %_erlmandir/man1/erlsrv.*
%exclude %_erlmandir/man1/start_erl.*
%exclude %_erlmandir/man1/werl.*
%exclude %_mandir/man1/erlsrv.*
%exclude %_mandir/man1/start_erl.*
%exclude %_mandir/man1/werl.*
%endif


%files -n erts-devel
%defattr(-,root,root)
%_otpdir/erts-*/include
%_otpdir/usr
%_includedir/%name
%exclude %_otpdir/usr/make/make_emakefile


%files -n liberts-devel-static
%defattr(-,root,root)
%_otpdir/erts-*/lib


%files -n erl_interface
%defattr(-,root,root)
%_otplibdir/erl_interface-*
%exclude_doc


%files devel


%files otp-base
%defattr(-,root,root)
%dir %_otpdir
%dir %_otplibdir
%_otplibdir/compiler-*
%_otplibdir/erts-*
%_otplibdir/kernel-*
%_otplibdir/stdlib-*
%if_enabled docs
%dir %_erlmandir
%dir %_erlmandir/man4
%dir %_erlmandir/man6
%_erlmandir/man6/kernel.*
%_erlmandir/man6/stdlib.*
%_mandir/man6/kernel.*
%_mandir/man6/stdlib.*
%_erlmandir/man4/app*
%_erlmandir/man4/config.*
%_erlmandir/man4/rel*
%_mandir/man4/app*
%_mandir/man4/config.*
%_mandir/man4/rel*
%endif
%_datadir/pixmaps/%name.png
%exclude_examples
%exclude_inc
%exclude_doc
# Windows
%exclude %_otplibdir/stdlib-*/ebin/win32*


%files otp-base-devel
%defattr(-,root,root)
%_otplibdir/compiler-*/include
%_otplibdir/compiler-*/src
%_otplibdir/kernel-*/include
%_otplibdir/kernel-*/src
%_otplibdir/stdlib-*/include
%_otplibdir/stdlib-*/src


%files otp-devel
%defattr(-,root,root)
%_otplibdir/*/include
%_otplibdir/*/src
%_otplibdir/hipe-*/cerl
%_otplibdir/hipe-*/flow
%_otplibdir/hipe-*/icode
%_otplibdir/hipe-*/main
%_otplibdir/hipe-*/misc
%_otplibdir/hipe-*/rtl
%_otplibdir/orber-*/COSS
%_otplibdir/public_key-*/asn1
%exclude %_otplibdir/compiler-*
%exclude %_otplibdir/kernel-*
%exclude %_otplibdir/stdlib-*
%exclude %_otplibdir/erl_interface-*/include
%exclude %_otplibdir/erl_interface-*/src
%exclude %_otplibdir/eunit-*/include
%exclude %_otplibdir/common_test-*/include
%exclude %_otplibdir/common_test-*/src


%files otp


%files visual-devel


%files visual


%files asn1
%defattr(-,root,root)
%_otplibdir/asn1-*
%exclude %_otplibdir/asn1-*/priv/lib
%exclude_examples
%exclude_inc
%exclude_doc


%files asn1-driver
%defattr(-,root,root)
%dir %_otplibdir/asn1-*
%dir %_otplibdir/asn1-*/priv
%_otplibdir/asn1-*/priv/lib


%files appmon
%defattr(-,root,root)
%_otplibdir/appmon-*/*
%exclude_inc
%exclude_doc


%files crypto
%defattr(-,root,root)
%_otplibdir/crypto-*
%if_enabled docs
%_erlmandir/man6/crypto.*
%_mandir/man6/crypto.*
%endif
%exclude %_otplibdir/crypto-*/priv
%exclude_doc


%files crypto-driver
%defattr(-,root,root)
%dir %_otplibdir/crypto-*
%dir %_otplibdir/crypto-*/priv
%_otplibdir/crypto-*/priv/lib


%files common_test
%defattr(-,root,root)
%_otplibdir/common_test-*
%if_enabled docs
%dir %_erlmandir/man6
%_erlmandir/man6/common_test.*
%_mandir/man6/common_test.*
%endif
%exclude_doc


%files -n ct_run
%defattr(-,root,root)
%_bindir/ct_run
%_bindir/run_test
%_otpdir/bin/ct_run
%_otpdir/bin/run_test
%_otpdir/erts-*/bin/ct_run
%if_enabled docs
%_erlmandir/man1/ct_run.*
%_mandir/man1/ct_run.*
%endif


%files debugger
%defattr(-,root,root)
%_otplibdir/debugger-*
%exclude_inc
%exclude_doc


%files -n dialyzer
%defattr(-,root,root)
%_bindir/dialyzer
%_otpdir/erts-*/bin/dialyzer
%_otpdir/bin/dialyzer


%files dialyzer
%defattr(-,root,root)
%_otplibdir/dialyzer-*
%exclude_inc
%exclude_doc


%files diameter
%defattr(-,root,root)
%_bindir/diameter_compile
%_otpdir/bin/diameter_compile
%_otplibdir/diameter-*
%exclude_examples
%exclude_inc
%exclude_doc
%if_enabled docs
%_erlmandir/man1/diameter_compile.*
%_erlmandir/man4/diameter_dict.*
%_mandir/man1/diameter_compile.*
%_mandir/man4/diameter_dict.*
%endif


%files eldap
%defattr(-,root,root)
%_otplibdir/eldap-*
%exclude_inc
%exclude_doc


%files edoc
%defattr(-,root,root)
%_otplibdir/edoc-*
%exclude_inc
%exclude_doc


%files erl_docgen
%defattr(-,root,root)
%_otplibdir/erl_docgen-*
%if_enabled docs
%dir %_erlmandir/man6
%_erlmandir/man6/erl_docgen.*
%_mandir/man6/erl_docgen.*
%endif
%exclude_doc


%files et
%defattr(-,root,root)
%_otplibdir/et-*
%_otplibdir/observer-*/ebin/ttb_et.*
%exclude_inc
%exclude_doc


%files eunit
%defattr(-,root,root)
%_otplibdir/eunit-*
%exclude_examples
%exclude_doc


%files gs
%defattr(-,root,root)
%_otplibdir/gs-*
%exclude_examples
%exclude_inc
%exclude_doc
%exclude %_otplibdir/gs-*/contribs


%if_enabled hipe
%files hipe
%defattr(-,root,root)
%dir %_otplibdir/hipe-*
%_otplibdir/hipe-*/ebin
%exclude %_otplibdir/hipe-*/ebin/hipe_tool*
%exclude_doc


%files hipe_tool
%defattr(-,root,root)
%_otplibdir/hipe-*/ebin/hipe_tool*
%endif


%files inets
%defattr(-,root,root)
%_otplibdir/inets-*
%exclude_examples
%exclude_inc
%exclude_doc


%files ic
%defattr(-,root,root)
%_otplibdir/ic-*
%exclude %_otplibdir/ic-*/priv/lib
%exclude_examples
%exclude_inc
%exclude_doc


%files inviso
%defattr(-,root,root)
%_otplibdir/inviso-*
%exclude_doc


%if_with java
%files jinterface
%defattr(-,root,root)
%dir %_otplibdir/jinterface-*
%_otplibdir/jinterface-*/priv
%exclude_doc
%endif


%files megaco
%defattr(-,root,root)
%_otplibdir/megaco-*
%exclude %_otplibdir/megaco-*/priv/lib
%exclude_examples
%exclude_inc
%exclude_doc


%files megaco-driver
%defattr(-,root,root)
%dir %_otplibdir/megaco-*
%dir %_otplibdir/megaco-*/priv
%_otplibdir/megaco-*/priv/lib


%files mnesia
%defattr(-,root,root)
%_otplibdir/mnesia-*
%exclude_examples
%exclude_inc
%exclude_doc


%files observer
%defattr(-,root,root)
%_bindir/cdv
%_bindir/etop
%_bindir/getop
%_otpdir/bin/cdv
%_otpdir/bin/etop
%_otpdir/bin/getop
%_otplibdir/observer-*
%exclude %_otplibdir/observer-*/ebin/ttb_et.*
%if_enabled docs
%dir %_erlmandir/man6
%_erlmandir/man6/observer.*
%_mandir/man6/observer.*
%endif
%exclude_inc
%exclude_doc


%files odbc
%defattr(-,root,root)
%_otplibdir/odbc-*
%exclude %_otplibdir/odbc-*/priv/bin
%exclude_inc
%exclude_doc


%files odbc-server
%defattr(-,root,root)
%dir %_otplibdir/odbc-*
%dir %_otplibdir/odbc-*/priv
%_otplibdir/odbc-*/priv/bin
%exclude_doc


%files orber
%defattr(-,root,root)
%_otplibdir/cos*-*
%_otplibdir/orber-*
%exclude %_otplibdir/orber-*/COSS
%exclude_examples
%exclude_inc
%exclude_doc


%files os_mon
%defattr(-,root,root)
%_otplibdir/os_mon-*
%if_enabled docs
%dir %_erlmandir/man6
%_erlmandir/man6/os_mon.*
%_mandir/man6/os_mon.*
%endif
%exclude_inc
%exclude_doc
# Windows
%exclude %_otplibdir/os_mon-*/ebin/nteventlog*


%files otp_mibs
%defattr(-,root,root)
%_otplibdir/otp_mibs-*
%exclude_inc
%exclude_doc


%files parsetools
%defattr(-,root,root)
%_otplibdir/parsetools-*
%exclude %_otplibdir/*/include
%exclude_doc


%files percept
%defattr(-,root,root)
%_otplibdir/percept-*
%exclude_doc


%files pman
%defattr(-,root,root)
%_otplibdir/pman-*
%exclude_inc
%exclude_doc


%files public_key
%defattr(-,root,root)
%_otplibdir/public_key-*
%exclude %_otplibdir/public_key-*/asn1
%exclude %_otplibdir/*/include
%exclude_doc


%files reltool
%defattr(-,root,root)
%_otplibdir/reltool-*
%exclude_examples
%exclude_inc
%exclude_doc


%files runtime_tools
%defattr(-,root,root)
%_otplibdir/runtime_tools-*
%exclude %_otplibdir/*/priv/lib
%exclude %_otplibdir/*/include
%if_enabled docs
%dir %_erlmandir/man6
%_erlmandir/man6/runtime_tools.*
%_mandir/man6/runtime_tools.*
%endif
%exclude_doc
%exclude_examples


%files runtime_tools-driver
%defattr(-,root,root)
%dir %_otplibdir/runtime_tools-*
%dir %_otplibdir/runtime_tools-*/priv
%_otplibdir/runtime_tools-*/priv/lib


%files sasl
%defattr(-,root,root)
%_otplibdir/sasl-*
%exclude_examples
%if_enabled docs
%dir %_erlmandir/man6
%_erlmandir/man6/sasl.*
%_mandir/man6/sasl.*
%endif
%exclude_inc
%exclude_doc


%files snmp
%defattr(-,root,root)
%_bindir/snmpc
%_otpdir/bin/snmpc
%_otplibdir/snmp-*
%exclude_examples
%exclude_inc
%exclude_doc
%if_enabled docs
%_erlmandir/man1/snmpc.*
%_mandir/man1/snmpc.*
%dir %_erlmandir/man6
%_erlmandir/man6/snmp.*
%_mandir/man6/snmp.*
%_erlmandir/man7
%_mandir/man7/*
%endif


%files ssh
%defattr(-,root,root)
%_otplibdir/ssh-*
%exclude_inc
%exclude_doc


%files ssl
%defattr(-,root,root)
%_otplibdir/ssl-*
%exclude_examples
%if_enabled docs
%dir %_erlmandir/man6
%_erlmandir/man6/ssl.*
%_mandir/man6/ssl.*
%endif
%exclude_inc
%exclude_doc


%files syntax_tools
%defattr(-,root,root)
%_otplibdir/syntax_tools-*
%exclude_doc


%files test_server
%defattr(-,root,root)
%_otplibdir/test_server-*
%if_enabled docs
%dir %_erlmandir/man6
%_erlmandir/man6/test_server.*
%_mandir/man6/test_server.*
%endif
%exclude_inc
%exclude_doc


%files toolbar
%defattr(-,root,root)
%_otplibdir/toolbar-*
%exclude_inc
%exclude_doc


%files tools
%defattr(-,root,root)
%_otplibdir/tools-*
%exclude %_otplibdir/tools-*/ebin/cover_web*
%exclude %_otplibdir/tools-*/bin
%exclude_inc
%exclude_doc


%files tools-emem
%defattr(-,root,root)
%dir %_otplibdir/tools-*
%_otplibdir/tools-*/bin


%files tv
%defattr(-,root,root)
%_otplibdir/tv-*
%exclude_inc
%exclude_doc


%files typer
%defattr(-,root,root)
%_bindir/typer*
%_otpdir/erts-*/bin/typer
%_otpdir/bin/typer
%_otplibdir/typer-*
%exclude_doc


%files webtool
%defattr(-,root,root)
%_otpdir/bin/start_webtool
%_bindir/start_webtool
%_otplibdir/webtool-*
%_otplibdir/tools-*/ebin/cover_web*
%if_enabled docs
%_erlmandir/man1/start_webtool.*
%_mandir/man1/start_webtool.*
%endif
%exclude_doc


%files wx
%defattr(-,root,root)
%_otplibdir/wx-*
%exclude %_otplibdir/wx-*/priv/lib
%exclude_examples
%exclude_inc
%exclude_doc


%files wx-driver
%defattr(-,root,root)
%dir %_otplibdir/wx-*
%dir %_otplibdir/wx-*/priv
%_otplibdir/wx-*/priv/lib


%files xmerl
%defattr(-,root,root)
%_otplibdir/xmerl-*
%exclude_inc
%exclude_doc


%files examples
%defattr(-,root,root)
%_otpdir/erts-*/example
%_otplibdir/*/examples
%_otplibdir/*/contribs


%files otp-full


%files full


%if_enabled docs
%files man
%defattr(-,root,root)
%dir %_erldir
%dir %_erlmandir
%_erlmandir/man3
%_mandir/man3/*
%exclude %_erlmandir/man4/diameter_dict.*
%exclude %_mandir/man4/diameter_dict.*
# Windows
%exclude %_erlmandir/man3/win32*
%exclude %_mandir/man3/win32*
%exclude %_erlmandir/man3/nteventlog.*
%exclude %_mandir/man3/nteventlog.*



%files doc-pdf
%defattr(-,root,root)
%doc %dir %_docdir/%name
%doc %_docdir/%name/pdf


%files doc-html
%defattr(-,root,root)
%doc %_docdir/%name/html
%doc %_erldocdir
%doc %dir %_otpdir/erts-*
%doc %dir %_otplibdir/*/doc
%doc %_otpdir/erts-*/doc
%doc %dir %_otplibdir/*
%exclude %_otplibdir/erts-*
%doc %_otplibdir/*/doc/*
# Windows
%exclude %_otpdir/erts-*/doc/html/erlsrv.*
%exclude %_otpdir/erts-*/doc/html/start_erl.*
%exclude %_otpdir/erts-*/doc/html/werl.*
%endif


%changelog
* Fri Aug 25 2017 Led <ledest@gmail.com> R15B03-34
- update BuildRequires

* Fri Aug 19 2016 Led <ledest@gmail.com> R15B03-33
- disable patches:
  + otp_src_R15B03-1-erts-ctype.patch
  + otp_src_R15B03-1-compiler-printable.patch
  + otp_src_R15B03-1-io_lib-printable.patch

* Tue May 10 2016 Led <ledest@gmail.com> R15B03-32
- add %%name-otp-devel requires %%name-parsetools

* Sun Feb 14 2016 Led <ledest@gmail.com> R15B03-31
- fix docs symlinks

* Tue Feb 09 2016 Led <ledest@gmail.com> R15B03-30
- add -ffat-lto-objects to %%optflags

* Fri Feb 05 2016 Led <ledest@gmail.com> R15B03-29
- update for new rpm-build-erlang

* Thu Feb 05 2016 Led <ledest@gmail.com> R15B03-28
- provide epmd

* Thu Sep 10 2015 Led <ledest@gmail.com> R15B03-27
- add patches:
  + 0002-Fix-reverting-of-implicit-funs.patch
  + 0003-Fix-reverting-of-local-implicit-funs-in-erl_syntax.patch

* Tue Aug 18 2015 Led <ledest@gmail.com> R15B03-26
- clean ups
- check of '-flto' support
- fix %%files of erlang-crypto subpackage

* Sun Aug 02 2015 Led <ledest@gmail.com> R15B03-25
- move appmon_info from erlang-otp-base to erlang-appmon
- fix BuildRequires

* Tue Jul 21 2015 Led <ledest@gmail.com> R15B03-24
- remove build deps of symlinks

* Thu Jul 09 2015 Led <ledest@gmail.com> R15B03-23
- add erlang.png to erlang-otp-base subpackage

* Sat Jun 20 2015 Led <ledest@gmail.com> R15B03-22
- move eunit headers from erlang-otp-devel to erlang-eunit
- add subpackages:
  %%name-crypto
  %%name-otp-base-devel
- move crypto modules to separate subpackages
- clean up BuildRequires
- move common_test headers from erlang-otp-devel to erlang-common_test
- remove noarch tag of erts-devel subpackage
- format descriptions
- remove win32reg and nteventlog entries in *.app
- fix "warning: File listed twice: ..."

* Fri Jun 19 2015 Led <ledest@gmail.com> R15B03-21
- fix %%files sections

* Sun Apr 05 2015 Led <ledest@gmail.com> R15B03-20
- fix %%files sections

* Thu Apr 02 2015 Led <ledest@gmail.com> R15B03-19
- remove noarch tag of erlang-hipe subpackage

* Mon Mar 23 2015 Led <ledest@gmail.com> R15B03-18
- add patches:
  + 0001-Handle-big-loadavg-values-correctly.patch

* Mon Feb 23 2015 Led <ledest@gmail.com> R15B03-17
- added patches:
  + otp_src_R15B03-1-lib-stdlib-edlin.patch

* Sat Feb 21 2015 Led <ledest@gmail.com> R15B03-16
- observer: add etop and cdv to binary directories
- really don't pack nteventlog module
- fixed changelog

* Wed Feb 18 2015 Led <ledest@gmail.com> R15B03-15
- don't pack nteventlog module

* Sun Feb 15 2015 Led <ledest@gmail.com> R15B03-14
- spec: cosmetic fixes

* Sun Feb 15 2015 Led <ledest@gmail.com> R15B03-13
- with libatomic_ops
- enable dynamic-ssl-lib
- update wxWidgets BuildRequires

* Sat Feb 14 2015 Led <ledest@gmail.com> R15B03-12
- updated patches:
  + otp-R15B03-1-led.patch

* Sat Feb 14 2015 Led <ledest@gmail.com> R15B03-11
- fixed patches:
  + otp_src_R15B03-1-erts-erl_process.patch

* Tue Feb 10 2015 Led <ledest@gmail.com> R15B03-10
- link with LTO
- added patches:
  + otp_src_R15B03-1-beam-ldflags.patch

* Sat Jan 24 2015 Led <ledest@gmail.com> R15B03-9
- fixed requires in erlang-visual

* Tue Jan 20 2015 Led <ledest@gmail.com> R15B03-8
- cleaned up spec

* Sun Jan 18 2015 Led <ledest@gmail.com> R15B03-7
- added patches:
  + otp_src_R15B03-1-erts-drivers-gzio.patch
  + otp_src_R15B03-1-erts-drivers-inet_drv.patch
  + otp_src_R15B03-1-erts-erlexec.patch
  + otp_src_R15B03-1-erts-erl_process.patch
  + otp_src_R15B03-1-wx-gl_funcs.patch
  + otp_src_R15B03-1-wx-wxe_gl.patch

* Fri Jan 16 2015 Led <ledest@gmail.com> R15B03-6
- enabled asm_optimize
- updated patches:
  + otp_src_R15B03-1-erts-lib.patch
- added patches:
  + otp_src_R15B03-1-erts-lib.patch

* Fri Jan 16 2015 Led <ledest@gmail.com> R15B03-5
- move cover_web.beam from erlang-tools to erlang-webtool

* Fri Jan 16 2015 Led <ledest@gmail.com> R15B03-4
- added patches:
  + otp_src_R15B03-1-erts-ctype.patch
  + otp_src_R15B03-1-compiler-printable.patch
  + otp_src_R15B03-1-io_lib-printable.patch

* Thu Jan 15 2015 Led <ledest@gmail.com> R15B03-3
- fixed requires

* Thu Jan 15 2015 Led <ledest@gmail.com> R15B03-2
- fixed requires

* Thu Jan 15 2015 Led <ledest@gmail.com> R15B03-1
- R15B03-1
- fixed License
- removed subpackages:
  + erlang-docbuilder
  + erlang-ssl-esock
  + erlang-inets-auth_mnesia
  + erlang-etop
- added subpackages:
  + erlang-eldap

* Wed Jan 14 2015 Led <ledest@gmail.com> R14B04-18
- requires rpm-build-%%name >= 0.9.8

* Wed Jan 14 2015 Led <ledest@gmail.com> R14B04-17
- requires rpm-build-%%name >= 0.9.7

* Mon Jan 12 2015 Led <ledest@gmail.com> R14B04-16
- replace add_erlang_req_modules_skiplist macro to add_erlang_req_beam_skiplist
- requires rpm-build-%%name >= 0.9.6
- requires rpm-macros-%%name >= 0.8.0

* Sun Jan 11 2015 Led <ledest@gmail.com> R14B04-15
- fix requires for sctp
- requires rpm-build-%%name >= 0.9.3

* Sat Jan 10 2015 Led <ledest@gmail.com> R14B04-14
- requires rpm-build-%%name >= 0.9.0
- use rpm internal dependency generator
- remove macro %%noarch_package
- rearrange subpackages
- fixed spec
- disabled pdf_opt

* Fri Feb 01 2013 Led <led@massivesolutions.co.uk> R14B04-13
- updated BuildRequires

* Wed Apr 25 2012 Led <led@massivesolutions.co.uk> R14B04-12
- Don't strip "Attr" chunk of BEAM-files (required for reltool)

* Mon Apr 16 2012 Led <led@massivesolutions.co.uk> R14B04-11
- fixed build with java 7
- optimized Eterm copying
- renamed wxErlang.pdf to wx.pdf for documentation consistency
- added some fixes from R15B (OTP-9508, OTP-9614, OTP-9616, OTP-9617, OTP-9624,
  OTP-9630, OTP-9646, OTP-9670, OTP-9673, OTP-9689, OTP-9691, OTP-9693, OTP-9702,
  OTP-9713, OTP-9716, OTP-9725, OTP-9747, OTP-9752, OTP-9772, OTP-9785, OTP-9786,
  OTP-9810, OTP-9821, OTP-9827, OTP-9847, OTP-9860, OTP-9910, OTP-9927)

* Mon Mar 12 2012 Led <led@massivesolutions.co.uk> R14B04-10
- disabled hipe for build with enabled halfword

* Mon Mar 05 2012 Led <led@massivesolutions.co.uk> R14B04-9
- build Java code with defined target

* Sat Mar 03 2012 Led <led@massivesolutions.co.uk> R14B04-8
- updated BuildRequires
- cleaned up spec
- used macro %%noarch_package
- fixed OSC error 'An empty RPM is not allowed anymore in SuSE Linux'

* Tue Feb 28 2012 Led <led@massivesolutions.co.uk> R14B04-7
- %%name-devel:
  + remove internal libs
  + make liberts_r.a symlink to liberts.a if those identical
- fixed HALFWORD asm optimization tuple BIF's for x86

* Mon Feb 27 2012 Led <led@massivesolutions.co.uk> R14B04-6
- lib/gs: don't install gstk_generic.hrl to ebin/
- fixed packaging %%name-otp-devel for case hipe disabled
- disable hipe for case hipe enabled
- removed 'BuildArch: noarch' from %%name-otp-devel due lib/ic-*/priv/lib/libic
- fixed Summary and %%description of %%name-otp-devel
- lib/diameter: fixed parallel build

* Sat Feb 25 2012 Led <led@massivesolutions.co.uk> R14B04-5
- lib/snmp: fix parallel build
- lib/odbc: fix build warnings
- erts/lib: clean ups and optimizations
- cleaned up spec

* Thu Feb 23 2012 Led <led@massivesolutions.co.uk> R14B04-5
- updated parallel make
- cleaned up spec

* Mon Feb 13 2012 Led <led@massivesolutions.co.uk> R14B04-4
- added %%eoptflags
- removed debug flags
- removed '-O3' flags
- cleaned up spec

* Fri Feb 10 2012 Led <led@massivesolutions.co.uk> R14B04-3
- used %%erlang_provides

* Fri Feb 10 2012 Led <led@massivesolutions.co.uk> R14B04-2
- cleaned up Provides

* Tue Feb 07 2012 Led <led@massivesolutions.co.uk> R14B04-1
- with mmcs_hacks

* Mon Feb 06 2012 Led <led@massivesolutions.co.uk> R14B04-0
- initial build for openSUSE