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 hal # use libusb instead of HAL
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/download.php/3479/%{name}-%{version}.tar.bz2
18 # Source0-md5: f80d3ecd9569b71d557f283f16295c74
19 Source1: %{name}-pcscd.init
20 Source2: %{name}-pcscd.sysconfig
21 Patch0: %{name}-fhs.patch
22 Patch1: %{name}-any.patch
23 Patch2: noautostart.patch
24 Patch3: debuglog-pid.patch
25 Patch4: configure-expand.patch
26 URL: http://www.linuxnet.com/middle.html
27 BuildRequires: autoconf >= 2.58
28 BuildRequires: automake >= 1:1.8
30 %{?with_apidocs:BuildRequires: graphviz}
31 %{?with_hal:BuildRequires: hal-devel}
32 BuildRequires: libtool >= 2:2.0
33 %{!?with_hal:BuildRequires: libusb-devel >= 1.0}
34 BuildRequires: pkgconfig
35 BuildRequires: rpmbuild(macros) >= 1.268
36 Requires(post,preun): /sbin/chkconfig
37 Requires(pretrans): fileutils
38 Requires: rc-scripts >= 0.4.1.26
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %define usbdropdir /usr/%{_lib}/pcsc/drivers
44 pcscd is the daemon program for PC/SC Lite. It is a resource manager
45 that coorinates communications with Smart Card readers and Smart Cards
46 that are connected to the system. The purpose of PCSC Lite is to
47 provide a Windows(R) SCard interface in a very small form factor for
48 communicating to smartcards and readers. PCSC Lite uses the same
49 winscard api as used under Windows(R).
51 %description -l pl.UTF-8
52 pcscd jest demonem dla PC/SC Lite. Jest to zarządca zasobów,
53 koordynujący komunikację z czytnikami kart procesorowych podłączonymi
54 do systemu. Celem PCSC Lite jest udostępnienie interfejsu zgodnego z
55 Windows(R) SCard służącego do komunikacji z czytnikami kart chipowych.
56 Używa tego samego API winscard, które jest używane pod Microsoft(TM)
60 Summary: PC/SC Lite libraries
61 Summary(pl.UTF-8): Biblioteki PC/SC Lite
67 %description libs -l pl.UTF-8
68 Biblioteki PC/SC Lite.
71 Summary: PC/SC Lite development files
72 Summary(pl.UTF-8): Pliki dla programistów używających PC/SC Lite
73 Group: Development/Libraries
74 Requires: %{name}-libs = %{version}-%{release}
77 PC/SC Lite development files.
79 %description devel -l pl.UTF-8
80 Pliki dla programistów używających PC/SC Lite.
83 Summary: Static PC/SC Lite libraries
84 Summary(pl.UTF-8): Biblioteki statyczne PC/SC Lite
85 Group: Development/Libraries
86 Requires: %{name}-devel = %{version}-%{release}
89 Static PC/SC Lite libraries.
91 %description static -l pl.UTF-8
92 Statyczne biblioteki PC/SC Lite.
95 Summary: PC/SC Lite API documentation
96 Summary(pl.UTF-8): Dokumentacja API biblioteki PC/SC Lite
100 API and internal documentation for PC/SC Lite library.
102 %description apidocs -l pl.UTF-8
103 Dokumentacja API biblioteki PC/SC Lite.
119 # auto power down unreliable yet
120 CPPFLAGS="%{rpmcppflags} -DDISABLE_ON_DEMAND_POWER_ON"
122 %{!?with_hal:--disable-libhal} \
123 --enable-ipcdir=/var/run/pcscd \
125 --enable-usbdropdir=%{usbdropdir}
130 doxygen doc/doxygen.conf
131 rm -f doc/api/*.{map,md5}
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT%{usbdropdir} \
137 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
138 $RPM_BUILD_ROOT/var/run/pcscd \
139 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
142 DESTDIR=$RPM_BUILD_ROOT
144 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
146 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pcscd
147 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
149 cp -a doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
151 rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
154 rm -rf $RPM_BUILD_ROOT
157 # upgrade from pcsc-lite < 1.2.9-0.beta7
158 if [ -f /etc/reader.conf -a ! -f /etc/reader.conf.d/reader.conf ]; then
159 install -d -m755 /etc/reader.conf.d
160 cp -af /etc/reader.conf /etc/reader.conf.d/reader.conf
164 /sbin/chkconfig --add pcscd
165 %service pcscd restart "PC/SC smart card daemon"
168 if [ "$1" = "0" ]; then
170 /sbin/chkconfig --del pcscd
173 %post libs -p /sbin/ldconfig
174 %postun libs -p /sbin/ldconfig
177 %defattr(644,root,root,755)
178 %doc AUTHORS COPYING ChangeLog* DRIVERS HELP NEWS README SECURITY TODO doc/README.DAEMON
179 %attr(755,root,root) %{_sbindir}/pcscd
181 %dir %{_libdir}/pcsc/drivers
182 %dir %{_sysconfdir}/reader.conf.d
183 %attr(754,root,root) /etc/rc.d/init.d/pcscd
184 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pcscd
185 %{_mandir}/man5/reader.conf.5*
186 %{_mandir}/man8/pcscd.8*
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{_libdir}/libpcsclite.so.*.*.*
192 %attr(755,root,root) %ghost %{_libdir}/libpcsclite.so.1
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/libpcsclite.so
197 %{_libdir}/libpcsclite.la
199 %{_pkgconfigdir}/libpcsclite.pc
200 %{_examplesdir}/%{name}-%{version}
203 %defattr(644,root,root,755)
204 %{_libdir}/libpcsclite.a
208 %defattr(644,root,root,755)