File libodfgen.spec of Package libodfgen

#
# spec file for package libodfgen
#
# Copyright (c) 2013 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/
#


Name:           libodfgen
# note: the main package is empty, it only sets a sane name for the source rpm
BuildRequires:  boost-devel
BuildRequires:  gcc-c++
BuildRequires:  libwpd-devel
BuildRequires:  libwpg-devel
BuildRequires:  pkgconfig
BuildRequires:  xz
Version:        0.0.2
Release:        0
Summary:        Library to generate ODF documents from libwpd's and libwpg's api calls
License:        LGPL-2.1+ and MPL-2.0+
Group:          Productivity/Publishing/Word
Source:         http://downloads.sourceforge.net/project/libwpd/%{name}/%{name}-%{version}/%{name}-%{version}.tar.xz
Url:            http://libwpd.sourceforge.net
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libodfgen is a general purpose library designed to generate ODF documents
from api calls to libwpd and libwpg libraries.

%define libname libodfgen-0_0-0

%package -n %libname
# remove the old non-versioned package (built in the bs for instance)
Summary:        Library to generate ODF documents from libwpd's and libwpg's api calls
Group:          System/Libraries

%description -n %libname
libodfgen is a general purpose library designed to generate ODF documents
from api calls to libwpd and libwpg libraries.

%package devel
Summary:        Library to generate ODF documents from libwpd's and libwpg's api calls
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}
Requires:       libstdc++-devel

%description devel
libodfgen is a general purpose library designed to generate ODF documents
from api calls to libwpd and libwpg libraries.

%prep
%setup -q

%build
%configure \
	--disable-werror \
	--disable-static \
	--docdir=%_docdir/%name \
	--with-sharedptr=boost

make %{?_smp_mflags}

%install
make DESTDIR=$RPM_BUILD_ROOT install
rm $RPM_BUILD_ROOT%_libdir/*.la

%post -n %libname -p /sbin/ldconfig

%postun -n %libname -p /sbin/ldconfig

%files -n %libname
%defattr(-,root,root)
%{_libdir}/*.so.*
%doc ChangeLog
%doc COPYING.LGPL
%doc COPYING.MPL
%doc NEWS

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/pkgconfig/libodfgen*.pc
%{_includedir}/libodfgen*

%changelog
openSUSE Build Service is sponsored by