]> git.pld-linux.org Git - packages/pcsc-lite.git/blob - pcsc-lite.spec
- BR: texlive-latex-bibtex
[packages/pcsc-lite.git] / pcsc-lite.spec
1 #
2 # Conditional build:
3 %bcond_without  hal     # use libusb instead of HAL
4 #
5 Summary:        Muscle PCSC Framework for Linux
6 Summary(pl.UTF-8):      Środowisko PCSC dla Linuksa
7 Name:           pcsc-lite
8 Version:        1.5.5
9 Release:        1
10 License:        BSD
11 Group:          Daemons
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
22 BuildRequires:  flex
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
34 Requires:       rc-scripts
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         usbdropdir      /usr/%{_lib}/pcsc/drivers
38 %define         muscledropdir   /usr/%{_lib}/pcsc/services
39
40 %description
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).
47
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)
54 Windows(R).
55
56 %package libs
57 Summary:        PC/SC Lite libraries
58 Summary(pl.UTF-8):      Biblioteki PC/SC Lite
59 Group:          Libraries
60
61 %description libs
62 PC/SC Lite libraries.
63
64 %description libs -l pl.UTF-8
65 Biblioteki PC/SC Lite.
66
67 %package devel
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}
72
73 %description devel
74 PC/SC Lite development files.
75
76 %description devel -l pl.UTF-8
77 Pliki dla programistów używających PC/SC Lite.
78
79 %package static
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}
84
85 %description static
86 Static PC/SC Lite libraries.
87
88 %description static -l pl.UTF-8
89 Statyczne biblioteki PC/SC Lite.
90
91 %prep
92 %setup -q
93 %patch0 -p1
94 %patch1 -p1
95
96 %build
97 %{__libtoolize}
98 %{__aclocal} -I m4
99 %{__autoconf}
100 %{__autoheader}
101 %{__automake}
102 %configure \
103         %{!?with_hal:--disable-libhal} \
104         --enable-muscledropdir=%{muscledropdir} \
105         --enable-runpid=/var/run/pcscd.pid \
106         --enable-usbdropdir=%{usbdropdir}
107
108 %{__make}
109
110 # temporary?
111 %{__make} -C doc ifdhandler-3.pdf pcsc-lite.pdf
112
113 %install
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}
118
119 %{__make} install \
120         DESTDIR=$RPM_BUILD_ROOT
121
122 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pcscd
123 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
124
125 install doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
126
127 :> $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf
128 rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %pre
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
138 fi
139
140 %post
141 /sbin/chkconfig --add pcscd
142 %service pcscd restart "pcscd daemon"
143
144 %preun
145 if [ "$1" = "0" ]; then
146         %service pcscd stop
147         /sbin/chkconfig --del pcscd
148 fi
149
150 %post   libs -p /sbin/ldconfig
151 %postun libs -p /sbin/ldconfig
152
153 %files
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
158 %{_libdir}/pcsc
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*
167
168 %files libs
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libpcsclite.so.*.*.*
171 %attr(755,root,root) %ghost %{_libdir}/libpcsclite.so.1
172
173 %files devel
174 %defattr(644,root,root,755)
175 %doc doc/*.pdf
176 %attr(755,root,root) %{_libdir}/libpcsclite.so
177 %{_libdir}/libpcsclite.la
178 %{_includedir}/PCSC
179 %{_pkgconfigdir}/libpcsclite.pc
180 %{_examplesdir}/%{name}-%{version}
181
182 %files static
183 %defattr(644,root,root,755)
184 %{_libdir}/libpcsclite.a
This page took 0.171224 seconds and 4 git commands to generate.