Blob Blame History Raw
Name:           pcsc-tools
Version:        1.4.5
Release:        1%{?dist}
Summary:        Tools to be used with smart cards and PC/SC

Group:          Development/Tools
License:        GPL
URL:            http://ludovic.rousseau.free.fr/softwares/pcsc-tools/
Source0:        http://ludovic.rousseau.free.fr/softwares/pcsc-tools/%{name}-%{version}.tar.gz
#Source1:        http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  desktop-file-utils
BuildRequires:  pcsc-lite-devel
Requires:       pcsc-lite

%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
if ! pkg-config --atleast-version 1.2.9 libpcsclite ; then
    sed -i -e 's/LPTSTR/LPSTR/' pcsc_scan.c
fi
# cp %{SOURCE1} .
for f in Changelog README smartcard_list.txt ; do
    iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
done


%build
make %{?_smp_mflags}


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


%clean
rm -rf $RPM_BUILD_ROOT


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


%changelog
* 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.