File perl-pcsc.spec of Package perl-pcsc

# spec file for package perl-pcsc
# 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

%define cpan_name pcsc-perl
Name:           perl-pcsc
Version:        1.4.14
Release:        0
Summary:        Perl interface to Smart Card Reader
License:        GPL-2.0+
Group:          Development/Libraries/Perl
Source2:        %{name}.keyring
BuildRequires:  perl
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(libpcsclite)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1130
BuildRequires:  perl-macros
Requires:       perl-base = %{perl_version}
Requires:       perl = %{perl_version}

PC/SC represents an abstraction layer to smart card readers. It
provides a communication layer with a wide variety of smart card
readers through a standardized API.

%setup -q -n %{cpan_name}-%{version}

perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}

# No daemon and no card in the sysroot => no test.
#make %{?_smp_mflags} test

%if 0%{?suse_version} > 1130
touch %{name}.files

%files -f %{name}.files
%doc Changelog LICENCE README
%if 0%{?suse_version} <= 1130
%doc %{_mandir}/man3/*