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/3082/%{name}-%{version}.tar.bz2
14 # Source0-md5: 6707e967fc8bb398a5d1b1089d4dff63
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
28 BuildRequires: texlive-format-pdflatex
29 BuildRequires: texlive-latex-ae
30 BuildRequires: texlive-latex-bibtex
31 BuildRequires: texlive-xetex
32 Requires(post,preun): /sbin/chkconfig
33 Requires(pre): fileutils
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define usbdropdir /usr/%{_lib}/pcsc/drivers
38 %define muscledropdir /usr/%{_lib}/pcsc/services
41 pcscd is the daemon program for PC/SC Lite. It is a resource manager
42 that coorinates communications with Smart Card readers and Smart Cards
43 that are connected to the system. The purpose of PCSC Lite is to
44 provide a Windows(R) SCard interface in a very small form factor for
45 communicating to smartcards and readers. PCSC Lite uses the same
46 winscard api as used under Windows(R).
48 %description -l pl.UTF-8
49 pcscd jest demonem dla PC/SC Lite. Jest to zarządca zasobów,
50 koordynujący komunikację z czytnikami kart procesorowych podłączonymi
51 do systemu. Celem PCSC Lite jest udostępnienie interfejsu zgodnego z
52 Windows(R) SCard służącego do komunikacji z czytnikami kart chipowych.
53 Używa tego samego API winscard, które jest używane pod Microsoft(TM)
57 Summary: PC/SC Lite libraries
58 Summary(pl.UTF-8): Biblioteki PC/SC Lite
64 %description libs -l pl.UTF-8
65 Biblioteki PC/SC Lite.
68 Summary: PC/SC Lite development files
69 Summary(pl.UTF-8): Pliki dla programistów używających PC/SC Lite
70 Group: Development/Libraries
71 Requires: %{name}-libs = %{version}-%{release}
74 PC/SC Lite development files.
76 %description devel -l pl.UTF-8
77 Pliki dla programistów używających PC/SC Lite.
80 Summary: Static PC/SC Lite libraries
81 Summary(pl.UTF-8): Biblioteki statyczne PC/SC Lite
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{version}-%{release}
86 Static PC/SC Lite libraries.
88 %description static -l pl.UTF-8
89 Statyczne biblioteki PC/SC Lite.
103 %{!?with_hal:--disable-libhal} \
104 --enable-muscledropdir=%{muscledropdir} \
105 --enable-runpid=/var/run/pcscd.pid \
106 --enable-usbdropdir=%{usbdropdir}
111 %{__make} -C doc ifdhandler-3.pdf pcsc-lite.pdf
114 rm -rf $RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT{%{usbdropdir},%{muscledropdir}} \
116 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
117 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
120 DESTDIR=$RPM_BUILD_ROOT
122 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pcscd
123 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
125 install doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
127 :> $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf
128 rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
131 rm -rf $RPM_BUILD_ROOT
134 # upgrade from pcsc-lite < 1.2.9-0.beta7
135 if [ -f /etc/reader.conf -a ! -f /etc/reader.conf.d/reader.conf ]; then
136 install -d -m755 /etc/reader.conf.d
137 cp -af /etc/reader.conf /etc/reader.conf.d/reader.conf
141 /sbin/chkconfig --add pcscd
142 %service pcscd restart "pcscd daemon"
145 if [ "$1" = "0" ]; then
147 /sbin/chkconfig --del pcscd
150 %post libs -p /sbin/ldconfig
151 %postun libs -p /sbin/ldconfig
154 %defattr(644,root,root,755)
155 %doc AUTHORS COPYING ChangeLog* DRIVERS HELP NEWS README SECURITY TODO doc/README.DAEMON
156 %attr(755,root,root) %{_sbindir}/pcscd
157 %attr(755,root,root) %{_sbindir}/update-reader.conf
159 %dir %{_sysconfdir}/reader.conf.d
160 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/reader.conf.d/reader.conf
161 %ghost %{_sysconfdir}/reader.conf
162 %attr(754,root,root) /etc/rc.d/init.d/pcscd
163 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pcscd
164 %{_mandir}/man5/reader.conf.5*
165 %{_mandir}/man8/pcscd.8*
166 %{_mandir}/man8/update-reader.conf.8*
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libpcsclite.so.*.*.*
171 %attr(755,root,root) %ghost %{_libdir}/libpcsclite.so.1
174 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_libdir}/libpcsclite.so
177 %{_libdir}/libpcsclite.la
179 %{_pkgconfigdir}/libpcsclite.pc
180 %{_examplesdir}/%{name}-%{version}
183 %defattr(644,root,root,755)
184 %{_libdir}/libpcsclite.a