1 |
%global readers_dir %(pkg-config libpcsclite --variable=usbdropdir) |
2 |
|
3 |
%define main_version 3.99.5 |
4 |
%define sub_version SP14 |
5 |
|
6 |
Name: pcsc-cyberjack |
7 |
Version: %main_version.%sub_version |
8 |
Release: %mkrel 2 |
9 |
Summary: PC/SC driver for REINER SCT cyberjack USB chipcard reader |
10 |
License: LGPLv2+ |
11 |
Group: System/Kernel and hardware |
12 |
URL: https://www.reiner-sct.com/ |
13 |
Source0: https://support.reiner-sct.de/downloads/LINUX/V%{main_version}_%{sub_version}/%{name}_%{main_version}final.%{sub_version}.tar.gz |
14 |
# (doktor5000) useful hints on troubleshooting / debugging, taken from Fedora |
15 |
Source1: https://src.fedoraproject.org/rpms/pcsc-cyberjack/raw/master/f/%{name}-%{main_version}final.SP09-README-FEDORA |
16 |
Source2: libifd-cyberjack6.udev |
17 |
# this patch replaces the obsoleted AC_PROG_LIBTOOLT macro with LT_INIT |
18 |
# the patch is sent to upstream per email (20160528) |
19 |
Patch0: pcsc-cyberjack-3.99.5final.SP09-configure.patch |
20 |
BuildRequires: gcc |
21 |
BuildRequires: gcc-c++ |
22 |
BuildRequires: pkgconfig(libpcsclite) |
23 |
BuildRequires: pkgconfig(libusb-1.0) |
24 |
BuildRequires: pkgconfig(libxml-2.0) |
25 |
BuildRequires: readline-devel |
26 |
BuildRequires: sysfsutils-devel |
27 |
# for macro definition: |
28 |
BuildRequires: pkgconfig(libsystemd) |
29 |
Requires: pcsc-lite |
30 |
Requires: udev |
31 |
|
32 |
%description |
33 |
REINER SCT cyberJack USB chip card reader user space driver. |
34 |
|
35 |
This package includes the IFD driver for the cyberJack contactless (RFID) |
36 |
and contact USB chipcard reader. |
37 |
|
38 |
For more information regarding installation under Linux see the README.txt |
39 |
in the documentation directory, esp. regarding compatibility with host |
40 |
controllers. |
41 |
|
42 |
For more information about the reader, software updates and a shop see |
43 |
https://www.reiner-sct.com/ |
44 |
|
45 |
|
46 |
%prep |
47 |
%setup -q -n %{name}-%{main_version}final.%{sub_version} |
48 |
%autopatch -p1 |
49 |
|
50 |
install -pm 644 %{SOURCE1} README-MAGEIA.txt |
51 |
|
52 |
install -pm 644 %{SOURCE2} debian/ |
53 |
|
54 |
%build |
55 |
autoreconf -vfi |
56 |
|
57 |
%configure --disable-static \ |
58 |
--mandir=%{_mandir}/man8 \ |
59 |
--enable-pcsc \ |
60 |
--sysconfdir="%{_sysconfdir}" \ |
61 |
--with-usbdropdir="%{readers_dir}" \ |
62 |
--enable-release \ |
63 |
--enable-udev \ |
64 |
--enable-hal=no |
65 |
|
66 |
%make_build |
67 |
|
68 |
#manually build extra tools |
69 |
%make_build -C tools/cjflash |
70 |
%make_build -C tools/cjgeldkarte |
71 |
|
72 |
pushd doc |
73 |
iconv -f iso8859-1 -t utf-8 LIESMICH.txt > LIESMICH.txt.conv && mv -f LIESMICH.txt.conv LIESMICH.txt |
74 |
iconv -f iso8859-1 -t utf-8 README.txt > README.txt.conv && mv -f README.txt.conv README.txt |
75 |
popd |
76 |
|
77 |
%install |
78 |
%make_install |
79 |
|
80 |
# cjflash and cjgeldkarte does not get installed automatically |
81 |
%make_install -C tools/cjflash |
82 |
%make_install -C tools/cjgeldkarte |
83 |
|
84 |
#remove unneeded files |
85 |
rm -f %{buildroot}%{_libdir}/cyberjack/pcscd_init.diff |
86 |
rm -f %{buildroot}%{_libdir}/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.la |
87 |
|
88 |
mv %{buildroot}%{_sysconfdir}/cyberjack.conf.default %{buildroot}%{_sysconfdir}/cyberjack.conf |
89 |
|
90 |
# udev rule based on the file from debian sub-folder |
91 |
# we need the devices to be in group cyberjack |
92 |
sed -i 's/GROUP="pcscd"/GROUP="cyberjack"/' debian/libifd-cyberjack6.udev |
93 |
install -Dm 644 debian/libifd-cyberjack6.udev %{buildroot}%{_udevrulesdir}/93-cyberjack.rules |
94 |
|
95 |
|
96 |
%pre |
97 |
%_pre_groupadd cyberjack |
98 |
|
99 |
%post |
100 |
%udev_rules_update |
101 |
|
102 |
%systemd_postun_with_restart pcscd.socket |
103 |
|
104 |
|
105 |
%postun |
106 |
%udev_rules_update |
107 |
|
108 |
%systemd_postun_with_restart pcscd.socket |
109 |
|
110 |
|
111 |
%files |
112 |
# AUTHORS is 0 length and will not be packaged therefore |
113 |
%doc etc/cyberjack.conf.default README-MAGEIA.txt ChangeLog |
114 |
%doc doc/README.txt doc/README.pdf doc/README.html |
115 |
%doc doc/LIESMICH.txt doc/LIESMICH.pdf doc/LIESMICH.html |
116 |
%license COPYING COPYRIGHT.GPL COPYRIGHT.LGPL |
117 |
|
118 |
%config(noreplace) %{_sysconfdir}/cyberjack.conf |
119 |
%{_bindir}/cjflash |
120 |
%{_bindir}/cjgeldkarte |
121 |
%{_udevrulesdir}/93-cyberjack.rules |
122 |
%{readers_dir}/libifd-cyberjack.bundle/Contents/Info.plist |
123 |
%{readers_dir}/libifd-cyberjack.bundle/Contents/PkgInfo |
124 |
%{readers_dir}/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so |
125 |
%{readers_dir}/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so.* |