%define ver 0.5.12 %define RELEASE 1 %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} Summary: A high-performance CORBA Object Request Broker. Name: ORBit Version: %ver Release: %rel Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/ORBit/ORBit-%{ver}.tar.gz Patch0: ORBit-%{ver}-aix.patch Group: System Environment/Daemons Copyright: LGPL/GPL BuildRoot: /var/tmp/orbit-%{PACKAGE_VERSION}-root Prefix: %{_prefix} Docdir: %{prefix}/doc Prereq: /sbin/install-info %ifarch ia64 %define stdlib lib/ia64l32 %define stdlib64 lib/ia64l64 %define liblink ../../.. %define PKG64 %{name}-%{version}-ia64l64 %define DIRS . %{_builddir}/%{PKG64}/%{name}-%{version} %define DEFCCIA xlc %define DEFCC %{DEFCCIA} %else %define stdlib lib %define liblink ../.. %define DIRS . %define DEFCC xlc %endif %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. %package devel Summary: Development libraries, header files and utilities for ORBit. Group: Development/Libraries Requires: indent Requires: glib-devel Requires: ORBit = %{ver} %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. %prep %ifarch ia64 %setup -q -c -n %{PKG64} cd %{name}-%{version} %patch0 -p1 -b .aix %endif %setup -q %patch0 -p1 -b .aix %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if [[ "$CC" != "gcc" ]] then %ifarch ia64 if [[ "$CC" = "bcc" ]] then export CC="bcc -Nilp32" export CC64=bcc else export CC64="$CC -q64" export RPM_OPT_FLAGS= fi %endif # Add alloca support if [[ "$CC" = "cc" || "$CC" = "xlc" ]] then RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ma" fi # Force the use of xlc if [[ "x$CC" = "xcc" ]] then RPM_OPT_FLAGS="$RPM_OPT_FLAGS -qlanglvl=ansi" fi export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` fi # We should no longer need to libtoolize # #for dir in %{DIRS}; do cd $dir; if [[ $dir != "." ]]; then export CC="$CC64"; fi #libtoolize --force #cd popt; libtoolize --force #cd ../libIDL; libtoolize --force #cd .. # Needed for snapshot releases. #MYCFLAGS="$RPM_OPT_FLAGS -D_LINUX_SOURCE_COMPAT" MYCFLAGS="$RPM_OPT_FLAGS" %ifarch ppc || %ifarch rs6000 export LDFLAGS="-Wl,-brtl" %endif if [ ! -f configure ]; then CFLAGS="$MYCFLAGS" ./autogen.sh --prefix=%prefix else CFLAGS="$MYCFLAGS" ./configure --prefix=%prefix fi make #done %install rm -rf $RPM_BUILD_ROOT # Potential loop if building 64-bit libraries for IA64 for dir in %{DIRS}; do cd $dir; if [[ $dir = "." ]]; then INSTDIR=%{_prefix}; else INSTDIR=/%{PKG64}%{_prefix}; fi mkdir -p $RPM_BUILD_ROOT$INSTDIR make prefix=$RPM_BUILD_ROOT$INSTDIR install done #/sbin/ldconfig -n $RPM_BUILD_ROOT%{prefix}/lib file $RPM_BUILD_ROOT%{prefix}/bin/* | awk -F ':' '/not stripped/ {print $1}' | xargs /usr/bin/strip gzip -9 $RPM_BUILD_ROOT%{prefix}/info/* ( cd $RPM_BUILD_ROOT for dir in bin include do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{prefix}/$dir/* . cd - done mkdir -p usr/%{stdlib} cd usr/%{stdlib} ln -sf %{liblink}%{prefix}/lib/* . ) %post devel /sbin/install-info %{prefix}/info/libIDL.info.gz %{prefix}/info/dir %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{prefix}/info/libIDL.info.gz %{prefix}/info/dir fi %ifarch ia64 # Add 64-bit libs to main install tree mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{stdlib64} mv ${RPM_BUILD_ROOT}/%{PKG64}%{_prefix}/lib/* $RPM_BUILD_ROOT%{_prefix}/%{stdlib64} # Add system links cd $RPM_BUILD_ROOT mkdir -p usr/%{stdlib64} cd usr/%{stdlib64} ln -sf %{liblink}%{prefix}/%{stdlib64}/* . %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog NEWS README TODO %doc -P libIDL/COPYING libIDL/ChangeLog libIDL/AUTHORS %doc -P libIDL/README* libIDL/NEWS libIDL/BUGS libIDL/tstidl.c /usr/%{stdlib}/lib*.so* /usr/%{stdlib}/lib*.a %ifarch ia64 %{_prefix}/%{stdlib64}/lib* /usr/%{stdlib64}/lib* %endif /usr/bin/orbit-event-server /usr/bin/orbit-name-server /usr/bin/name-client /usr/bin/orbit-ird %{prefix}/lib/lib*.so* %{prefix}/lib/lib*.a %{prefix}/bin/orbit-event-server %{prefix}/bin/orbit-name-server #don't install old-name-server #%{prefix}/bin/old-name-server %{prefix}/bin/name-client %{prefix}/bin/orbit-ird %files devel /usr/bin/orbit-idl /usr/bin/orbit-config /usr/bin/libIDL-config /usr/include/* /usr/%{stdlib}/*.sh %{prefix}/bin/orbit-idl %{prefix}/bin/orbit-config %{prefix}/bin/libIDL-config %{prefix}/include/* %{prefix}/lib/*.sh %{prefix}/lib/lib*.la %{prefix}/info/libIDL.info.gz %{prefix}/share/aclocal/* %changelog * Tue Nov 6 2001 Dan Nguyen - Update to version 0.5.12 * Fri Oct 26 2001 Dan Nguyen - Strip all binaries! * Thu Oct 25 2001 Dan Nguyen - Update to version 0.5.11 * Fri Sep 04 2001 Dan Nguyen - Update to version 0.5.10 - No need to libtoolize, shipped with 1.4 * Fri Aug 03 2001 Dan McNichol - Update to version 0.5.8. * Thu Mar 22 2001 Marc Stephenson - Build both 32- and 64-bit libraries * Fri Mar 09 2001 Marc Stephenson - Add logic for default compiler - Rebuild against new shared objects * Thu Feb 15 2001 aixtoolbox - Account for different standard lib location in IA64 32-bit ABI * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Tue Feb 3 2000 Elliot Lee 0.5.0-3 - Strip shared libraries * Mon Aug 30 1999 Elliot Lee 0.4.94-1 - Spec file fixes from RHL 6.0. * Wed Jun 2 1999 Jose Mercado - Fixed configure.in so spec.in could be used. * Mon Nov 23 1998 Pablo Saratxaga - improved %files section, and added use of %{prefix} and install-info (well,... no. The info file has not dir info inside, commented out)