3 %bcond_without hal # use libusb instead of HAL
5 Summary: 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/download.php/3479/%{name}-%{version}.tar.bz2
14 # Source0-md5: f80d3ecd9569b71d557f283f16295c74
15 Source1: %{name}-pcscd.init
16 Source2: %{name}-pcscd.sysconfig
17 Patch0: %{name}-fhs.patch
18 Patch1: %{name}-any.patch
19 Patch2: noautostart.patch
20 Patch3: debuglog-pid.patch
21 URL: http://www.linuxnet.com/middle.html
22 BuildRequires: autoconf >= 2.58
23 BuildRequires: automake >= 1:1.8
25 %{?with_apidocs:BuildRequires: graphviz}
26 %{?with_hal:BuildRequires: hal-devel}
27 BuildRequires: libtool >= 1.4.2-9
28 %{!?with_hal:BuildRequires: libusb-devel >= 1.0}
29 BuildRequires: pkgconfig
30 BuildRequires: rpmbuild(macros) >= 1.268
31 Requires(post,preun): /sbin/chkconfig
32 Requires(pretrans): fileutils
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define usbdropdir /usr/%{_lib}/pcsc/drivers
39 pcscd is the daemon program for PC/SC Lite. It is a resource manager
40 that coorinates communications with Smart Card readers and Smart Cards
41 that are connected to the system. The purpose of PCSC Lite is to
42 provide a Windows(R) SCard interface in a very small form factor for
43 communicating to smartcards and readers. PCSC Lite uses the same
44 winscard api as used under Windows(R).
46 %description -l pl.UTF-8
47 pcscd jest demonem dla PC/SC Lite. Jest to zarządca zasobów,
48 koordynujący komunikację z czytnikami kart procesorowych podłączonymi
49 do systemu. Celem PCSC Lite jest udostępnienie interfejsu zgodnego z
50 Windows(R) SCard służącego do komunikacji z czytnikami kart chipowych.
51 Używa tego samego API winscard, które jest używane pod Microsoft(TM)
55 Summary: PC/SC Lite libraries
56 Summary(pl.UTF-8): Biblioteki PC/SC Lite
62 %description libs -l pl.UTF-8
63 Biblioteki PC/SC Lite.
66 Summary: PC/SC Lite development files
67 Summary(pl.UTF-8): Pliki dla programistów używających PC/SC Lite
68 Group: Development/Libraries
69 Requires: %{name}-libs = %{version}-%{release}
72 PC/SC Lite development files.
74 %description devel -l pl.UTF-8
75 Pliki dla programistów używających PC/SC Lite.
78 Summary: Static PC/SC Lite libraries
79 Summary(pl.UTF-8): Biblioteki statyczne PC/SC Lite
80 Group: Development/Libraries
81 Requires: %{name}-devel = %{version}-%{release}
84 Static PC/SC Lite libraries.
86 %description static -l pl.UTF-8
87 Statyczne biblioteki PC/SC Lite.
90 Summary: PC/SC Lite API documentation
91 Summary(pl.UTF-8): Dokumentacja API biblioteki PC/SC Lite
95 API and internal documentation for PC/SC Lite library.
97 %description apidocs -l pl.UTF-8
98 Dokumentacja API biblioteki PC/SC Lite.
113 # auto power down unreliable yet
114 CPPFLAGS="%{rpmcppflags} -DDISABLE_ON_DEMAND_POWER_ON"
116 %{!?with_hal:--disable-libhal} \
117 --enable-ipcdir=/var/run/pcscd \
119 --enable-usbdropdir=%{usbdropdir}
124 doxygen doc/doxygen.conf
125 rm -f doc/api/*.{map,md5}
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT%{usbdropdir} \
131 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
132 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
135 DESTDIR=$RPM_BUILD_ROOT
137 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
139 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pcscd
140 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
142 cp -a doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
144 rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
147 rm -rf $RPM_BUILD_ROOT
150 # upgrade from pcsc-lite < 1.2.9-0.beta7
151 if [ -f /etc/reader.conf -a ! -f /etc/reader.conf.d/reader.conf ]; then
152 install -d -m755 /etc/reader.conf.d
153 cp -af /etc/reader.conf /etc/reader.conf.d/reader.conf
157 /sbin/chkconfig --add pcscd
158 %service pcscd restart "PC/SC smart card daemon"
161 if [ "$1" = "0" ]; then
163 /sbin/chkconfig --del pcscd
166 %post libs -p /sbin/ldconfig
167 %postun libs -p /sbin/ldconfig
170 %defattr(644,root,root,755)
171 %doc AUTHORS COPYING ChangeLog* DRIVERS HELP NEWS README SECURITY TODO doc/README.DAEMON
172 %attr(755,root,root) %{_sbindir}/pcscd
174 %dir %{_libdir}/pcsc/drivers
175 %dir %{_sysconfdir}/reader.conf.d
176 %attr(754,root,root) /etc/rc.d/init.d/pcscd
177 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pcscd
178 %{_mandir}/man5/reader.conf.5*
179 %{_mandir}/man8/pcscd.8*
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/libpcsclite.so.*.*.*
185 %attr(755,root,root) %ghost %{_libdir}/libpcsclite.so.1
188 %defattr(644,root,root,755)
189 %doc doc/example/pcsc_demo.c
190 %attr(755,root,root) %{_libdir}/libpcsclite.so
191 %{_libdir}/libpcsclite.la
193 %{_pkgconfigdir}/libpcsclite.pc
194 %{_examplesdir}/%{name}-%{version}
197 %defattr(644,root,root,755)
198 %{_libdir}/libpcsclite.a
202 %defattr(644,root,root,755)