%define dbus_version 1.4.0
%define dbus_glib_version 0.88
%define libxml2_version 2.7.7
%define orbit2_version 2.14.19

%define po_package libbonobo-2.0

%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

Summary: Bonobo component system
Summary(ja): Bonobo コンポーネントシステム
Name: libbonobo
Version: 2.32.1
Release: 2%{?_dist_release}
URL: http://ftp.gnome.org/
Source0: %{name}-%{version}.tar.bz2

Patch0:	%{name}-2.32.1-GStaticRecMutex.patch
Patch10: %{name}-2.14.0-i18n-help.patch

License: LGPL
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: libxml2-devel >= %{libxml2_version}
BuildRequires: ORBit2-devel >= %{orbit2_version}
BuildRequires: dbus-devel >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
BuildRequires: popt-devel
BuildRequires: flex
BuildRequires: byacc
BuildRequires: gtk-doc
Obsoletes: bonobo-activation
Provides: bonobo-activation

Vendor: Project Vine
Distribution: Vine Linux

%description
Bonobo is a component system based on CORBA, used by the GNOME desktop.

%description -l ja
Bonobo は GNUME デスクトップで使われている CORBA ベースのコンポーネント
システムです。

%package devel
Summary: Libraries and headers for libbonobo
Summary: libbonobo のライブラリおよびヘッダ
Group: Development/Libraries
Requires:  %{name} = %{version}-%{release}
Requires:  ORBit2-devel >= %{orbit2_version}
Requires:  libxml2-devel >= %{libxml2_version}
Obsoletes: bonobo-activation-devel
Provides:  bonobo-activation-devel
Conflicts: bonobo-devel < 1.0.8

%description devel
Bonobo is a component system based on CORBA, used by the GNOME desktop.

This package contains header files used to compile programs that 
use Bonobo.

%description devel -l ja
Bonobo は GNOME デスクトップで使われている CORBA ベースのコンポーネント
システムです。

このパッケージは Bonobo を使うプログラムをコンパイルするために必要な
ヘッダファイルが収録されています。

# compat32
%package -n compat32-%{name}
Summary: Bonobo component system
Summary(ja): Bonobo コンポーネントシステム
Group: System Environment/Libraries
Requires:  %{name} = %{version}-%{release}

%description -n compat32-%{name}
Bonobo is a component system based on CORBA, used by the GNOME desktop.

%description -n compat32-%{name} -l ja
Bonobo は GNUME デスクトップで使われている CORBA ベースのコンポーネント
システムです。

%package -n compat32-%{name}-devel
Summary: Libraries and headers for libbonobo
Summary: libbonobo のライブラリおよびヘッダ
Group: Development/Libraries
Requires:  %{name}-devel = %{version}-%{release}
Requires:  compat32-%{name} = %{version}-%{release}
Requires:  compat32-ORBit2-devel >= %{orbit2_version}
Requires:  compat32-libxml2-devel >= %{libxml2_version}

%description -n compat32-%{name}-devel
Bonobo is a component system based on CORBA, used by the GNOME desktop.

This package contains header files used to compile programs that 
use Bonobo.

%description -n compat32-%{name}-devel -l ja
Bonobo は GNOME デスクトップで使われている CORBA ベースのコンポーネント
システムです。

このパッケージは Bonobo を使うプログラムをコンパイルするために必要な
ヘッダファイルが収録されています。

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .mutex
%patch10 -p1 -b .i18n-help

%build
%configure --disable-static
make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall

## just kill this wherever it lives
rm -f $RPM_BUILD_ROOT%{_libdir}/bonobo-2.0/samples/bonobo-echo-2
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/bonobo-2.0/samples/bonobo-echo-2
                       
## kill other stuff
rm $RPM_BUILD_ROOT%{_bindir}/echo-client-2
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} \;

%find_lang %{po_package}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

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

%files -f %{po_package}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/lib*.so.*
%{_libdir}/bonobo
%{_libdir}/orbit-2.0/*.so*
%{_bindir}*
%{_libexecdir}/*
%{_sbindir}/*
%dir %{_sysconfdir}/bonobo-activation
%config %{_sysconfdir}/bonobo-activation/*
%{_mandir}/man*/*

