File libdbus-c++.spec of Package libdbus-c++

#
# spec file for package libdbus-c++
#
# 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:           libdbus-c++
Version:        0.9.0
Release:        0
Summary:        C++ Interface for DBus
License:        LGPL-2.1+
Group:          System/Libraries
Url:            http://dbus-cplusplus.sourceforge.net/index.html
Source0:        %{name}-%{version}.tar.bz2
Source1:        baselibs.conf
# Fix no return from function
Patch0:         libdbus-c++-noreturn.patch
# Get ffado to build with libdbus-c++
Patch1:         libdbus-c++-pthread.patch
# No current date / time allowed in docs?
Patch2:         libdbus-c++-nodocdatetime.patch
# Fix gcc47 build errors
Patch3:         libdbus-c++-gcc47.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  dos2unix
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  graphviz
BuildRequires:  gtkmm2-devel
BuildRequires:  libexpat-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(dbus-glib-1)
# ecore
%if 0%{?suse_version} >= 1030
BuildRequires:  libexpat-devel
%else
BuildRequires:  expat
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
DBus-c++ attempts to provide a C++ API for D-BUS. The library has
a glib and an ecore mainloop integration. It also offers an
optional own main loop.

%package -n libdbus-c++-1-0
Summary:        The libdbus-c++ library
Group:          System/Libraries

%description -n libdbus-c++-1-0
DBus-c++ attempts to provide a C++ API for D-BUS. The library has
a glib and an ecore mainloop integration. It also offers an
optional own main loop. The libdbus-c++ library.

%package -n libdbus-c++-glib-1-0
Summary:        Glib for libdbus-c++
Group:          System/Libraries

%description -n libdbus-c++-glib-1-0
DBus-c++ attempts to provide a C++ API for D-BUS. The library has
a glib and an ecore mainloop integration. It also offers an
optional own main loop. The glib libdbus-c++ library.

%package devel
Summary:        Development files for libdbus-c++
Group:          Development/Libraries/C and C++
Requires:       libdbus-c++-1-0 = %{version}
Requires:       libdbus-c++-glib-1-0 = %{version}

%description devel
DBus-c++ attempts to provide a C++ API for D-BUS. The library has
a glib and an ecore mainloop integration. It also offers an
optional own main loop. Files for building against libdbus-c++

%prep

%setup -q
%patch0
%patch1
%patch2
%patch3

%build
#./autogen.sh
export LDFLAGS="$LDFLAGS -lexpat -lpthread"
%configure --disable-ecore --enable-doxygen-docs --enable-static=no
make %{?_smp_flags}

%install
%make_install
dos2unix -k AUTHORS
rm -f %{buildroot}%{_libdir}/*.la
%fdupes -s doc/

%post -n libdbus-c++-glib-1-0 -p /sbin/ldconfig

%postun -n libdbus-c++-glib-1-0 -p /sbin/ldconfig

%post -n libdbus-c++-1-0 -p /sbin/ldconfig

%postun -n libdbus-c++-1-0 -p /sbin/ldconfig

%files -n libdbus-c++-1-0
%defattr(755,root,root)
%{_libdir}/libdbus-c++-1.so.0
%{_libdir}/libdbus-c++-1.so.0.0.0

%files -n libdbus-c++-glib-1-0
%defattr(755,root,root)
%{_libdir}/libdbus-c++-glib-1.so.0
%{_libdir}/libdbus-c++-glib-1.so.0.0.0

# TODO: Separate the two lib's devel packages. There's only one set of headers though.
# FIXME: Every html file contains date and time, must be fixed before docs are included.
# FIXME: Add this to %%doc when fixed "doc/html doc/img" maybe a separate doc package.

%files devel
%defattr(-,root,root)
%doc AUTHORS COPYING README TODO doc/html doc/img
%{_bindir}/dbusxx-xml2cpp
%{_bindir}/dbusxx-introspect
%{_libdir}/libdbus-c++-1.so
%{_libdir}/libdbus-c++-glib-1.so
%{_includedir}/dbus-c++-1
%{_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by