File xml-security-c.spec of Package xml-security-c

#
# spec file for package xml-security-c
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#


Name:           xml-security-c
Version:        1.7.3
Release:        0
Summary:        Apache XML security C++ library
License:        Apache-2.0
Group:          Development/Libraries/C and C++
Url:            http://santuario.apache.org/
Source0:        http://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.bz2
Source1:        http://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.bz2.asc
Source2:        %{name}.keyring
# PATCH-FIX-UPSTREAM marguerite@opensuse.org - 'bool' can't be converted to pointer in c++11
Patch:          xml-security-c-1.7.3-gcc6.patch
Patch1:         xml-security-c-1.7.3_openssl1.1.patch
BuildRequires:  gcc-c++
BuildRequires:  libxalan-c-devel
BuildRequires:  libxerces-c-devel >= 3.1
BuildRequires:  openssl-devel
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The xml-security-c library is a C++ implementation of the XML Digital Signature
and Encryption specifications. The library makes use of the Apache XML project's
Xerces-C XML Parser and Xalan-C XSLT processor. The latter is used for processing
XPath and XSLT transforms.

%package -n xml-security-c-bin
Summary:        Utilities for XML security C++ library
Group:          Development/Libraries/C and C++

%description -n xml-security-c-bin
The xml-security-c library is a C++ implementation of the XML Digital Signature
and Encryption specifications. The library makes use of the Apache XML project's
Xerces-C XML Parser and Xalan-C XSLT processor. The latter is used for processing
XPath and XSLT transforms.

This package contains the utility programs.

%package -n libxml-security-c17
Summary:        Apache XML security C++ library
Group:          Development/Libraries/C and C++
Provides:       xml-security-c = %{version}-%{release}
Obsoletes:      xml-security-c < %{version}-%{release}

%description -n libxml-security-c17
The xml-security-c library is a C++ implementation of the XML Digital Signature
and Encryption specifications. The library makes use of the Apache XML project's
Xerces-C XML Parser and Xalan-C XSLT processor. The latter is used for processing
XPath and XSLT transforms.

This package contains just the shared library.

%package -n libxml-security-c-devel
Summary:        Development files for the Apache C++ XML security library
Group:          Development/Libraries/C and C++
Requires:       libxerces-c-devel
Requires:       libxml-security-c17 = %{version}-%{release}
Requires:       openssl-devel
Provides:       xml-security-c-devel = %{version}-%{release}
Obsoletes:      xml-security-c-devel < %{version}-%{release}

%description -n libxml-security-c-devel
The xml-security-c library is a C++ implementation of the XML Digital Signature
and Encryption specifications. The library makes use of the Apache XML project's
Xerces-C XML Parser and Xalan-C XSLT processor. The latter is used for processing
XPath and XSLT transforms.

This package includes files needed for development with xml-security-c.

%prep
%setup -q
%patch -p1
if pkg-config --atleast-version=1.1 openssl; then
%patch1 -p1
fi

%build
%configure \
  --disable-static
make %{?_smp_mflags}

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install

%post -n libxml-security-c17 -p /sbin/ldconfig
%postun -n libxml-security-c17 -p /sbin/ldconfig

%files -n xml-security-c-bin
%defattr(-,root,root,-)
%doc CHANGELOG.txt LICENSE.txt
%{_bindir}/*

%files -n libxml-security-c17
%defattr(-,root,root)
%doc CHANGELOG.txt LICENSE.txt
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files -n libxml-security-c-devel
%defattr(-,root,root,-)
%doc CHANGELOG.txt LICENSE.txt
%{_includedir}/*
%{_libdir}/*.so

%changelog
openSUSE Build Service is sponsored by