%define libidl_version 0.8.11
%define glib2_version 2.20.0
%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

Summary: A high-performance CORBA Object Request Broker.
Summary(ja): 高性能な CORBA Object Request Broker.
Name: ORBit2
Version: 2.14.18
Release: 1%{?_dist_release}
Group: System Environment/Libraries
License: LGPL/GPL
URL: http://www.labs.redhat.com/orbit/

Source: %{name}-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: libIDL-devel >= %{libidl_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk-doc

%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.
Summary(ja): ORBit の開発用ライブラリ，ヘッダファイル，ユーテリティ
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: indent
Requires: libIDL-devel >= %{libidl_version}
Requires: glib2-devel >= %{glib2_version}
Conflicts: ORBit-devel <= 0.5.8

%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.
#'

%package -n compat32-%{name}
Summary: A high-performance CORBA Object Request Broker.
Summary(ja): 高性能な CORBA Object Request Broker.
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description -n compat32-%{name}
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 -n compat32-%{name}-devel
Summary: Development libraries, header files and utilities for ORBit.
Summary(ja): ORBit の開発用ライブラリ，ヘッダファイル，ユーテリティ
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: compat32-%{name} = %{version}-%{release}
Requires: compat32-libIDL-devel >= %{libidl_version}
Requires: compat32-glib2-devel >= %{glib2_version}

%description -n compat32-%{name}-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
%setup -q

echo "glib-2.0 version is `pkg-config --modversion glib-2.0`"

%build
%configure --enable-gtk-doc
# don't use smp flags
export tagname=CC
make LIBTOOL=/usr/bin/libtool

%install
rm -rf $RPM_BUILD_ROOT
export tagname=CC
%makeinstall LIBTOOL=/usr/bin/libtool

rm -f $RPM_BUILD_ROOT%{_libdir}/libORBit*.{a,la}
rm -f $RPM_BUILD_ROOT%{_libdir}/ORBit-2.0/*.*a
rm -f $RPM_BUILD_ROOT%{_libdir}/orbit-2.0/*.*a

rm -f $RPM_BUILD_ROOT%{_bindir}/linc-cleanup-sockets

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post -n compat32-%{name} -p /sbin/ldconfig

%postun -n compat32-%{name} -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_libdir}/*.so.*
%{_libdir}/orbit-2.0/*.so*

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
# this is needed by libbonobo
%{_libdir}/libname-server-2.a
%{_libdir}/pkgconfig/*
%{_bindir}/orbit-idl-2
%{_bindir}/typelib-dump
%{_bindir}/orbit2-config
%{_bindir}/ior-decode-2
#%{_bindir}/linc-cleanup-sockets
%{_includedir}/*
%{_datadir}/aclocal/*.m4
%{_datadir}/idl/orbit-2.0/
%{_datadir}/gtk-doc/html/ORBit2

# compat32
%if %{build_compat32}
%files -n compat32-%{name}
%defattr(-,root,root)
%{_libdir}/*.so.*
%{_libdir}/orbit-2.0/*.so*

%files -n compat32-%{name}-devel
%defattr(-,root,root)
%{_libdir}/*.so
# this is needed by libbonobo
%{_libdir}/libname-server-2.a
%{_libdir}/pkgconfig/*
%endif

%changelog
* Sat Apr 10 2010 Ryoichic INAGAKI <ryo1@bc.wakwak.com> 2.14.18-1
- new upstream release
- built with new toolchain

* Sat Jul 11 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.14.17-3
- added compat32 package for x86_64 arch support
- added BuildRequires: gtk-doc
- re-added a static library, %%{_libdir}/libname-server-2.a that is needed by libbonobo

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.17-2
- remove static libs

* Sat Mar  7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.17-1
- new upstream release

* Tue Sep 23 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.16-1
- new upstream release
- built with libIDL-0.8.11
- spec in UTF-8

* Sat Jul 19 2008 Shu KONNO <owa@bg.wakwak.com> 2.14.12-2vl5
- rebuilt without libIDL-2.la

* Thu Mar 20 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.12-1vl5
- new upstream release
- built with libIDL-0.8.10
- remove BuildRequires: automake16

* Sat Jan 26 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.11-0vl1
- new upstream release

* Mon Jan 14 2008 Shu KONNO <owa@bg.wakwak.com> 2.14.10-0vl2
- dropt %%{_smp_mflags} to make

* Sat Nov 17 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.10-0vl1
- new upstream release

* Tue Oct  2 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.9-0vl1
- new upstream release
- changed Group to System Environment/Libraries

* Fri Mar 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.7-0vl1
- new upstream release

* Sun Oct 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.3-0vl1
- new upstream release

* Wed Mar 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl1
- new upstream release

* Sun Mar 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13.3-0vl1
- new upstream release

* Sun Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.12.5-0vl1
- new upstream release

* Sun Sep 18 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.4-0vl1
- new upstream release

* Tue Aug 02 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.2-0vl1
- new upstream release

* Thu Feb 24 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.12.1-0vl1
- new upstream release
- added gtk-doc directory

* Mon Nov 08 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.0-0vl1
- new upstream release

* Fri Oct 15 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9.8-0vl1
- new upstream release

* Tue Feb 03 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.3-0vl3
- add patch0 from fedora

* Fri Jan 16 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.3-0vl2
- rebuild with new toolchains

* Mon Dec 22 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.3-0vl1
- new upstream release
- rebuild with new toolchains

* Thu Sep 11 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.1-0vl1
- new upstream release

* Tue Sep 02 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.0-0vl1
- new upstream release

* Fri Jul 25 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.6.3-0vl1
- new upstream release

* Thu Jan 16 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.0-0vl1
- new upstream release

* Sat Jan  4 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.1-0vl1
- new upstream release

* Sat Dec 14 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-0vl1
- build for Vine Linux

* Tue Aug  6 2002 Havoc Pennington <hp@redhat.com>
- 2.4.1

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu Jun 06 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Tue Jun  4 2002 Havoc Pennington <hp@redhat.com>
- 2.4.0

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Fri May 17 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Fri May 17 2002 Havoc Pennington <hp@redhat.com>
- 2.3.109

* Thu May  2 2002 Havoc Pennington <hp@redhat.com>
- 2.3.108

* Thu Apr  4 2002 Jeremy Katz <katzj@redhat.com>
- 2.3.107

* Thu Feb 14 2002 Havoc Pennington <hp@redhat.com>
- 2.3.105

* Wed Jan 30 2002 Owen Taylor <otaylor@redhat.com>
- Version 2.3.103
- Rebuild for dependencies

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed Jan  2 2002 Havoc Pennington <hp@redhat.com>
- build system somehow built against libglib-1.3.so.11
  even though pkg-config found 1.3.12? wtf?
  trying again

* Wed Jan  2 2002 Havoc Pennington <hp@redhat.com>
- 2.3.100.90 snap

* Mon Nov 26 2001 Havoc Pennington <hp@redhat.com>
- 2.3.99

* Sun Nov 25 2001 Havoc Pennington <hp@redhat.com>
- new snap 2.3.97.90, rebuild for glib 1.3.11

* Fri Oct 26 2001 Havoc Pennington <hp@redhat.com>
- new snap, glib 1.3.10 rebuild

* Tue Oct  9 2001 Havoc Pennington <hp@redhat.com>
- check rebuild against new linc with headers moved
- remove epoch, that was a screwup

* Thu Oct  4 2001 Havoc Pennington <hp@redhat.com>
- cvs snap
- require specific glib2

* Thu Sep 27 2001 Havoc Pennington <hp@redhat.com>
- 2.3.95 tarball
- depend on new standalone libIDL, remove all libIDL stuff from file list

* Fri Sep 21 2001 Havoc Pennington <hp@redhat.com>
- require specific linc version, unrequire specific glib version since
  we get that via linc

* Mon Sep 17 2001 Havoc Pennington <hp@redhat.com>
- newer orbit2 from CVS

* Thu Sep 13 2001 Havoc Pennington <hp@redhat.com>
- conflict with old orbit with headers not moved

* Wed Sep 12 2001 Havoc Pennington <hp@redhat.com>
- renaming more things
- remove smp flags, doesn't work atm
- fix .pc file, trying to get bonobo-activation to build

* Tue Sep 11 2001 Havoc Pennington <hp@redhat.com>
- kill all file conflicts with ORBit1

* Mon Sep 10 2001 Havoc Pennington <hp@redhat.com>
- convert to ORBit2 spec file (from ORBit original)

* Tue Jul 24 2001 Alexander Larsson <alexl@redhat.com>
- Added glib-devel BuildRequires

* Thu Jun 21 2001 Elliot Lee <sopwith@redhat.com> 0.5.8-2
- Use _smp_mflags if possible.

* Mon May 14 2001 Jonathan Blandford <jrb@redhat.com>
- bumped version

* Thu Mar 01 2001 Owen Taylor <otaylor@redhat.com>
- Rebuild for GTK+-1.2.9

* Tue Jan 30 2001 Elliot Lee <sopwith@redhat.com>
- 0.5.7 for real

* Thu Jan 18 2001 Elliot Lee <sopwith@redhat.com>
- 0.5.7

* Tue Dec 19 2000 Elliot Lee <sopwith@redhat.com>
- 0.5.6

* Thu Nov 30 2000 Elliot Lee <sopwith@redhat.com>
- 0.5.5

* Fri Aug 11 2000 Jonathan Blandford <jrb@redhat.com>
- Up Epoch and release

* Tue Jul 25 2000 Elliot Lee <sopwith@redhat.com>
- 0.5.3

* Wed Jul 19 2000 Jonathan Blandford <jrb@redhat.com>
- fixed to work with new cpp.

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Tue Jul 11 2000 Jonathan Blandford <jrb@redhat.com>
- Upgraded to 0.5.2 - a bug fix release.

* Tue Jun 27 2000 Havoc Pennington <hp@redhat.com>
- Trying to build the package for Preston and the build
  system wants a new changelog entry

* Sat Jun 24 2000 Preston Brown <pbrown@redhat.com>
- defattr the devel pkg
- FHS paths

* Fri May 19 2000 Jonathan Blandford <jrb@redhat.com>
- Upgraded to 0.5.1

* Tue Feb  3 2000 Elliot Lee <sopwith@redhat.com> 0.5.0-3
- Strip shared libraries

* Mon Aug 30 1999 Elliot Lee <sopwith@redhat.com> 0.4.94-1
- Spec file fixes from RHL 6.0.

* Wed Jun 2 1999  Jose Mercado <jmercado@mit.edu>
- Fixed configure.in so spec.in could be used.

* Mon Nov 23 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch>

- improved %files section, and added use of %{prefix} and install-info
  (well,... no. The info file has not dir info inside, commented out)
