File libkmip.spec of Package libkmip

#
# spec file for package libkcapi
#
# 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:           libkmip
Version:        0.2.0
Release:        0
Summary:        ISO C11 implementation of the Key Management Interoperability Protocol (KMIP)
License:        Apache-2.0 OR BSD-3-Clause
Group:          Productivity/Security
Url:            https://github.com/OpenKMIP/libkmip
Source:		https://github.com/OpenKMIP/libkmip/archive/refs/tags/v%version.tar.gz
Source1:	baselibs.conf
BuildRequires:	libopenssl-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libkmip is an ISO C11 implementation of the Key Management Interoperability Protocol (KMIP), an OASIS communication standard for the management of objects stored and maintained by key management systems. KMIP defines how key management operations and operation data should be encoded and communicated, between client and server applications. Supported operations include creating, retrieving, and destroying keys. Supported object types include:

- symmetric and asymmetric encryption keys

For more information on KMIP, check out the OASIS KMIP Technical Committee and the OASIS KMIP Documentation.

%package -n libkmip0
Summary:        ISO C11 implementation of the Key Management Interoperability Protocol (KMIP)
Group:          System/Libraries

%description -n libkmip0
libkmip is an ISO C11 implementation of the Key Management Interoperability Protocol (KMIP), an OASIS communication standard for the management of objects stored and maintained by key management systems. KMIP defines how key management operations and operation data should be encoded and communicated, between client and server applications. Supported operations include creating, retrieving, and destroying keys. Supported object types include:

- symmetric and asymmetric encryption keys

For more information on KMIP, check out the OASIS KMIP Technical Committee and the OASIS KMIP Documentation.

This package contains the shared library.

%package devel
Summary:        ISO C11 implementation of the Key Management Interoperability Protocol (KMIP)
Group:          Development/Languages/C and C++
Requires:	libkmip0 = %version

%description devel
libkmip is an ISO C11 implementation of the Key Management Interoperability Protocol (KMIP), an OASIS communication standard for the management of objects stored and maintained by key management systems. KMIP defines how key management operations and operation data should be encoded and communicated, between client and server applications. Supported operations include creating, retrieving, and destroying keys. Supported object types include:

- symmetric and asymmetric encryption keys

For more information on KMIP, check out the OASIS KMIP Technical Committee and the OASIS KMIP Documentation.

This package contains the development headers and libraries.

%package tools
Summary:        Tools for ISO C11 implementation of the Key Management Interoperability Protocol (KMIP)
Group:          Development/Languages/C and C++

%description tools
libkmip is an ISO C11 implementation of the Key Management Interoperability Protocol (KMIP), an OASIS communication standard for the management of objects stored and maintained by key management systems. KMIP defines how key management operations and operation data should be encoded and communicated, between client and server applications. Supported operations include creating, retrieving, and destroying keys. Supported object types include:

- symmetric and asymmetric encryption keys

For more information on KMIP, check out the OASIS KMIP Technical Committee and the OASIS KMIP Documentation.

This package contains various tools.

%prep
%setup -q

%build
make %{?_smp_mflags} CFLAGS="%optflags -std=c11"

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

mv %{buildroot}/%_libdir/lib/* %{buildroot}/%_libdir
rmdir %{buildroot}/%_libdir/lib
rm %{buildroot}/%_libdir/libkmip.a
mv %{buildroot}/%_libdir/include %{buildroot}/%_prefix

# move the binaries to /usr/%_lib/kmip/
mv %{buildroot}/%_libdir/bin %{buildroot}/%_libdir/kmip/

mv %{buildroot}/%_libdir/src %{buildroot}/%_prefix/

mv %{buildroot}/%_libdir/share %{buildroot}/%_prefix/share

%post -n libkmip0 -p /sbin/ldconfig

%postun -n libkmip0 -p /sbin/ldconfig

%files -n libkmip0
%defattr(-,root,root)
%doc LICENSE LICENSE.APACHE LICENSE.BSD
/%{_libdir}/libkmip.so.0*

%files devel
%defattr(-,root,root)
%doc LICENSE LICENSE.APACHE LICENSE.BSD
%dir %{_includedir}/kmip
%{_includedir}/kmip/*
/%{_libdir}/libkmip.so
/%{_prefix}/src

%files tools
%defattr(-,root,root)
%doc LICENSE LICENSE.APACHE LICENSE.BSD
%dir /%{_libdir}/kmip
/%{_libdir}/kmip/*
%dir %_prefix/share/doc/kmip
%doc %_prefix/share/doc/kmip

%changelog
openSUSE Build Service is sponsored by