%files devel
%defattr(-,root,root)
#{_libdir}/lib*.a
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*
%{_datadir}/idl
%{_datadir}/gtk-doc

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

%files -n compat32-%{name}-devel
%defattr(-,root,root)
%{_libdir}/lib*.so
%endif

%changelog
* Tue Dec 31 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.1-2
- rebuild with VineSeed environment
- add Patch0 (libbonobo-2.32.1-GStaticRecMutex.patch)

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.1-1
- new upstream release

* Sat Oct 02 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release

* Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> 2.24.3-2
- build with rpm-4.8.1-1 for pkg-config file

* Sun Apr 04 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.24.3-1
- new upstream release
- add BuildRequires: dbus-devel, dbus-glib-devel, popt-devel, flex, byacc

* Sat Oct 31 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.24.2-1
- new upstream release

* Sun Jul 19 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.24.1-2
- added --disable-static configure option
- added compat32 package for x86_64 arch support

* Fri Mar 20 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.1-1
- new upstream release

* Thu Mar 20 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.0-1vl5
- new upstream release

* Sun Jan 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.20.3-0vl1
- new upstream release

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

* Mon Apr 30 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.0-0vl2
- add upstream patch1

* Tue Apr 24 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.0-0vl1
- new upstream release

* Fri Jun 30 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl3
- update Patch0 to fix more help message translation.

* Fri May 12 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl2
- add bindtextdomain_codeset in bonobo-activation initialize
  to fix corruption of help option message.(Patch0)

* 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.1-0vl1
- new upstream release

* Wed Aug 24 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.1-0vl1
- new upstream release

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

* Wed Mar 30 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.1-0vl2
- new upstream release

* Thu Feb 24 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.1-0vl1
- new upstream release

* Sun Nov 07 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.0-0vl1
- new upstream release

* Sat Jan 31 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.3-0vl1
- new upstream release

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

* Fri Oct 17 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.1-0vl1
- new upstream release

* Wed Sep 03 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.0-0vl1
- new upstream release

* Wed Aug 20 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.3-0vl1
- new upstream release

* Tue Jun 03 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.2-0vl1
- new upstream release

* Fri Apr 25 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.1-0vl1
- new upstream release

* Tue Jan 21 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl1
- new upstream release

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

* Wed Jun 26 2002 Owen Taylor <otaylor@redhat.com>
- Fix find_lang

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

* Wed Jun  5 2002 Havoc Pennington <hp@redhat.com>
- 2.0.0

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

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

* Mon May 20 2002 Havoc Pennington <hp@redhat.com>
- 1.117.0

* Fri May  3 2002 Havoc Pennington <hp@redhat.com>
- 1.116.0

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

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

* Wed Jan 30 2002 Owen Taylor <otaylor@redhat.com>
- Version 1.110.0
- Rebuild for dependencies
- Intltoolize, the included version has problems with our Perl

* Tue Jan 22 2002 Havoc Pennington <hp@redhat.com>
- automake-1.4

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

* Mon Nov 26 2001 Havoc Pennington <hp@redhat.com>
- 1.107.0, glib 1.3.11

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

* Fri Oct  5 2001 Havoc Pennington <hp@redhat.com>
- rebuild for new glib

* Thu Sep 27 2001 Havoc Pennington <hp@redhat.com>
- move to 1.103.0 tarball
- call automake after patching Makefile.am
- patch for parallel install

* Fri Sep 21 2001 Havoc Pennington <hp@redhat.com>
- add some requires

* Tue Sep 18 2001 Havoc Pennington <hp@redhat.com>
- conflict with bonobo < 1.0.8 to avoid header conflicts
- update group

* Mon Sep 17 2001 Havoc Pennington <hp@redhat.com>
- moved IDL files into subdir
- remove smp_mflags, libbonobo does not like those

* Thu Sep 13 2001 Havoc Pennington <hp@redhat.com>
- remove IDL files as temporary hack

* Wed Sep 12 2001 Havoc Pennington <hp@redhat.com>
- Initial build.


