]> git.pld-linux.org Git - packages/opensc.git/blob - opensc.spec
- rel 3
[packages/opensc.git] / opensc.spec
1 Summary:        OpenSC library - for accessing SmartCard devices using PC/SC Lite
2 Summary(pl.UTF-8):      Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite
3 Name:           opensc
4 Version:        0.11.4
5 Release:        3
6 Epoch:          0
7 License:        LGPL v2.1+
8 Group:          Applications
9 Source0:        http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz
10 # Source0-md5:  2031aa617be609d50d014d5d370bb8a2
11 URL:            http://www.opensc-project.org/
12 BuildRequires:  autoconf >= 2.52
13 BuildRequires:  automake
14 BuildRequires:  libassuan-devel >= 1:0.6.0
15 BuildRequires:  libltdl-devel
16 BuildRequires:  libtool >= 1:1.4.2-9
17 BuildRequires:  openct-devel
18 BuildRequires:  openldap-devel >= 2.4.6
19 BuildRequires:  openssl-devel >= 0.9.7d
20 BuildRequires:  pcsc-lite-devel
21 BuildRequires:  pkgconfig >= 1:0.9.0
22 BuildRequires:  readline-devel
23 BuildRequires:  rpmbuild(macros) >= 1.236
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 # datadir is used for config files and (editable) profiles
27 %define         _datadir        /etc
28 %define         _sysconfdir     /etc/opensc
29 %define         _plugindir      %{_libdir}/browser-plugins
30
31 # TODO: galeon and skipstone.
32 # use macro, otherwise extra LF inserted along with the ifarch
33 %define browsers mozilla, mozilla-firefox, konqueror, opera, seamonkey
34
35 %description
36 libopensc is a library for accessing SmartCard devices using PC/SC
37 Lite middleware package. It is also the core library of the OpenSC
38 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
39 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
40 using private keys on the SmartCard is at the moment possible only
41 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
42 IDentity) card manufactured by Setec.
43
44 %description -l pl.UTF-8
45 libopensc to biblioteka do korzystania z kart procesorowych przy
46 użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
47 biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
48 FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
49 zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
50 prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
51 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
52 IDentity) produkowanych przez Setec.
53
54 %package devel
55 Summary:        OpenSC development files
56 Summary(pl.UTF-8):      Pliki dla programistów używających OpenSC
57 Group:          Development/Tools
58 Requires:       %{name} = %{epoch}:%{version}-%{release}
59 Requires:       libltdl-devel
60 Requires:       openct-devel
61 Requires:       openssl-devel
62 Requires:       pcsc-lite-devel
63
64 %description devel
65 OpenSC development files.
66
67 %description devel -l pl.UTF-8
68 Pliki dla programistów używających OpenSC.
69
70 %package static
71 Summary:        Static OpenSC libraries
72 Summary(pl.UTF-8):      Bibloteki statyczne OpenSC
73 Group:          Development/Tools
74 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
75
76 %description static
77 Static OpenSC libraries.
78
79 %description static -l pl.UTF-8
80 Statyczne biblioteki OpenSC.
81
82 %package -n browser-plugin-opensc
83 Summary:        OpenSC Signer plugin for Mozilla
84 Summary(pl.UTF-8):      Wtyczka OpenSC Signer dla Mozilli
85 Group:          X11/Applications
86 Requires:       %{name} = %{epoch}:%{version}-%{release}
87 Requires:       browser-plugins(%{_target_base_arch})
88 Requires:       pinentry-gtk
89 Provides:       mozilla-plugin-opensc
90 Obsoletes:      mozilla-plugin-opensc
91
92 %description -n browser-plugin-opensc
93 OpenSC Signer browser plugin.
94
95 Supported browsers: %{browsers}.
96
97 %description -n browser-plugin-opensc -l pl.UTF-8
98 Wtyczka OpenSC Signer dla przeglądarek.
99
100 Obsługiwane przeglądarki: %{browsers}.
101
102 %prep
103 %setup -q
104
105 %build
106 touch config.rpath
107 %{__libtoolize}
108 %{__aclocal} -I aclocal
109 %{__autoconf}
110 %{__autoheader}
111 %{__automake}
112 %configure \
113         --with-pin-entry=/usr/bin/pinentry-gtk \
114         --with-plugin-dir="%{_plugindir}"
115
116 %{__make}
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT%{_plugindir}
121
122 %{__make} install \
123         DESTDIR=$RPM_BUILD_ROOT
124
125 # just install instead of symlinking
126 rm -f $RPM_BUILD_ROOT%{_plugindir}/opensc-signer.so
127 mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{_plugindir}
128
129 # default config
130 install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
131
132 # useless (dlopened by *.so)
133 rm -f $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc,opensc,pkcs11}-*.{a,la} \
134         $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la}
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %post   -p /sbin/ldconfig
140 %postun -p /sbin/ldconfig
141
142 %triggerin -n browser-plugin-opensc -- mozilla-firefox
143 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins opensc-signer.so
144
145 %triggerun -n browser-plugin-opensc -- mozilla-firefox
146 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins opensc-signer.so
147
148 %triggerin -n browser-plugin-opensc -- mozilla
149 %nsplugin_install -d %{_libdir}/mozilla/plugins opensc-signer.so
150
151 %triggerun -n browser-plugin-opensc -- mozilla
152 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins opensc-signer.so
153
154 %triggerin -n browser-plugin-opensc -- opera
155 %nsplugin_install -d %{_libdir}/opera/plugins opensc-signer.so
156
157 %triggerun -n browser-plugin-opensc -- opera
158 %nsplugin_uninstall -d %{_libdir}/opera/plugins opensc-signer.so
159
160 %triggerin -n browser-plugin-opensc -- konqueror
161 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror opensc-signer.so
162
163 %triggerun -n browser-plugin-opensc -- konqueror
164 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror opensc-signer.so
165
166 %triggerin -n browser-plugin-opensc -- seamonkey
167 %nsplugin_install -d %{_libdir}/seamonkey/plugins opensc-signer.so
168
169 %triggerun -n browser-plugin-opensc -- seamonkey
170 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins opensc-signer.so
171
172 # as rpm removes the old obsoleted package files after the triggers
173 # are ran, add another trigger to make the links there.
174 %triggerpostun -n browser-plugin-opensc -- mozilla-plugin-opensc
175 %nsplugin_install -f -d %{_libdir}/mozilla/plugins opensc-signer.so
176
177 %files
178 %defattr(644,root,root,755)
179 %doc NEWS README doc/ChangeLog doc/{*.{html,css},html/tools.html}
180 %attr(755,root,root) %{_bindir}/cardos-info
181 %attr(755,root,root) %{_bindir}/cryptoflex-tool
182 %attr(755,root,root) %{_bindir}/eidenv
183 %attr(755,root,root) %{_bindir}/netkey-tool
184 %attr(755,root,root) %{_bindir}/opensc-explorer
185 %attr(755,root,root) %{_bindir}/opensc-tool
186 %attr(755,root,root) %{_bindir}/piv-tool
187 %attr(755,root,root) %{_bindir}/pkcs11-tool
188 %attr(755,root,root) %{_bindir}/pkcs15-*
189 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
190 %attr(755,root,root) %{_libdir}/libpkcs15init.so.*.*.*
191 %attr(755,root,root) %{_libdir}/libscconf.so.*.*.*
192 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.2
193 %attr(755,root,root) %ghost %{_libdir}/libpkcs15init.so.2
194 %attr(755,root,root) %ghost %{_libdir}/libscconf.so.2
195 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
196 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
197 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
198 %dir %{_datadir}/opensc
199 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
200 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
201 %{_mandir}/man1/cardos-info.1*
202 %{_mandir}/man1/cryptoflex-tool.1*
203 %{_mandir}/man1/netkey-tool.1*
204 %{_mandir}/man1/opensc-explorer.1*
205 %{_mandir}/man1/opensc-tool.1*
206 %{_mandir}/man1/pkcs11-tool.1*
207 %{_mandir}/man1/pkcs15-*.1*
208 %{_mandir}/man5/pkcs15-profile.5*
209
210 %files devel
211 %defattr(644,root,root,755)
212 %doc doc/html/api.html
213 %attr(755,root,root) %{_bindir}/opensc-config
214 %attr(755,root,root) %{_libdir}/libopensc.so
215 %attr(755,root,root) %{_libdir}/libpkcs15init.so
216 %attr(755,root,root) %{_libdir}/libscconf.so
217 %{_libdir}/libopensc.la
218 %{_libdir}/libpkcs15init.la
219 %{_libdir}/libscconf.la
220 %{_includedir}/opensc
221 %{_pkgconfigdir}/libopensc.pc
222 %{_pkgconfigdir}/libpkcs15init.pc
223 %{_pkgconfigdir}/libscconf.pc
224 %{_mandir}/man1/opensc-config.1*
225 %{_mandir}/man3/sc_*.3*
226
227 %files static
228 %defattr(644,root,root,755)
229 %{_libdir}/libopensc.a
230 %{_libdir}/libpkcs15init.a
231 %{_libdir}/libscconf.a
232
233 %files -n browser-plugin-opensc
234 %defattr(644,root,root,755)
235 %attr(755,root,root) %{_plugindir}/opensc-signer.so
This page took 0.066402 seconds and 3 git commands to generate.