Summary:        Tools to be used with smart cards and PC/SC
Summary(ja):    スマートカードおよびPC/SCを使うためのツール

Name:           pcsc-tools
Version:        1.4.20
Release:        1%{?_dist_release}

Group:          Development/Tools
License:        GPLv2+
URL:            http://ludovic.rousseau.free.fr/softwares/pcsc-tools/
Source0:        http://ludovic.rousseau.free.fr/softwares/pcsc-tools/%{name}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  desktop-file-utils
BuildRequires:  pcsc-lite-devel >= 1.2.9
Requires:       pcsc-lite
Requires:	pcsc-perl

%description
The pcsc-tools package contains some useful tools for a PC/SC user:
pcsc_scan regularly scans connected PC/SC smart card readers and
prints detected events, ATR_analysis analyzes smart card ATRs (Anwser
To Reset), scriptor sends commands to a smart card, and gscriptor does
that from a GTK user interface.


%prep
%setup -q
sed -i -e 's/-O2 -g/$(RPM_OPT_FLAGS)/' Makefile

f=Changelog ; iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f


%build
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT%{_prefix}
desktop-file-install --vendor=fedora --mode=644 \
  --dir=$RPM_BUILD_ROOT%{_datadir}/applications gscriptor.desktop
# TODO: icon


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc Changelog LICENCE README TODO
%{_bindir}/ATR_analysis
%{_bindir}/gscriptor
%{_bindir}/pcsc_scan
%{_bindir}/scriptor
%{_datadir}/applications/*gscriptor.desktop
%{_datadir}/pcsc/
%{_mandir}/man1/ATR_analysis.1*
%{_mandir}/man1/gscriptor.1*
%{_mandir}/man1/pcsc_scan.1*
%{_mandir}/man1/scriptor.1*


%changelog
* Sun Jun 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.20-1
- new upstream release

* Sat Jan 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.18-1
- new upstream release

* Sun Mar 27 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.17-1
- new upstream release
- build with perl-5.12.3

* Sun Feb 21 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.15-1
- new upstream release
- add R: pcsc-perl

* Mon Mar 02 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.14-1
- initial build for Vine Linux

* Thu Jun  5 2008 Tomas Mraz <tmraz@redhat.com> - 1.4.14-1
- upgrade to a latest upstream version

* Sat Feb 16 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.4.12-1
- 1.4.12.

* Wed Aug 22 2007 Ville Skyttä <ville.skytta at iki.fi> - 1.4.10-1
- 1.4.10, desktop entry patch applied upstream.

* Tue Aug  7 2007 Ville Skyttä <ville.skytta at iki.fi> - 1.4.9-2
- License: GPLv2+

* Sat Jun 30 2007 Ville Skyttä <ville.skytta at iki.fi> - 1.4.9-1
- 1.4.9.
- Drop Encoding key from desktop entry.

* Sun Nov 26 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.8-1
- 1.4.8.
- Drop X-Fedora desktop entry category.

* Sun Oct  8 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.7-1
- 1.4.7, Oct 8 smartcard_list.txt.

* Sat Sep  2 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.6-1
- 1.4.6, Aug 30 smartcard_list.txt.
- Drop pcsc-lite < 1.2.9 support.

* Mon May  8 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.5-1
- 1.4.5.

* Sat Mar 25 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.4-1
- 1.4.4.

* Thu Mar  9 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.3-1
- 1.4.3.
- Improve description.

* Wed Mar  8 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.2-1
- 1.4.2, desktop file, recent smartcard_list.txt, ATR_analysis message
  patch and smartcard_list.txt lookup path improvement included upstream.

* Mon Mar  6 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.1-3
- Update smartcard_list.txt to 20060305.
- Fix some ATR_analysis messages.

* Sat Feb 18 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4.1-2
- Update smartcard_list.txt to 20060205.

* Tue Dec 13 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.4.1-1
- Update smartcard_list.txt to 20051127 and convert it to UTF-8.
- Improve summary and description.
- Add "Application" desktop entry category for legacy distros.
- Drop BR: sed.

* Sat Oct 15 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.4.1-0.2
- Update smartcard_list.txt to 20051011.
- Specfile cleanups.

* Wed Oct  5 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.4.1-0.1
- 1.4.1, patched to compile with pcsc-lite < 1.2.9-beta4.
- Move smartcard_list.txt to %%{_datadir}/pcsc.
- Add menu entry for gscriptor.

* Sat May 28 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.3.3-0.1
- Rebuild for FC4.

* Thu Jul  1 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.3-0.fdr.4
- Requires pcsc-lite (not too useful without the daemon).
- Update smartcard_list.txt to 1.72.

* Thu May 27 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.3-0.fdr.3
- Due to use of pkg-config, BuildRequires pcsc-lite-devel >= 1.2.0 (bug 1282).
- Update smartcard_list.txt to 1.71 (bug 1282).

* Wed May 12 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.3-0.fdr.2
- Patch to get PC/SC Lite CFLAGS and libs from pkg-config.
- Update smartcard_list (1.70).

* Fri Apr  2 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.3-0.fdr.1
- Update to 1.3.3.

* Tue Feb 10 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.2-0.fdr.2
- Update smartcard_list (1.64).

* Wed Dec 17 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.2-0.fdr.1
- Update to 1.3.2.

* Thu Oct 30 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.1-0.fdr.1
- Update to 1.3.1.

* Sun Sep 14 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.0-0.fdr.4
- Own %%{_libdir}/pcsc.
- Spec cleanups.

* Sun Aug 31 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.0-0.fdr.3
- Updated smartcard_list.txt (1.43).

* Wed Aug 27 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.0-0.fdr.2
- Spec cleanups.

* Sun Jun  1 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.0-0.fdr.1
- Update to 1.3.0.

* Sun May 25 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.5-0.fdr.1
- Update to 1.2.5.

* Fri May 23 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.4-0.fdr.1
- First build.
