3 %bcond_without hal # use libusb instead of HAL
5 Summary: Muscle PCSC Framework for Linux
6 Summary(pl.UTF-8): Środowisko PCSC dla Linuksa
12 #Source0Download: http://alioth.debian.org/project/showfiles.php?group_id=30105
13 Source0: http://alioth.debian.org/frs/download.php/2795/%{name}-%{version}.tar.bz2
14 # Source0-md5: d7d466621bec39354351f09349f6374c
15 Source1: %{name}-pcscd.init
16 Source2: %{name}-pcscd.sysconfig
17 Patch0: %{name}-fhs.patch
18 Patch1: %{name}-any.patch
19 URL: http://www.linuxnet.com/middle.html
20 BuildRequires: autoconf >= 2.58
21 BuildRequires: automake >= 1:1.8
23 %{?with_hal:BuildRequires: hal-devel}
24 BuildRequires: libtool >= 1.4.2-9
25 %{!?with_hal:BuildRequires: libusb-devel >= 0.1.7}
26 BuildRequires: pkgconfig
27 BuildRequires: rpmbuild(macros) >= 1.268
29 BuildRequires: tetex-format-pdflatex
30 BuildRequires: tetex-latex-ae
31 Requires(post,preun): /sbin/chkconfig
32 Requires(pre): fileutils
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define usbdropdir /usr/%{_lib}/pcsc/drivers
37 %define muscledropdir /usr/%{_lib}/pcsc/services
40 pcscd is the daemon program for PC/SC Lite. It is a resource manager
41 that coorinates communications with Smart Card readers and Smart Cards
42 that are connected to the system. The purpose of PCSC Lite is to
43 provide a Windows(R) SCard interface in a very small form factor for
44 communicating to smartcards and readers. PCSC Lite uses the same
45 winscard api as used under Windows(R).
47 %description -l pl.UTF-8
48 pcscd jest demonem dla PC/SC Lite. Jest to zarządca zasobów,
49 koordynujący komunikację z czytnikami kart procesorowych podłączonymi
50 do systemu. Celem PCSC Lite jest udostępnienie interfejsu zgodnego z
51 Windows(R) SCard służącego do komunikacji z czytnikami kart chipowych.
52 Używa tego samego API winscard, które jest używane pod Microsoft(TM)
56 Summary: PC/SC Lite libraries
57 Summary(pl.UTF-8): Biblioteki PC/SC Lite
63 %description libs -l pl.UTF-8
64 Biblioteki PC/SC Lite.
67 Summary: PC/SC Lite development files
68 Summary(pl.UTF-8): Pliki dla programistów używających PC/SC Lite
69 Group: Development/Libraries
70 Requires: %{name}-libs = %{version}-%{release}
73 PC/SC Lite development files.
75 %description devel -l pl.UTF-8
76 Pliki dla programistów używających PC/SC Lite.
79 Summary: Static PC/SC Lite libraries
80 Summary(pl.UTF-8): Biblioteki statyczne PC/SC Lite
81 Group: Development/Libraries
82 Requires: %{name}-devel = %{version}-%{release}
85 Static PC/SC Lite libraries.
87 %description static -l pl.UTF-8
88 Statyczne biblioteki PC/SC Lite.
102 %{!?with_hal:--disable-hal} \
103 --enable-muscledropdir=%{muscledropdir} \
104 --enable-runpid=/var/run/pcscd.pid \
105 --enable-usbdropdir=%{usbdropdir}
110 %{__make} -C doc ifdhandler-3.pdf pcsc-lite.pdf
113 rm -rf $RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT{%{usbdropdir},%{muscledropdir}} \
115 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
116 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
119 DESTDIR=$RPM_BUILD_ROOT
121 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pcscd
122 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
124 install doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
126 :> $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf
127 rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
130 rm -rf $RPM_BUILD_ROOT
133 # upgrade from pcsc-lite < 1.2.9-0.beta7
134 if [ -f /etc/reader.conf -a ! -f /etc/reader.conf.d/reader.conf ]; then
135 install -d -m755 /etc/reader.conf.d
136 cp -af /etc/reader.conf /etc/reader.conf.d/reader.conf
140 /sbin/chkconfig --add pcscd
141 %service pcscd restart "pcscd daemon"
144 if [ "$1" = "0" ]; then
146 /sbin/chkconfig --del pcscd
149 %post libs -p /sbin/ldconfig
150 %postun libs -p /sbin/ldconfig
153 %defattr(644,root,root,755)
154 %doc AUTHORS COPYING ChangeLog* DRIVERS HELP NEWS README SECURITY TODO doc/README.DAEMON
155 %attr(755,root,root) %{_sbindir}/pcscd
156 %attr(755,root,root) %{_sbindir}/update-reader.conf
158 %dir %{_sysconfdir}/reader.conf.d
159 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/reader.conf.d/reader.conf
160 %ghost %{_sysconfdir}/reader.conf
161 %attr(754,root,root) /etc/rc.d/init.d/pcscd
162 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pcscd
163 %{_mandir}/man5/reader.conf.5*
164 %{_mandir}/man8/pcscd.8*
165 %{_mandir}/man8/update-reader.conf.8*
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_libdir}/libpcsclite.so.*.*.*
170 %attr(755,root,root) %ghost %{_libdir}/libpcsclite.so.1
173 %defattr(644,root,root,755)
175 %attr(755,root,root) %{_libdir}/libpcsclite.so
176 %{_libdir}/libpcsclite.la
178 %{_pkgconfigdir}/libpcsclite.pc
179 %{_examplesdir}/%{name}-%{version}
182 %defattr(644,root,root,755)
183 %{_libdir}/libpcsclite.a