File iksemel.spec of Package iksemel

# spec file for package iksemel
# Copyright (c) 2016 SUSE LINUX 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

%if 0%{?suse_version} > 1500 
%bcond_with python2
%bcond_without python2

Name:           iksemel
%define lname	libiksemel3
Summary:        XML parsing library
License:        LGPL-2.1+
Group:          System/Libraries
Version:        1.5
Release:        0

Source:         %name-%version.tar.bz2
Patch1:         secure_gnutls_options.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %install_info_prereq
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  gcc-c++
BuildRequires:  makeinfo
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(gnutls)
BuildRequires:  pkgconfig(lzo2)
%if %{with python2}
BuildRequires:  python-devel

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.

%setup -q
%patch -P 1 -p1

autoreconf -if
configpars="--disable-static --with-pic"
%if ! %{with python2}
configpars="$configpars --disable-python"
%configure $configpars
make %{?_smp_mflags}

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

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

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

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

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

%if %{with python2}

%files -n %lname

%files devel

openSUSE Build Service is sponsored by