]> git.pld-linux.org Git - packages/pcsc-lite.git/blob - pcsc-lite.spec
- package ipcdir
[packages/pcsc-lite.git] / pcsc-lite.spec
1 #
2 # Conditional build:
3 %bcond_without  hal     # use libusb instead of HAL
4
5 Summary:        PCSC Framework for Linux
6 Summary(pl.UTF-8):      Środowisko PCSC dla Linuksa
7 Name:           pcsc-lite
8 Version:        1.6.6
9 Release:        0.2
10 License:        BSD
11 Group:          Daemons
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
24 BuildRequires:  flex
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
33 Requires:       rc-scripts
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         usbdropdir      /usr/%{_lib}/pcsc/drivers
37
38 %description
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).
45
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)
52 Windows(R).
53
54 %package libs
55 Summary:        PC/SC Lite libraries
56 Summary(pl.UTF-8):      Biblioteki PC/SC Lite
57 Group:          Libraries
58
59 %description libs
60 PC/SC Lite libraries.
61
62 %description libs -l pl.UTF-8
63 Biblioteki PC/SC Lite.
64
65 %package devel
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}
70
71 %description devel
72 PC/SC Lite development files.
73
74 %description devel -l pl.UTF-8
75 Pliki dla programistów używających PC/SC Lite.
76
77 %package static
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}
82
83 %description static
84 Static PC/SC Lite libraries.
85
86 %description static -l pl.UTF-8
87 Statyczne biblioteki PC/SC Lite.
88
89 %package apidocs
90 Summary:        PC/SC Lite API documentation
91 Summary(pl.UTF-8):      Dokumentacja API biblioteki PC/SC Lite
92 Group:          Documentation
93
94 %description apidocs
95 API and internal documentation for PC/SC Lite library.
96
97 %description apidocs -l pl.UTF-8
98 Dokumentacja API biblioteki PC/SC Lite.
99
100 %prep
101 %setup -q
102 %patch0 -p1
103 %patch1 -p1
104 %patch2 -p1
105 %patch3 -p1
106
107 %build
108 %{__libtoolize}
109 %{__aclocal} -I m4
110 %{__autoconf}
111 %{__autoheader}
112 %{__automake}
113 # auto power down unreliable yet
114 CPPFLAGS="%{rpmcppflags} -DDISABLE_ON_DEMAND_POWER_ON"
115 %configure \
116         %{!?with_hal:--disable-libhal} \
117         --enable-ipcdir=/var/run/pcscd \
118         --enable-static \
119         --enable-usbdropdir=%{usbdropdir}
120
121 %{__make}
122
123 %if %{with apidocs}
124 doxygen doc/doxygen.conf
125 rm -f doc/api/*.{map,md5}
126 %endif
127
128 %install
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}
133
134 %{__make} install \
135         DESTDIR=$RPM_BUILD_ROOT
136
137 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
138
139 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pcscd
140 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
141
142 cp -a doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
143
144 rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %pretrans
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
154 fi
155
156 %post
157 /sbin/chkconfig --add pcscd
158 %service pcscd restart "PC/SC smart card daemon"
159
160 %preun
161 if [ "$1" = "0" ]; then
162         %service pcscd stop
163         /sbin/chkconfig --del pcscd
164 fi
165
166 %post   libs -p /sbin/ldconfig
167 %postun libs -p /sbin/ldconfig
168
169 %files
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
173 %dir %{_libdir}/pcsc
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*
180 %dir /var/run/pcscd
181
182 %files libs
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/libpcsclite.so.*.*.*
185 %attr(755,root,root) %ghost %{_libdir}/libpcsclite.so.1
186
187 %files devel
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
192 %{_includedir}/PCSC
193 %{_pkgconfigdir}/libpcsclite.pc
194 %{_examplesdir}/%{name}-%{version}
195
196 %files static
197 %defattr(644,root,root,755)
198 %{_libdir}/libpcsclite.a
199
200 %if %{with apidocs}
201 %files apidocs
202 %defattr(644,root,root,755)
203 %doc doc/api/*
204 %endif
This page took 0.061274 seconds and 4 git commands to generate.