e6a0d53
%global realname corba
e6a0d53
# Technically, we're almost noarch (ic has some binary-specific files); but
e6a0d53
# erlang whose directories we install into is not.
e6a0d53
%global debug_package %{nil}
e6a0d53
e6a0d53
e6a0d53
%ifarch %{arm} %{mips} riscv64
af6a48e
# MIPS and RISC-V does not have all dependencies for fop yet.
e6a0d53
# For some reason, fop hangs on arm, so for now don't generate docs by
af6a48e
# default.
e6a0d53
%bcond_with doc
e6a0d53
%else
e6a0d53
%bcond_without doc
e6a0d53
%endif
e6a0d53
e6a0d53
e6a0d53
Name:		erlang-%{realname}
65639a1
Version:	5.2.1
e6a0d53
Epoch:		1
6567bab
Release:	%autorelease
e6a0d53
Summary:	Erlang CORBA libraries
65639a1
License:	Apache-2.0
65639a1
URL:		https://github.com/erlang/%{realname}
65639a1
VCS:		git:%{url}.git
65639a1
Source0:	%{url}/archive/%{version}/%{realname}-%{version}.tar.gz
e6a0d53
Patch1:		erlang-corba-0001-Add-files-from-OTP-tree.patch
e6a0d53
Patch2:		erlang-corba-0002-Edit-OTP-files-to-allow-out-of-tree-build.patch
e6a0d53
Patch3:		erlang-corba-0003-Do-not-install-C-sources.patch
e6a0d53
Patch4:		erlang-corba-0004-Do-not-install-Java-sources.patch
e6a0d53
Patch5:		erlang-corba-0005-Do-not-install-erlang-sources.patch
e6a0d53
Patch6:		erlang-corba-0006-Do-not-install-examples.patch
5f27bf3
Patch7:		erlang-corba-0007-Fix-javadoc.patch
e6a0d53
BuildRequires:	erlang-erl_docgen
e6a0d53
BuildRequires:	erlang-erl_interface
e6a0d53
BuildRequires:	erlang-erts
0c0c989
BuildRequires:	erlang-ftp
e6a0d53
BuildRequires:	erlang-jinterface
e6a0d53
BuildRequires:	erlang-parsetools
e6a0d53
BuildRequires:	erlang-rpm-macros
e6a0d53
BuildRequires:	gcc
e6a0d53
BuildRequires:	java-devel
e6a0d53
%if %{with doc}
e6a0d53
BuildRequires:	fop
e6a0d53
BuildRequires:	libxslt
e6a0d53
%endif
54e225e
BuildRequires: make
e6a0d53
# FIXME no autodetect yet
ead4284
#BuildRequires:	erlang-cosEvent
ead4284
#BuildRequires:	erlang-cosNotification
ead4284
#BuildRequires:	erlang-cosProperty
ead4284
#BuildRequires:	erlang-cosTime
ead4284
#BuildRequires:	erlang-orber
4df5277
ExclusiveArch:	%{java_arches}
e6a0d53
e6a0d53
e6a0d53
%description
e6a0d53
A set of Erlang applications, that implements a CORBA compliant Object Request
e6a0d53
Broker (ORB) and a number of Object Managemnt Group (OMG) standard services.
e6a0d53
e6a0d53
%if %{with doc}
e6a0d53
%package doc
e6a0d53
Summary: Erlang CORBA documentation
e6a0d53
BuildArch: noarch
e6a0d53
e6a0d53
%description doc
e6a0d53
Documentation for Erlang.
e6a0d53
%endif
e6a0d53
e6a0d53
%package -n erlang-cosEvent
e6a0d53
Summary: Orber OMG Event Service
e6a0d53
Requires: erlang-orber%{?_isa}
e6a0d53
e6a0d53
%description -n erlang-cosEvent
e6a0d53
Orber OMG Event Service.
e6a0d53
e6a0d53
%package -n erlang-cosEventDomain
e6a0d53
Summary: Orber OMG Event Domain Service
e6a0d53
Requires: erlang-cosNotification%{?_isa}
e6a0d53
Requires: erlang-orber%{?_isa}
e6a0d53
e6a0d53
%description -n erlang-cosEventDomain
e6a0d53
Orber OMG Event Domain Service.
e6a0d53
e6a0d53
%package -n erlang-cosFileTransfer
e6a0d53
Summary: Orber OMG File Transfer Service
e6a0d53
Requires: erlang-cosProperty%{?_isa}
e6a0d53
Requires: erlang-orber%{?_isa}
e6a0d53
e6a0d53
%description -n erlang-cosFileTransfer
e6a0d53
Orber OMG File Transfer Service.
e6a0d53
e6a0d53
%package -n erlang-cosNotification
e6a0d53
Summary: Orber OMG Notification Service
e6a0d53
Requires: erlang-cosEvent%{?_isa}
e6a0d53
Requires: erlang-cosTime%{?_isa}
e6a0d53
Requires: erlang-orber%{?_isa}
e6a0d53
e6a0d53
%description -n erlang-cosNotification
e6a0d53
Orber OMG Notification Service.
e6a0d53
e6a0d53
%package -n erlang-cosProperty
e6a0d53
Summary: Orber OMG Property Service
e6a0d53
Requires: erlang-orber%{?_isa}
e6a0d53
e6a0d53
%description -n erlang-cosProperty
e6a0d53
Orber OMG Property Service.
e6a0d53
e6a0d53
%package -n erlang-cosTime
e6a0d53
Summary: Orber OMG Timer and TimerEvent Service
e6a0d53
Requires: erlang-cosEvent%{?_isa}
e6a0d53
Requires: erlang-orber%{?_isa}
e6a0d53
e6a0d53
%description -n erlang-cosTime
e6a0d53
Orber OMG Timer and TimerEvent Service.
e6a0d53
e6a0d53
%package -n erlang-cosTransactions
e6a0d53
Summary: Orber OMG Transaction Service
e6a0d53
Requires: erlang-orber%{?_isa}
e6a0d53
e6a0d53
%description -n erlang-cosTransactions
e6a0d53
Orber OMG Transaction Service.
e6a0d53
e6a0d53
%package -n erlang-ic
e6a0d53
Summary: IDL compiler
e6a0d53
Requires: erlang-jinterface
e6a0d53
Requires: javapackages-tools
e6a0d53
e6a0d53
%description -n erlang-ic
e6a0d53
IDL compiler.
e6a0d53
e6a0d53
%package -n erlang-orber
e6a0d53
Summary: A CORBA Object Request Broker
e6a0d53
e6a0d53
%description -n erlang-orber
e6a0d53
A CORBA Object Request Broker.
e6a0d53
e6a0d53
e6a0d53
%prep
e6a0d53
%autosetup -p1 -n %{realname}-%{version}
e6a0d53
e6a0d53
e6a0d53
%build
e6a0d53
CFLAGS="$RPM_OPT_FLAGS" ERL_TOP=`pwd` make %{?_smp_mflags} V=1
e6a0d53
%if %{with doc}
e6a0d53
CFLAGS="$RPM_OPT_FLAGS" ERL_TOP=`pwd` make docs V=1
e6a0d53
%endif
e6a0d53
e6a0d53
e6a0d53
%install
e6a0d53
ERL_TOP=`pwd` make install DESTDIR=%{buildroot}%{_erldir}
e6a0d53
%if %{with doc}
e6a0d53
ERL_TOP=`pwd` make install-docs DESTDIR=%{buildroot}%{_erldir}
e6a0d53
%endif
e6a0d53
e6a0d53
# erlang-ic
e6a0d53
install -m 0755 -d "%{buildroot}%{_javadir}/erlang"
e6a0d53
ic_lib_dir="$(ls -d1 %{buildroot}%{_libdir}/erlang/lib/ic-*/ | sed "s,^%{buildroot},,")"
e6a0d53
test -d "%{buildroot}$ic_lib_dir"
e6a0d53
ln -s "${ic_lib_dir}priv/ic.jar" "%{buildroot}%{_javadir}/erlang/"
e6a0d53
e6a0d53
%if %{with doc}
e6a0d53
# Move man-pages to a system-wide directory - in the same way as Debian did
e6a0d53
# Erlang files from man 3 have too generic names
e6a0d53
for manpage in %{buildroot}%{_libdir}/erlang/man/man3/*
e6a0d53
do
e6a0d53
	mv ${manpage} ${manpage}erl
e6a0d53
done
e6a0d53
mkdir -p %{buildroot}%{_mandir}/
e6a0d53
mv %{buildroot}%{_libdir}/erlang/man/* %{buildroot}%{_mandir}/
e6a0d53
%endif
e6a0d53
e6a0d53
# Relocate doc-files into the proper directory
e6a0d53
%if %{with doc}
e6a0d53
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/lib
e6a0d53
pushd .
e6a0d53
cd %{buildroot}%{_libdir}/erlang
e6a0d53
mv -v doc %{buildroot}%{_docdir}/%{name}-%{version}
e6a0d53
cd %{buildroot}%{_libdir}/erlang/lib
e6a0d53
for i in * ; do mv -v $i/doc %{buildroot}%{_docdir}/%{name}-%{version}/lib/$i || true ; done
e6a0d53
popd
e6a0d53
for i in ic orber ; do mv -v lib/$i/examples %{buildroot}%{_docdir}/%{name}-%{version}/lib/$i-%{version}/examples || true ; done
e6a0d53
cp -av AUTHORS CONTRIBUTING.md README.md %{buildroot}%{_docdir}/%{name}-%{version}
e6a0d53
# We'll package it by marking it explicitly as doc - see below
e6a0d53
rm -f %{buildroot}%{_libdir}/erlang/README.md %{buildroot}%{_libdir}/erlang/COPYRIGHT
e6a0d53
%endif
e6a0d53
e6a0d53
# Do not install info files - they are almost empty and useless
e6a0d53
find %{buildroot}%{_libdir}/erlang -type f -name info -exec rm -f {} \;
e6a0d53
e6a0d53
e6a0d53
%if %{with doc}
e6a0d53
%files doc
e6a0d53
%dir %{_docdir}/%{name}-%{version}/
e6a0d53
%doc %{_docdir}/%{name}-%{version}/AUTHORS
e6a0d53
%doc %{_docdir}/%{name}-%{version}/CONTRIBUTING.md
e6a0d53
%doc %{_docdir}/%{name}-%{version}/README.md
e6a0d53
%doc %{_docdir}/%{name}-%{version}/doc
e6a0d53
%doc %{_docdir}/%{name}-%{version}/lib/
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-cosEvent
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%{_libdir}/erlang/lib/cosEvent-*/
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/cosEventApp.*
e6a0d53
%{_mandir}/man3/CosEventChannelAdmin.*
e6a0d53
%{_mandir}/man3/CosEventChannelAdmin_ConsumerAdmin.*
e6a0d53
%{_mandir}/man3/CosEventChannelAdmin_EventChannel.*
e6a0d53
%{_mandir}/man3/CosEventChannelAdmin_ProxyPullConsumer.*
e6a0d53
%{_mandir}/man3/CosEventChannelAdmin_ProxyPullSupplier.*
e6a0d53
%{_mandir}/man3/CosEventChannelAdmin_ProxyPushConsumer.*
e6a0d53
%{_mandir}/man3/CosEventChannelAdmin_ProxyPushSupplier.*
e6a0d53
%{_mandir}/man3/CosEventChannelAdmin_SupplierAdmin.*
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-cosEventDomain
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%{_libdir}/erlang/lib/cosEventDomain-*/
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/CosEventDomainAdmin.*
e6a0d53
%{_mandir}/man3/CosEventDomainAdmin_EventDomain.*
e6a0d53
%{_mandir}/man3/CosEventDomainAdmin_EventDomainFactory.*
e6a0d53
%{_mandir}/man3/cosEventDomainApp.*
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-cosFileTransfer
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%dir %{_libdir}/erlang/lib/cosFileTransfer-*/
e6a0d53
%{_libdir}/erlang/lib/cosFileTransfer-*/ebin
e6a0d53
%{_libdir}/erlang/lib/cosFileTransfer-*/include
e6a0d53
%{_libdir}/erlang/lib/cosFileTransfer-*/src
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/cosFileTransferApp.*
e6a0d53
%{_mandir}/man3/CosFileTransfer_Directory.*
e6a0d53
%{_mandir}/man3/CosFileTransfer_File.*
e6a0d53
%{_mandir}/man3/CosFileTransfer_FileIterator.*
e6a0d53
%{_mandir}/man3/CosFileTransfer_FileTransferSession.*
e6a0d53
%{_mandir}/man3/CosFileTransfer_VirtualFileSystem.*
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-cosNotification
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%dir %{_libdir}/erlang/lib/cosNotification-*/
e6a0d53
%{_libdir}/erlang/lib/cosNotification-*/ebin
e6a0d53
%{_libdir}/erlang/lib/cosNotification-*/include
e6a0d53
%{_libdir}/erlang/lib/cosNotification-*/src
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/CosNotification.*
e6a0d53
%{_mandir}/man3/CosNotification_AdminPropertiesAdmin.*
e6a0d53
%{_mandir}/man3/cosNotificationApp.*
e6a0d53
%{_mandir}/man3/CosNotification_QoSAdmin.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_ConsumerAdmin.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_EventChannel.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_EventChannelFactory.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_ProxyConsumer.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_ProxyPullConsumer.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_ProxyPullSupplier.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_ProxyPushConsumer.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_ProxyPushSupplier.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_ProxySupplier.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_SequenceProxyPullConsumer.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_SequenceProxyPullSupplier.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_SequenceProxyPushConsumer.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_SequenceProxyPushSupplier.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_StructuredProxyPullConsumer.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_StructuredProxyPullSupplier.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_StructuredProxyPushConsumer.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_StructuredProxyPushSupplier.*
e6a0d53
%{_mandir}/man3/CosNotifyChannelAdmin_SupplierAdmin.*
e6a0d53
%{_mandir}/man3/CosNotifyComm_NotifyPublish.*
e6a0d53
%{_mandir}/man3/CosNotifyComm_NotifySubscribe.*
e6a0d53
%{_mandir}/man3/CosNotifyFilter_Filter.*
e6a0d53
%{_mandir}/man3/CosNotifyFilter_FilterAdmin.*
e6a0d53
%{_mandir}/man3/CosNotifyFilter_FilterFactory.*
e6a0d53
%{_mandir}/man3/CosNotifyFilter_MappingFilter.*
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-cosProperty
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%dir %{_libdir}/erlang/lib/cosProperty-*/
e6a0d53
%{_libdir}/erlang/lib/cosProperty-*/ebin
e6a0d53
%{_libdir}/erlang/lib/cosProperty-*/include
e6a0d53
%{_libdir}/erlang/lib/cosProperty-*/src
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/cosProperty.*
e6a0d53
%{_mandir}/man3/CosPropertyService_PropertiesIterator.*
e6a0d53
%{_mandir}/man3/CosPropertyService_PropertyNamesIterator.*
e6a0d53
%{_mandir}/man3/CosPropertyService_PropertySet.*
e6a0d53
%{_mandir}/man3/CosPropertyService_PropertySetDef.*
e6a0d53
%{_mandir}/man3/CosPropertyService_PropertySetDefFactory.*
e6a0d53
%{_mandir}/man3/CosPropertyService_PropertySetFactory.*
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-cosTime
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%dir %{_libdir}/erlang/lib/cosTime-*/
e6a0d53
%{_libdir}/erlang/lib/cosTime-*/ebin
e6a0d53
%{_libdir}/erlang/lib/cosTime-*/include
e6a0d53
%{_libdir}/erlang/lib/cosTime-*/src
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/cosTime.*
e6a0d53
%{_mandir}/man3/CosTimerEvent_TimerEventHandler.*
e6a0d53
%{_mandir}/man3/CosTimerEvent_TimerEventService.*
e6a0d53
%{_mandir}/man3/CosTime_TimeService.*
e6a0d53
%{_mandir}/man3/CosTime_TIO.*
e6a0d53
%{_mandir}/man3/CosTime_UTO.*
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-cosTransactions
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%dir %{_libdir}/erlang/lib/cosTransactions-*/
e6a0d53
%{_libdir}/erlang/lib/cosTransactions-*/ebin
e6a0d53
%{_libdir}/erlang/lib/cosTransactions-*/include
e6a0d53
%{_libdir}/erlang/lib/cosTransactions-*/src
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/cosTransactions.*
e6a0d53
%{_mandir}/man3/CosTransactions_Control.*
e6a0d53
%{_mandir}/man3/CosTransactions_Coordinator.*
e6a0d53
%{_mandir}/man3/CosTransactions_RecoveryCoordinator.*
e6a0d53
%{_mandir}/man3/CosTransactions_Resource.*
e6a0d53
%{_mandir}/man3/CosTransactions_SubtransactionAwareResource.*
e6a0d53
%{_mandir}/man3/CosTransactions_Terminator.*
e6a0d53
%{_mandir}/man3/CosTransactions_TransactionFactory.*
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-ic
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%dir %{_libdir}/erlang/lib/ic-*/
e6a0d53
%{_javadir}/erlang/ic.jar
e6a0d53
%{_libdir}/erlang/lib/ic-*/ebin
e6a0d53
%{_libdir}/erlang/lib/ic-*/include
e6a0d53
%{_libdir}/erlang/lib/ic-*/priv
e6a0d53
%{_libdir}/erlang/lib/ic-*/src
e6a0d53
%{_libdir}/erlang/usr/include/erlang.idl
e6a0d53
%{_libdir}/erlang/usr/include/ic.h
e6a0d53
%{_libdir}/erlang/usr/lib/libic.a
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/ic.*
e6a0d53
%{_mandir}/man3/ic_clib.*
e6a0d53
%{_mandir}/man3/ic_c_protocol.*
e6a0d53
%endif
e6a0d53
e6a0d53
%files -n erlang-orber
e6a0d53
%license COPYRIGHT
e6a0d53
%license LICENSE.txt
e6a0d53
%dir %{_libdir}/erlang/lib/orber-*/
e6a0d53
%{_libdir}/erlang/lib/orber-*/COSS
e6a0d53
%{_libdir}/erlang/lib/orber-*/ebin
e6a0d53
%{_libdir}/erlang/lib/orber-*/include
e6a0d53
%{_libdir}/erlang/lib/orber-*/priv
e6a0d53
%{_libdir}/erlang/lib/orber-*/src
e6a0d53
%if %{with doc}
e6a0d53
%{_mandir}/man3/CosNaming.*
e6a0d53
%{_mandir}/man3/CosNaming_BindingIterator.*
e6a0d53
%{_mandir}/man3/CosNaming_NamingContext.*
e6a0d53
%{_mandir}/man3/CosNaming_NamingContextExt.*
e6a0d53
%{_mandir}/man3/Module_Interface.*
e6a0d53
%{_mandir}/man3/any.*
e6a0d53
%{_mandir}/man3/corba.*
e6a0d53
%{_mandir}/man3/corba_object.*
e6a0d53
%{_mandir}/man3/fixed.*
e6a0d53
%{_mandir}/man3/interceptors.*
e6a0d53
%{_mandir}/man3/lname.*
e6a0d53
%{_mandir}/man3/lname_component.*
e6a0d53
%{_mandir}/man3/orber.*
e6a0d53
%{_mandir}/man3/orber_acl.*
e6a0d53
%{_mandir}/man3/orber_diagnostics.*
e6a0d53
%{_mandir}/man3/orber_ifr.*
e6a0d53
%{_mandir}/man3/orber_tc.*
e6a0d53
%endif
e6a0d53
e6a0d53
e6a0d53
%changelog
6567bab
%autochangelog