File libgloox.spec of Package libgloox

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

%define soname 8

Name:           libgloox
Version:        1.0
Release:        0
License:        GPL-2.0
Summary:        High-level XMPP Library for C++
Url:            http://camaya.net/gloox
Group:          Development/Libraries/C and C++
Source:         http://camaya.net/download/gloox-%{version}.tar.bz2
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  iksemel-devel
BuildRequires:  libtool
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1030
BuildRequires:  gnutls-devel
%else
BuildRequires:  libgnutls-devel
%endif
BuildRequires:  libidn-devel
BuildRequires:  zlib-devel

%description
gloox is a portable high-level Jabber/XMPP library for C++. It is fully
compliant with the XMPP RFCs, supports all of the XMPP features (including
SRV lookups, TLS, SASL, roster management, and privacy lists), and implements
several XEPs that make it ideal for writing any kind of Jabber/XMPP client
or component.

%package -n %{name}%{soname}
Summary:        High-level XMPP Library for C++
Group:          Development/Libraries/C and C++
Provides:       gloox%{soname} = %{version}
Provides:       libgloox = %{version}
Provides:       gloox = %{version}

%description -n %{name}%{soname}
gloox is a portable high-level Jabber/XMPP library for C++. It is fully
compliant with the XMPP RFCs, supports all of the XMPP features (including
SRV lookups, TLS, SASL, roster management, and privacy lists), and implements
several XEPs that make it ideal for writing any kind of Jabber/XMPP client
or component.

%package devel
Summary:        High-level XMPP Library for C++
Group:          Development/Libraries/C and C++
Requires:       %{name}%{soname} = %{version}
Requires:       libstdc++-devel
Provides:       gloox-devel = %{version}

%description devel
gloox is a portable high-level Jabber/XMPP library for C++. It is fully
compliant with the XMPP RFCs, supports all of the XMPP features (including
SRV lookups, TLS, SASL, roster management, and privacy lists), and implements
several XEPs that make it ideal for writing any kind of Jabber/XMPP client
or component.

%debug_package
%prep
%setup -q -n gloox-%{version}

%build
export SUSE_ASNEEDED=0
%configure --enable-shared --disable-static
make %{?_smp_mflags}

%install
%makeinstall

rm -f "%{buildroot}%{_libdir}/libgloox".{a,la}

h=/usr/share/doc/licenses/md5/$(md5sum COPYING|cut -f1 -d" ")
test -e "$h" && ln -s -f "$h" COPYING

%post   -n %{name}%{soname} -p /sbin/ldconfig
%postun -n %{name}%{soname} -p /sbin/ldconfig

%clean
rm -rf "%{buildroot}"

%files -n %{name}%{soname}
%defattr(-,root,root)
%doc AUTHORS README ChangeLog TODO COPYING
%{_libdir}/libgloox.so.%{soname}
%{_libdir}/libgloox.so.%{soname}.*.*

%files devel
%defattr(-,root,root)
%{_bindir}/gloox-config
%{_includedir}/gloox
%{_libdir}/libgloox.so
%{_libdir}/pkgconfig/gloox.pc

%changelog
openSUSE Build Service is sponsored by