2 # - pcscd & pcscd-lite-libs need to be exactly same version installed otherwise
3 # client will flood daemon so much that daemon is not usable (max 200
4 # connections reached, etc)
7 %bcond_without udev # use libusb instead of libudev
9 Summary: PCSC Framework for Linux
10 Summary(pl.UTF-8): Środowisko PCSC dla Linuksa
16 # Source0Download: http://alioth.debian.org/project/showfiles.php?group_id=30105
17 Source0: http://alioth.debian.org/frs/download.php/3598/%{name}-%{version}.tar.bz2
18 # Source0-md5: 1caf0b8ca2ecbf82fe3b035b3fff22dd
19 Source1: %{name}-pcscd.init
20 Source2: %{name}-pcscd.sysconfig
21 Source3: pcscd.upstart
22 Patch0: %{name}-fhs.patch
23 Patch1: %{name}-any.patch
24 Patch2: noautostart.patch
25 Patch3: debuglog-pid.patch
26 Patch4: configure-expand.patch
27 URL: http://www.linuxnet.com/middle.html
28 BuildRequires: autoconf >= 2.58
29 BuildRequires: automake >= 1:1.8
31 %{?with_apidocs:BuildRequires: graphviz}
32 BuildRequires: libtool >= 2:2.0
33 %{!?with_udev:BuildRequires: libusb-devel >= 1.0}
34 BuildRequires: pkgconfig
35 BuildRequires: rpmbuild(macros) >= 1.268
36 %{?with_udev:BuildRequires: udev-devel}
37 Requires(post,preun): /sbin/chkconfig
38 Requires(pretrans): fileutils
39 Requires: rc-scripts >= 0.4.3.0
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define usbdropdir /usr/%{_lib}/pcsc/drivers
45 pcscd is the daemon program for PC/SC Lite. It is a resource manager
46 that coorinates communications with Smart Card readers and Smart Cards
47 that are connected to the system. The purpose of PCSC Lite is to
48 provide a Windows(R) SCard interface in a very small form factor for
49 communicating to smartcards and readers. PCSC Lite uses the same
50 winscard api as used under Windows(R).
52 %description -l pl.UTF-8
53 pcscd jest demonem dla PC/SC Lite. Jest to zarządca zasobów,
54 koordynujący komunikację z czytnikami kart procesorowych podłączonymi
55 do systemu. Celem PCSC Lite jest udostępnienie interfejsu zgodnego z
56 Windows(R) SCard służącego do komunikacji z czytnikami kart chipowych.
57 Używa tego samego API winscard, które jest używane pod Microsoft(TM)
61 Summary: PC/SC Lite libraries
62 Summary(pl.UTF-8): Biblioteki PC/SC Lite
68 %description libs -l pl.UTF-8
69 Biblioteki PC/SC Lite.
72 Summary: PC/SC Lite development files
73 Summary(pl.UTF-8): Pliki dla programistów używających PC/SC Lite
74 Group: Development/Libraries
75 Requires: %{name}-libs = %{version}-%{release}
78 PC/SC Lite development files.
80 %description devel -l pl.UTF-8
81 Pliki dla programistów używających PC/SC Lite.
84 Summary: Static PC/SC Lite libraries
85 Summary(pl.UTF-8): Biblioteki statyczne PC/SC Lite
86 Group: Development/Libraries
87 Requires: %{name}-devel = %{version}-%{release}
90 Static PC/SC Lite libraries.
92 %description static -l pl.UTF-8
93 Statyczne biblioteki PC/SC Lite.
96 Summary: PC/SC Lite API documentation
97 Summary(pl.UTF-8): Dokumentacja API biblioteki PC/SC Lite
101 API and internal documentation for PC/SC Lite library.
103 %description apidocs -l pl.UTF-8
104 Dokumentacja API biblioteki PC/SC Lite.
120 # auto power down unreliable yet
121 CPPFLAGS="%{rpmcppflags} -DDISABLE_ON_DEMAND_POWER_ON"
123 %{!?with_udev:--disable-libudev} \
124 --enable-ipcdir=/var/run/pcscd \
126 --enable-usbdropdir=%{usbdropdir}
131 doxygen doc/doxygen.conf
132 rm -f doc/api/*.{map,md5}
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT%{usbdropdir} \
138 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,init} \
139 $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d \
140 $RPM_BUILD_ROOT/var/run/pcscd \
141 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
144 DESTDIR=$RPM_BUILD_ROOT
146 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
148 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pcscd
149 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
150 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/init/pcscd.conf
152 cp -p doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
155 rm -rf $RPM_BUILD_ROOT
158 # upgrade from pcsc-lite < 1.2.9-0.beta7
159 if [ -f /etc/reader.conf -a ! -f %{_sysconfdir}/reader.conf.d/reader.conf ]; then
160 install -d -m755 %{_sysconfdir}/reader.conf.d
161 cp -af /etc/reader.conf %{_sysconfdir}/reader.conf.d/reader.conf
165 /sbin/chkconfig --add pcscd
166 %service pcscd restart "PC/SC smart card daemon"
169 if [ "$1" = "0" ]; then
171 /sbin/chkconfig --del pcscd
174 %post libs -p /sbin/ldconfig
175 %postun libs -p /sbin/ldconfig
178 %defattr(644,root,root,755)
179 %doc AUTHORS COPYING ChangeLog* DRIVERS HELP NEWS README SECURITY TODO doc/README.DAEMON
180 %attr(755,root,root) %{_sbindir}/pcscd
182 %dir %{_libdir}/pcsc/drivers
183 %dir %{_sysconfdir}/reader.conf.d
184 %attr(754,root,root) /etc/rc.d/init.d/pcscd
185 %config(noreplace) %verify(not md5 mtime size) /etc/init/pcscd.conf
186 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pcscd
187 %{_mandir}/man5/reader.conf.5*
188 %{_mandir}/man8/pcscd.8*
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_libdir}/libpcsclite.so.*.*.*
194 %attr(755,root,root) %ghost %{_libdir}/libpcsclite.so.1
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_libdir}/libpcsclite.so
199 %{_libdir}/libpcsclite.la
201 %{_pkgconfigdir}/libpcsclite.pc
202 %{_examplesdir}/%{name}-%{version}
205 %defattr(644,root,root,755)
206 %{_libdir}/libpcsclite.a
210 %defattr(644,root,root,755)