File keyutils.spec of Package keyutils

# spec file for package keyutils
# Copyright (c) 2014 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

Name:           keyutils
%define lname	libkeyutils1
Summary:        Linux Key Management Utilities
License:        GPL-2.0+ and LGPL-2.1+
Group:          System/Kernel
Version:        1.5.9
Release:        0
Source1:        baselibs.conf
Patch1:         request-key-cifs.patch
Patch3:         request-key-nfs4.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Utilities to control the kernel key management facility and to provide
a mechanism by which the kernel can call back to user space to get a
key instantiated.

%package -n %lname
Summary:        Key utilities library
Group:          System/Kernel
Obsoletes:      keyutils-libs < %version-%release
Provides:       keyutils-libs = %version-%release

%description -n %lname
This package provides a wrapper library for the key management facility
system calls.

%package devel
Summary:        Development package for building linux key management utilities
Group:          System/Kernel
Requires:       %lname = %version
Requires:       glibc-devel

%description devel
This package provides headers and libraries for building key utilities.

%setup -q
%patch1 -p0
%patch3 -p1

make %{?_smp_mflags} NO_ARLIB=1 CFLAGS="%{optflags}" CC="%__cc"

make install NO_ARLIB=1 DESTDIR=%{buildroot} LIBDIR=/%{_lib} USRLIBDIR=%{_libdir}

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

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

%config(noreplace) %{_sysconfdir}/request-key.conf
%dir %{_sysconfdir}/request-key.d/

%files -n %lname

%files devel