libbonobo.spec
author laca
Fri, 29 Oct 2004 01:28:51 +0000
changeset 4365 d8676a6421af
parent 4357 2474a25f2946
child 4387 1b0580c5041e
permissions -rw-r--r--
2004-10-29 Laszlo Peter <[email protected]> * GConf.spec, ORBit2.spec, atk.spec, glib2.spec, gtk2.spec, libIDL.spec, libbonobo.spec, libglade.spec, pango.spec: use $CC64 as the 64-bit compiler, if defined

Name:         libbonobo
License:      LGPL
Group:        System/Libraries/GNOME
Version:      2.6.1
Release:      23
Distribution: Cinnabar
Vendor:	      Sun Microsystems, Inc.
Summary:      Bonobo Base Library
Source:       http://ftp.gnome.org/pub/GNOME/sources/libbonobo/2.6/libbonobo-%{version}.tar.bz2
Source1:      libbonobo-l10n-po-1.6.tar.bz2
Source2:      libbonobo-2.3.gz
Source3:      bonobo-slay.1.gz
Source4:      libbonobo-activation.3.gz
Patch1:       libbonobo-01-forte.diff
Patch2:       libbonobo-02-b-a-s-quit.diff
URL:          http://www.gnome.org
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_prefix}/doc
Autoreqprov:  on
Prereq:       /sbin/ldconfig

%define ORBit2_version 2.10.1
%define libxml2_version 2.6.7
%define gnome_common_version 2.4.0
%define pkgconfig_version 0.15.0
%define bonobo_activation_version 2.4.0
%define gtk_doc_version 1.1
%define glib2_version 2.3.2

