File libykneomgr.spec of Package libykneomgr

#
# spec file for package libykneomgr
#
# Copyright (c) 2015 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:           libykneomgr
Version:        0.1.7
Release:        0
Summary:        Yubico YubiKey NEO CCID Manager
License:        LGPL-3.0+
Group:          Productivity/Networking/Security
Url:            https://developers.yubico.com/
# a different tarball is available from github.  It will not build with this spec file
Source0:        https://developers.yubico.com/libykneomgr/Releases/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  help2man
BuildRequires:  libzip-devel
BuildRequires:  pcsc-lite-devel
BuildRequires:  pkg-config
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(libzip)
Requires:       pcsc-ccid

%description
This is a C library to interact with the YubiKey NEO. There is a command line tool "ykneomgr" for interactive use.
It supports querying the YubiKey NEO for firmware version, operation mode (CCID) and serial number.
You may also mode switch the device and manage applets (list, delete and install).

%package -n libykneomgr0
Summary:        Yubikey NEO low-level Librariy
Group:          Productivity/Networking/Security

%description -n libykneomgr0
This is a low-level library to interact with the YubiKey NEO

%package 	devel
Summary:        Development files for libykneomgr
Group:          Development/Libraries/C and C++
Requires:       %{name}0 = %{version}

%description 	devel
This package contains the header file needed to develop applications that use
libykneomgr.

%package -n ykneomgr
Summary:        Tool to support Yubkey NEO
Group:          Productivity/Networking/Security
Requires:       %{name}0 = %{version}

%description -n ykneomgr

Command line tool to support Yubikey NEO for interactive use.

%package doc
Summary:        Doc-files for Yubkey NEO
Group:          Productivity/Networking/Security

%description doc

Doc-files for Yubkey NEO low-level C library


%prep
%setup -q 

%build
%configure --enable-static=no --with-backend=pcsc
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%{__make} %{?_smp_mflags}

%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p"
%{__rm} -rf %{buildroot}/%{_libdir}/*.la

%post -n libykneomgr0 -p /sbin/ldconfig

%postun -n libykneomgr0 -p /sbin/ldconfig

%files -n ykneomgr
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS ChangeLog README
%{_bindir}/ykneomgr
%{_mandir}/man1/*

%files doc
%defattr(-,root,root)
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%dir %{_datadir}/gtk-doc/html/libykneomgr
%{_datadir}/gtk-doc/html/libykneomgr/*

%files -n libykneomgr0
%defattr(-,root,root)
%{_libdir}/libykneomgr.so.0
%{_libdir}/libykneomgr.so.%{version}

%files devel
%defattr(-,root,root)
%{_includedir}/ykneomgr
%{_includedir}/ykneomgr/ykneomgr.h
%{_includedir}/ykneomgr/ykneomgr-types.h
%{_includedir}/ykneomgr/ykneomgr-version.h
%{_libdir}/libykneomgr.so
%{_libdir}/pkgconfig/ykneomgr.pc

%changelog
openSUSE Build Service is sponsored by