File svrcore.spec of Package svrcore

#
# spec file for package svrcore
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2009-2011 Wolfgang Rosenauer
#
# 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:           svrcore
%define libpackage libsvrcore0
Version:        4.1.3
Release:        0
Summary:        Secure PIN handling using NSS crypto
License:        MPL-2.0
Group:          Development/Libraries/C and C++
Url:            https://pagure.io/svrcore
Source0:        https://releases.pagure.org/svrcore/svrcore-%{version}.tar.bz2
Source1:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  mozilla-nss-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libsystemd)
BuildRequires:  pkgconfig(systemd)

%description
svrcore provides applications with several ways to handle secure PIN storage
e.g. in an application that must be restarted, but needs the PIN to unlock
the private key and other crypto material, without user intervention.  svrcore
uses the facilities provided by NSS.


%package -n %{libpackage}
Summary:        Secure PIN handling using NSS crypto
Group:          System/Libraries

%description -n %{libpackage}
svrcore provides applications with several ways to handle secure PIN storage
e.g. in an application that must be restarted, but needs the PIN to unlock
the private key and other crypto material, without user intervention.  svrcore
uses the facilities provided by NSS.


%package devel
Summary:        Development files for secure PIN handling using NSS crypto
Group:          Development/Libraries/C and C++
Requires:       %{libpackage} = %{version}-%{release}
Requires:       mozilla-nspr-devel
Requires:       mozilla-nss-devel

%description devel
svrcore provides applications with several ways to handle secure PIN storage
e.g. in an application that must be restarted, but needs the PIN to unlock
the private key and other crypto material, without user intervention.  svrcore
uses the facilities provided by NSS.

This package contains header files and symlinks to develop programs which will
use the libsvrcore library.  You should install this package if you need to
develop programs which will use the svrcore library.

%prep
%setup -q

%build
./autogen.sh
%configure --with-systemd

make

%install
%make_install
rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.a
rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.la

%post -n %{libpackage} -p /sbin/ldconfig

%postun -n %{libpackage} -p /sbin/ldconfig

%files -n %{libpackage}
%defattr(-,root,root,-)
%{_libdir}/libsvrcore.so.*

%files devel
%defattr(-,root,root,-)
%doc LICENSE README NEWS
%{_libdir}/pkgconfig/svrcore.pc
%{_libdir}/libsvrcore.so
%{_includedir}/svrcore.h

%changelog
openSUSE Build Service is sponsored by