#
# spec file for package iksemel
#
# 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/
#


Name:           iksemel
%define lname	libiksemel3
Summary:        XML parsing library
License:        LGPL-2.1+
Group:          System/Libraries
Version:        1.5
Release:        1.1.2
Url:            http://code.google.com/p/iksemel

#DL-URL:	http://iksemel.googlecode.com/files/iksemel-%version.tar.gz
Source:         %name-%version.tar.xz

Patch100:       iksemel-gnutls.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %install_info_prereq
BuildRequires:  gcc-c++
%if 0%{?suse_version} >= 1130
BuildRequires:  pkgconfig(gnutls)
%else
BuildRequires:  gnutls-devel
%endif
BuildRequires:  lzo-devel
BuildRequires:  pkgconfig

%description
This is an XML parser library mainly designed for Jabber applications.
It provides SAX, DOM, and special Jabber stream APIs. Library is coded
in ANSI C except the network code (which is POSIX compatible), thus
highly portable.

%package -n %lname
Summary:        XML parsing library
Group:          System/Libraries

%description -n %lname
This package contains shared libraries for packages that use iksemel

%package devel
Summary:        Header files, libraries and development documentation for iksemel
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
This package contains the header files, static libraries and development
documentation for iksemel. If you like to develop programs using iksemel,
you will need to install iksemel-devel.

%prep
%setup -q
%patch100 -p1

%build

autogen.sh

%configure --disable-static --with-pic --disable-python --without-openssl
make %{?_smp_mflags}

%install
%make_install
find "%buildroot" -type f -name "*.la" -delete

%post
%install_info --info-dir=%_infodir %_infodir/%name.info.gz

%postun
%install_info_delete --info-dir=%_infodir %_infodir/%name.info.gz

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

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

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO
%_infodir/iksemel*
%_bindir/ikslint
%_bindir/iksperf
%_bindir/iksroster

%files -n %lname
%defattr(-,root,root)
%_libdir/libiksemel.so.*

%files devel
%defattr(-,root,root)
%_includedir/iksemel.h
%_libdir/libiksemel.so
%_libdir/pkgconfig/iksemel.pc

%changelog
* Mon May 21 2012 jengelh@inai.de
- Use BuildRequires: pkgconfig(gnutls) instead of gnutls-devel for
  Factory in keeping with gnutls package naming changes.
* Mon Dec 12 2011 coolo@suse.com
- fix license to be in spdx.org format
* Wed Oct  5 2011 jengelh@medozas.de
- Remove .la files from standard library directories
- Remove redundant/unwanted tags/sections (cf. specfile guidelines)
- Avoid rx as default file mode
- Add pkgconfig autoprovides
* Sun Feb  7 2010 chris@computersalat.de
- fixed deps as adviced by msmeissn
  o iksemel requires libiksemel3, not the other way round
* Wed Jan 20 2010 chris@computersalat.de
- update to version 1.4
- specmods
  o added header
  o sort TAGS
  o shared lib to subpkg libiksemel3
* Sat Dec 29 2007 crrodriguez@suse.de
- remove bogus Packager and Vendor tags from specfiles. (#337404)
* Fri Nov 30 2007 crrodriguez@suse.de
- spec file fixes
- remove static libraries
- install info files the right way
  Di Sep 26 00:00:00 UTC 2006 - Peter Nixon
- Initial package