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