%global project vsmartcard Name: virtualsmartcard Version: 0.8 Release: 4%{?dist} Summary: Virtual Smart Card License: GPLv3 URL: https://github.com/frankmorgner/%{project}/tree/master/%{name} Source0: https://github.com/frankmorgner/%{project}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz Patch0: %{name}-0.7-prefix.patch BuildRequires: pcsc-lite-devel BuildRequires: help2man BuildRequires: check BuildRequires: python3-devel BuildRequires: gcc BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool # The main package needs vpcd, but vpcd can work with other tools Requires: vpcd = %{version}-%{release} %description Virtual Smart Card emulates a smart card and makes it accessible through PC/SC. %package -n vpcd Summary: Virtual smart card reader. %description -n vpcd Virtual smart card reader to be used for smart card emulation vith virtualsmartcard (vicc). %prep %setup -q -n %{project}-%{name}-%{version} cd %{name} %patch0 -p1 -b .prefix # Inconsistent indentation #sed -i 's/\t/ /g' src/vpicc/virtualsmartcard/CardGenerator.py %build cd %{name} %if 0%{?rhel} == 7 sed -i -e 's/vpicc//g' src/Makefile.am %endif autoreconf -vis autoconf %configure --enable-serialconfdir=/etc/reader.conf.d make %{?_smp_mflags} %if 0%{?rhel} != 7 # shebang ... sed -ie 's|^#! /usr/bin/python$|#! /usr/bin/python3|' src/vpicc/vicc %endif %install cd %{name} %make_install V=1 %files %if 0%{?rhel} != 7 %{_bindir}/vicc %{python3_sitelib}/%{name}/* %{_mandir}/man1/vicc.1* %endif %files -n vpcd %license %{name}/COPYING %doc %{name}/README.md %{_bindir}/vpcd-config %{_libdir}/pcsc/drivers/serial/libifdvpcd.so %{_libdir}/pcsc/drivers/serial/libifdvpcd.so.0.* %config(noreplace) %{_sysconfdir}/reader.conf.d/vpcd %changelog * Wed Jun 01 2022 Jakub Jelen - 0.8-4 - RHEL 7 compatibility * Tue Dec 21 2021 Jakub Jelen - 0.8-3 - Rebuild for EPEL9 * Mon Oct 11 2021 Jakub Jelen - 0.8-2 - Python rebuild * Sat May 01 2021 Jakub Jelen - 0.8-1 - Finally new upstream release * Thu May 14 2020 Jakub Jelen - 0.7-2 - Separate python subpackage to avoid Python 2 dependency on reader installation * Tue Jan 29 2019 Jakub Jelen - 0.7-1 - Initial release