File libgsf.spec of Package libgsf

#
# spec file for package libgsf
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libgsf
BuildRequires:  gconf2-devel
BuildRequires:  glib2-devel
BuildRequires:  intltool
BuildRequires:  libbonobo-devel
BuildRequires:  libxml2-devel
BuildRequires:  python-devel
BuildRequires:  python-gobject2-devel
BuildRequires:  python-gtk-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkg-config
License:        GPLv2+ ; LGPLv2.1+
Group:          Development/Libraries/GNOME
Version:        1.14.21
Release:        1
Summary:        GNOME Structured File Library
Url:            http://www.gnome.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         %{name}-%{version}.tar.bz2
Source99:       baselibs.conf
# bug437293
%ifarch ppc64
Obsoletes:      libgsf-64bit
%endif
#
Requires:       libgsf-1-114
%gconf_schemas_prereq
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}
%define python_sitearch %{py_sitedir}
%endif

%description
A library for reading and writing structured files (MS OLE and Zip, for
example).

%package 1-114
License:        GPLv2+ ; LGPLv2.1+
Summary:        GNOME Structured File Library
Group:          Development/Libraries/GNOME
# bug437293
%ifarch ppc64
Obsoletes:      libgsf-64bit
%endif
#

%description 1-114
A library for reading and writing structured files (MS OLE and Zip, for
example).

%package devel
License:        GPLv2+ ; LGPLv2.1+
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/GNOME
Requires:       libgsf-1-114 = %{version}
Requires:       %{name}-gnome = %{version}
Provides:       %{name}-doc = %{version}
Obsoletes:      %{name}-doc < %{version}
# bug437293
%ifarch ppc64
Obsoletes:      libgsf-devel-64bit
%endif
#

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%package gnome
License:        GPLv2+ ; LGPLv2.1+
Summary:        GNOME Structured File Library
Group:          Development/Libraries/GNOME
Requires:       libgsf-1-114 = %{version}
%gconf_schemas_prereq

%description gnome
A library for reading and writing structured files (MS OLE and Zip, for
example).

%package -n python-gsf
License:        GPLv2+ ; LGPLv2.1+
Summary:        GNOME Structured File Library - Python bindings
Group:          Development/Libraries/GNOME
Requires:       libgsf-1-114 = %{version}
%py_requires

%description -n python-gsf
A library for reading and writing structured files (MS OLE and Zip, for
example).

%prep
%setup -q
translation-update-upstream

%build
%configure --with-pic \
	--disable-static
make %{?jobs:-j%jobs}

%install
%makeinstall
%find_lang %{name}
# gconf_schemas go to -gnome subpackage:
%find_gconf_schemas
find %{buildroot} -type f -name "*.la" -delete -print

%clean
rm -rf $RPM_BUILD_ROOT

%post 1-114 -p /sbin/ldconfig

%postun 1-114 -p /sbin/ldconfig

%pre gnome -f %{name}.schemas_pre

%post gnome
/sbin/ldconfig

%posttrans gnome -f %{name}.schemas_posttrans

%preun gnome -f %{name}.schemas_preun

%postun gnome
/sbin/ldconfig

%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/gsf
# NOTE: gsf-office-thumbnailer does not require GNOME, place it here.
# Registration of thumbnailer to GNOME requires it, place it to libgsf-gnome.
%{_bindir}/gsf-office-thumbnailer
%{_bindir}/gsf-vba-dump
%doc %{_mandir}/man1/*.*

%files 1-114
%defattr (-, root, root)
%{_libdir}/libgsf-1.so.*

%files devel
%defattr(-, root, root)
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/libgsf-1
%{_datadir}/gtk-doc/html/gsf/

%files gnome -f %{name}.schemas_list
%defattr(-, root, root)
%{_libdir}/libgsf-gnome-1.so.*

%files -n python-gsf
%defattr(-, root, root)
%{python_sitelib}/gsf/
%if "%{python_sitelib}" != "%{python_sitearch}"
%{python_sitearch}/gsf/
%endif

%changelog
openSUSE Build Service is sponsored by