# Note this is NOT a relocatable thing :)
%define name	bonobo
%define ver	1.0.22
%define rel	6%{?_dist_release}

Summary:        CORBA-based component system
Summary(ja):    CORBAベースのコンポーネントシステム
Name:		%{name}
Version: 	%{ver}
Release: 	%{rel}
License: 	GPL
Group:		System Environment/Libraries
Source: 	ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.0/%{name}-%{ver}.tar.bz2
URL: 		http://www.gnome.org/

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	gnome-libs-devel >= 1.4.2-2vl5
BuildRequires:	ORBit-devel >= 0.5.8
BuildRequires:	oaf-devel
BuildRequires:	libxml-devel >= 1.8.15
BuildRequires:	gdk-pixbuf-devel >= 0.21.0-0vl2
BuildRequires:	gnome-print-devel >= 0.37-2vl5
BuildRequires:	openjade gtk+-devel glib-devel
#BuildRequires:  autoconf213, automake14
Requires:	gnome-libs >= 1.4.2-2vl5
Requires:	ORBit >= 0.5.8
Requires:	oaf >= 0.6.2
Requires:	libxml >= 1.8.15
Requires:	gdk-pixbuf >= 0.21.0-0vl2
Requires:	libgnomeprint15 >= 0.37-2vl5

Patch0:	        bonobo-1.0.17-config.patch
Patch1:		bonobo-1.0.22-nonstatic.patch

%description
Bonobo is a library that provides the necessary framework for GNOME
applications to deal with compound documents, i.e. those with a
spreadsheet and graphic embedded in a word-processing document.

%package devel
Summary:	Libraries and include files for the Bonobo document model
Summary(ja):	Bonobo の開発用ライブラリおよびヘッダファイル
Group:		Development/Libraries
Requires:       pkgconfig
Requires:	%{name} = %{version}

%description devel
This package provides the necessary development libraries and include
files to allow you to develop programs using the Bonobo document model.

%prep
%setup -q
%patch1 -p1 -b .nonstatic

%build
%configure --disable-gtk-doc --disable-static 
export tagname=CC
make LIBTOOL=/usr/bin/libtool

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
export tagname=CC
%makeinstall LIBTOOL=/usr/bin/libtool

%find_lang %{name}

## remove unuse files
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a
#rm -rf $RPM_BUILD_ROOT%{_libdir}/bonobo/*.la
rm -rf $RPM_BUILD_ROOT%{_libdir}/bonobo/*/*.la
rm -rf $RPM_BUILD_ROOT%{_libdir}/bonobo/*/*.a

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
 
%postun -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS COPYING COPYING.LIB ChangeLog NEWS README
%{_bindir}/*
%exclude %{_bindir}/libefs-config
%{_libdir}/*.so.*
%{_libdir}/bonobo/plugin/*.so
%{_libdir}/bonobo/monikers/*.so
%{_datadir}/bonobo/*
%{_datadir}/gnome/*
%{_datadir}/oaf/*
#%{_datadir}/libefs/*
%{_datadir}/idl/*

%files devel
%defattr (-, root, root)
%{_bindir}/libefs-config
%{_libdir}/*.so
#{_libdir}/*.a
#{_libdir}/*.la
%{_libdir}/*.sh
#%{_libdir}/bonobo/*/*.a
#%{_libdir}/bonobo/*/*.la
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*

%changelog
* Sat May  2 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.22-6
- rebuilt with gnome-libs-1.4.2-2vl5 (linking with db-4.6)
- remove *.a

* Sat Sep 20 2008 Shu KONNO <owa@bg.wakwak.com> 1.0.22-5vl5
- applied new versioning policy, spec in utf-8
- remove *.la

* Sat Jun 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.22-4vl3
- rebuild with new toolchain
- dropped Patch0
- added Patch1 for compiling new toolchain

* Tue Oct 26 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.22-4vl2
- rebuild with db4-4.2.52 and libgnomeprint-0.37
- s/Copyright/License/
- add Japanese summary
- libefs-config moved to devel package

* Sun May 25 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.22-4vl1
- 1.0.22 based on Redhat Rawhide 1.0.22-4
- changed Summary and Source URL

* Wed Mar  5 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.17-0vl3
- rebuilt with new toolchains
- rebuilt with gdk-pixbuf-0.21.0-0vl2
- use legacy autoconf-2.13 and automake-1.4

* Wed Mar 27 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.0.17-0vl2
- rebuilt with gdk-pixbuf-0.16.0-0vl1

* Tue Dec 18 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.17-0vl1
- New upstream release.

* Fri Nov 23 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.0.9-0vl1
- updated to the new upstream 1.0.9 release

* Sat Jul 28 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
- 1.0.7-0vl1
- updated to new upstream release

* Tue Jun 19 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.4-0vl1
- New upstream release.
- Fixed packaging mistake.

* Tue May  8 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.3-0vl2
- Fixed missing files.

* Tue May  8 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.3-0vl1
- New upstream release.

* Fri Mar 23 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.37-0vl2
- Fixed defattr macro.

* Tue Mar 13 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.37-0vl1
- New upstream release.
- Added relative execute for config.

* Thu Dec 28 2000 Akira TAGOH <tagoh@gnome.gr.jp> 0.31.cvs20001221-0vl1
- Build for Vine

* Wed Oct 18 2000 Eskil Heyn Olsen <eskil@eazel.com>
- Added requirements to the base package
- Added bonobo-ui-extract to the file list of the base pacakge

* Tue Feb 22 2000 Jens Finke <jens.finke@informatik.uni-oldenburg.de>
- Added bonobo.h to the file list of devel package.

* Wed Nov 10 1999 Alexander Skwar <ASkwar@DigitalProjects.com>
- Updated to version 0.5
- fixed spec file
- Un-quiet things
- stripped binaries
- unsetted language environment variables

* Sat Oct 2 1999 Gregory McLean <gregm@comstar.net>
- Updated the spec for version 0.4
- Updated the files section.

* Sun Aug 1 1999 Gregory McLean <gregm@comstar.net>
- Some updates. sysconfdir stuff, quiet down the prep/configure stage.

* Sat May 1 1999 Erik Walthinsen <omega@cse.ogi.edu>
- created spec file
