%define libidl_version 0.8.14 %define glib2_version 2.22.5 %define _libdir64 %{_prefix}/lib64 Summary: A high-performance CORBA Object Request Broker Name: ORBit2 Version: 2.14.19 Release: 1 Source0: http://download.gnome.org/sources/ORBit2/2.14/%{name}-%{version}.tar.bz2 Source1: http://download.gnome.org/sources/ORBit2/2.14/%{name}-%{version}.sha256sum Source2: orbit-config.h Group: System Environment/Daemons License: LGPLv2 and GPLv2 URL: http://www.gnome.org/projects/ORBit2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make BuildRequires: libIDL-devel >= %{libidl_version} BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: pkg-config >= 0.25 Requires: libIDL >= %{libidl_version} Requires: glib2 >= %{glib2_version} %description ORBit is a high-performance CORBA (Common Object Request Broker Architecture) ORB (object request broker). It allows programs to send requests and receive replies from other programs, regardless of the locations of the two programs. CORBA is an architecture that enables communication between program objects, regardless of the programming language they're written in or the operating system they run on. You will need to install this package and ORBit-devel if you want to write programs that use CORBA technology. The library is available as 32-bit and 64-bit. %package devel Summary: Development libraries, header files and utilities for ORBit Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: indent Requires: libIDL-devel >= %{libidl_version} Requires: glib2-devel >= %{glib2_version} Requires: pkg-config %description devel ORBit is a high-performance CORBA (Common Object Request Broker Architecture) ORB (object request broker) with support for the C language. This package contains the header files, libraries and utilities necessary to write programs that use CORBA technology. If you want to write such programs, you'll also need to install the ORBIT package. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %prep %setup -q mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="xlc" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-shared --disable-static gmake %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake install DESTDIR=${RPM_BUILD_ROOT} for f in ${RPM_BUILD_ROOT}%{_bindir}/* ; do mv ${f} ${f}_64 done cd ../32bit export OBJECT_MODE=32 gmake install DESTDIR=${RPM_BUILD_ROOT} cd .. /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir64}/orbit-2.0 for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir}/orbit-2.0 for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libORBit-imodule-2.a ${RPM_BUILD_ROOT}%{_libdir64}/libORBit-imodule-2.so.0 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libORBitCosNaming-2.a ${RPM_BUILD_ROOT}%{_libdir64}/libORBitCosNaming-2.so.0 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/orbit-2.0/Everything_module.a ${RPM_BUILD_ROOT}%{_libdir64}/orbit-2.0/Everything_module.so ( cd ${RPM_BUILD_ROOT}%{_libdir64} /usr/bin/ar -X64 -t ./libname-server-2.a > arlist for f in `cat arlist` ; do /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libname-server-2.a ${f} done ) # fix multilib conflict caused by orbit-config.h cp 32bit/include/orbit/orbit-config.h ${RPM_BUILD_ROOT}%{_includedir}/orbit-2.0/orbit/orbit-config-ppc32.h cp 64bit/include/orbit/orbit-config.h ${RPM_BUILD_ROOT}%{_includedir}/orbit-2.0/orbit/orbit-config-ppc64.h cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_includedir}/orbit-2.0/orbit chmod 644 ${RPM_BUILD_ROOT}%{_includedir}/orbit-2.0/orbit/*.h ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/AUTHORS 32bit/COPYING 32bit/README 32bit/TODO %{_libdir}/libORBit*.a %{_libdir}/libORBit*.so* %{_libdir64}/libORBit*.so* %dir %{_libdir}/orbit-2.0 %{_libdir}/orbit-2.0/*.a %{_libdir}/orbit-2.0/*.so* %{_libdir64}/orbit-2.0/*.so* /usr/lib/libORBit*.a /usr/lib/libORBit*.so* /usr/lib64/libORBit*.so* %files devel %defattr(-,root,system,-) %{_bindir}/* %{_includedir}/* %{_libdir}/libname-server-2.a %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/orbit-2.0/*.la %{_libdir64}/orbit-2.0/*.la %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* %{_datadir}/aclocal/* %dir %{_datadir}/idl %{_datadir}/idl/* %{_datadir}/gtk-doc/html/* /usr/bin/* /usr/include/* /usr/lib/libname-server-2.a %changelog * Wed Apr 27 2011 Michael Perzl - 2.14.19-1 - updated to version 2.14.19 - added RTL-style shared libraries * Wed Jul 01 2009 Michael Perzl - 2.14.17-1 - updated to version 2.14.17 * Wed Apr 15 2008 Michael Perzl - 2.14.12-1 - first version for AIX V5.1 and higher