Requires:      glib2 >= %{glib2_version}
Requires:      libxml2 >= %{libxml2_version}
Requires:      ORBit2 >= %{ORBit2_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: libxml2-devel >= %{libxml2_version}
BuildRequires: ORBit2-devel >= %{ORBit2_version}
BuildRequires: gnome-common >= %{gnome_common_version}
BuildRequires: gtk-doc >= %{gtk_doc_version}
BuildRequires: pkgconfig >= %{pkgconfig_version}

Obsoletes:	bonobo-activation < %{bonobo_activation_version}
Provides:	bonobo-activation = %{bonobo_activation_version}

%description
libbonobo is one of the base libraries for the GNOME Desktop, containing
convenient API for writing reusable components.

%package devel
Summary:      Bonobo Base Development Library
Group:        Development/Libraries/GNOME
Requires:     %{name} = %{version}-%{release}
Requires:     glib2-devel >= %{glib2_version}
Requires:     pkgconfig >= %{pkgconfig_version}
Requires:     libxml2-devel >= %{libxml2_version}
Requires:     ORBit2-devel >= %{ORBit2_version}

Obsoletes:	bonobo-activation-devel < %{bonobo_activation_version}
Provides:	bonobo-activation-devel = %{bonobo_activation_version}

%description devel
libbonobo is one of the base libraries for the GNOME Desktop, containing
convenient API for writing reusable components.

%prep
%setup -q
%patch1 -p1
%patch2 -p1

bzcat %SOURCE1 | tar xvf -

%ifos solaris
%ifarch amd64 sparcv9
cd ..
cp -rp libbonobo-%{version} libbonobo-%{version}-64
%endif
%endif

%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

CONFLAGS="--prefix=%{_prefix} --mandir=%{_mandir}"

%ifos solaris
%ifarch amd64 sparcv9
CPUS=$(($CPUS*4))

cd ../libbonobo-%version-64

export CFLAGS="$CFLAGS64"
export LDFLAGS="$LDFLAGS64"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH64"
export CC=${CC64:-$CC}
save_PATH="$PATH"
ccdir=`dirname $CC`
export PATH=$ccdir:$PATH

./configure $CONFLAGS					\
            --bindir=%{_bindir}/%{_arch64}		\
	    --sbindir=%{_sbindir}/%{_arch64}		\
            --libdir=%{_libdir}/%{_arch64}		\
            --libexecdir=%{_libexecdir}/%{_arch64}	\
            --sysconfdir=%{_sysconfdir}/%{_arch64}	\
	    --disable-gtk-doc

make -j $CPUS

cd ../libbonobo-%version

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH32"
export LDFLAGS="$LDFLAGS32"
export CFLAGS="$CFLAGS32"
export RPM_OPT_FLAGS="$CFLAGS"
export CC=${CC32:-$CC}
export PATH="$save_PATH"

%endif
%endif


CFLAGS="$RPM_OPT_FLAGS"			\
./configure $CONFLAGS	        	\
            --sysconfdir=%{_sysconfdir} \
            --libexecdir=%{_libexecdir}	\
	    --enable-gtk-doc

make -j $CPUS

%install

%ifos solaris
%ifarch amd64 sparcv9
cd ../libbonobo-%version-64
make install DESTDIR=$RPM_BUILD_ROOT
cd ../libbonobo-%version
%endif
%endif

make -i DESTDIR=$RPM_BUILD_ROOT install
install -d $RPM_BUILD_ROOT%{_mandir}/man1
install -d $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE3 $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE2 $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE4 $RPM_BUILD_ROOT%{_mandir}/man3
#Copy zh_HK from zh_TW
#Fixes bug 4930405
install -d $RPM_BUILD_ROOT%{_datadir}/locale/zh_HK/LC_MESSAGES
install --mode=0644 $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW/LC_MESSAGES/*.mo $RPM_BUILD_ROOT%{_datadir}/locale/zh_HK/LC_MESSAGES/
rm $RPM_BUILD_ROOT%{_libdir}/bonobo/monikers/*.a
rm $RPM_BUILD_ROOT%{_libdir}/bonobo/monikers/*.la
rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm $RPM_BUILD_ROOT%{_libdir}/*.la
rm $RPM_BUILD_ROOT%{_libdir}/orbit-2.0/*.a
rm $RPM_BUILD_ROOT%{_libdir}/orbit-2.0/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%defattr(-, root, root)
%doc COPYING ChangeLog NEWS README
%{_bindir}/*
%{_sbindir}/*
%{_libexecdir}/*
%{_libdir}/lib*.so*
%{_libdir}/orbit-2.0/*.so
%{_libdir}/bonobo/servers/*.server
%{_libdir}/bonobo/monikers/*.so
%dir %{_sysconfdir}/bonobo-activation
%config %{_sysconfdir}/bonobo-activation/*
%{_datadir}/man/man*/*
%{_datadir}/locale/*/LC_MESSAGES/*.mo

%files devel
%defattr(-, root, root)
%{_includedir}/libbonobo-2.0/libbonobo.h
%{_includedir}/libbonobo-2.0/bonobo/*.h
%{_includedir}/bonobo-activation-2.0/bonobo-activation/*.h
%{_libdir}/bonobo-2.0/samples/*
%{_libdir}/pkgconfig/*.pc
%{_datadir}/idl/bonobo-2.0/*.idl
%{_datadir}/idl/bonobo-activation-2.0/*.idl
%{_datadir}/gtk-doc/html/*
%{_mandir}/man1/*
%{_mandir}/man3/*

%changelog
* Fri Oct 29 2004 - [email protected]
- use $CC64 for the 64-bit build if defined

* Thu Oct 28 2004 - [email protected]
- Add bonobo-slay.1, libbonobo-activation.3 man pages

* Sat Oct  2 2004 - [email protected]
- Create 64bit libraries for Solaris

* Wed Aug 18 2004 - [email protected]
- added --enable-gtk-doc.

* Tue Jul 27 2004 - [email protected]
- Add patch from  [email protected] to fix b-a-s
  quit on logout after evolution was run in the session

* Thu Jul 08 2004 - [email protected]
- Updated l10n content to libbonobo-l10n-po-1.2.tar.bz2

* Wed Jul 07 2004 - [email protected]
- port to rpm4

* Wed Jul 07 2004 - [email protected]
- added "-j $CPUS" to make to speed up builds

* Thu May 27 2004 - [email protected]
- Update to 2.6.1 tarball, rework patch 01-forte

* Wed May 12 2004 - [email protected]
- Updated l10n content to libbonobo-l10n-po-1.1.tar.bz2

* Tue Apr 6 2004 - [email protected]
- Bump to 2.6.0

* Mon Mar 29 2004 - [email protected]
- Updated l10n content to libbonobo-l10n-po-1.0.tar.bz2

* Mon Mar 01 2004 - <[email protected]>
- define libexecdir in configure args

* Wed Feb 11 2004 - <[email protected]>
- Update to 2.5.4 tarball, remove patch 01-environ.diff
  Rename patch 02-forte -> 01-forte

* Mon Dec 15 2003 - <[email protected]>
- Update to 2.5.1 tarball

* Tue Oct 07 2003 - <[email protected]> 2.4.0-1
- Update to 2.4.0. bonobo-activation has now been swallowed
  into this package.

* Thu Aug 14 2003 - <[email protected]>
- move lib*.so to -devel, remove *.a, *.la

* Fri Aug 01 2003 - <[email protected]> 2.2.3-1
- Update to 2.2.3

* Wed Jul 09 2003 - <[email protected]>
- add in sun po files

* Wed Apr 30 2003 - <[email protected]>
- Create new spec file for libbonobo