]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with openct # use OpenCT instead of PC/SC for reader access | |
4 | # | |
5 | Summary: OpenSC library - for accessing SmartCard devices using PC/SC Lite | |
6 | Summary(pl.UTF-8): Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite | |
7 | Name: opensc | |
8 | Version: 0.12.2 | |
9 | Release: 1 | |
10 | Epoch: 0 | |
11 | License: LGPL v2.1+ | |
12 | Group: Applications | |
13 | Source0: http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: 5116adea5f2f9f22fb9896965789144b | |
15 | Source1: %{name}-initramfs-hook | |
16 | Source2: %{name}-initramfs-local-bottom | |
17 | Source3: %{name}-initramfs-local-top | |
18 | Source4: %{name}-initramfs-README | |
19 | URL: http://www.opensc-project.org/ | |
20 | BuildRequires: autoconf >= 2.60 | |
21 | BuildRequires: automake >= 1:1.10 | |
22 | BuildRequires: docbook-style-xsl | |
23 | BuildRequires: libltdl-devel | |
24 | BuildRequires: libtool >= 1:1.4.2-9 | |
25 | BuildRequires: libxslt-progs | |
26 | %{?with_openct:BuildRequires: openct-devel} | |
27 | BuildRequires: openssl-devel >= 0.9.7d | |
28 | %{!?with_openct:BuildRequires: pcsc-lite-devel >= 1.6.0} | |
29 | BuildRequires: pkgconfig >= 1:0.9.0 | |
30 | BuildRequires: readline-devel | |
31 | BuildRequires: rpmbuild(macros) >= 1.364 | |
32 | BuildRequires: zlib-devel | |
33 | %{!?with_openct:Requires: pcsc-lite-libs >= 1.6.0} | |
34 | Obsoletes: browser-plugin-opensc | |
35 | Obsoletes: mozilla-plugin-opensc | |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
38 | # datadir is used for config files and (editable) profiles | |
39 | %define _datadir /etc | |
40 | %define _sysconfdir /etc/opensc | |
41 | ||
42 | %description | |
43 | libopensc is a library for accessing SmartCard devices using PC/SC | |
44 | Lite middleware package. It is also the core library of the OpenSC | |
45 | project. Basic functionality (e.g. SELECT FILE, READ BINARY) should | |
46 | work on any ISO 7816-4 compatible SmartCard. Encryption and decryption | |
47 | using private keys on the SmartCard is at the moment possible only | |
48 | with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic | |
49 | IDentity) card manufactured by Setec. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | libopensc to biblioteka do korzystania z kart procesorowych przy | |
53 | użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa | |
54 | biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT | |
55 | FILE, READ BINARY) powinna działać także z dowolną kartą procesorową | |
56 | zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu | |
57 | prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu | |
58 | kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic | |
59 | IDentity) produkowanych przez Setec. | |
60 | ||
61 | %package devel | |
62 | Summary: OpenSC development files | |
63 | Summary(pl.UTF-8): Pliki dla programistów używających OpenSC | |
64 | Group: Development/Tools | |
65 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
66 | Requires: libltdl-devel | |
67 | %{?with_openct:Requires: openct-devel} | |
68 | Requires: openssl-devel | |
69 | %{!?with_openct:Requires: pcsc-lite-devel >= 1.6.0} | |
70 | ||
71 | %description devel | |
72 | OpenSC development files. | |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pliki dla programistów używających OpenSC. | |
76 | ||
77 | %package static | |
78 | Summary: Static OpenSC library | |
79 | Summary(pl.UTF-8): Bibloteka statyczna OpenSC | |
80 | Group: Development/Tools | |
81 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
82 | ||
83 | %description static | |
84 | Static OpenSC library. | |
85 | ||
86 | %description static -l pl.UTF-8 | |
87 | Biblioteka statyczna OpenSC. | |
88 | ||
89 | %package initramfs | |
90 | Summary: OpenSC support scripts for initramfs-tools | |
91 | Summary(pl.UTF-8): Skrypty dla initramfs-tools ze wsparciem dla OpenSC | |
92 | Group: Base | |
93 | Requires: %{name} = %{version}-%{release} | |
94 | Requires: initramfs-tools | |
95 | ||
96 | %description initramfs | |
97 | OpenSC support scripts for initramfs-tools. | |
98 | ||
99 | %description initramfs -l pl.UTF-8 | |
100 | Skrypty dla initramfs-tools ze wsparciem dla OpenSC. | |
101 | ||
102 | %prep | |
103 | %setup -q | |
104 | cp -p %{SOURCE4} README.initramfs | |
105 | ||
106 | %build | |
107 | %{__libtoolize} | |
108 | %{__aclocal} -I m4 | |
109 | %{__autoconf} | |
110 | %{__autoheader} | |
111 | %{__automake} | |
112 | %configure \ | |
113 | %{?with_openct:--enable-openct --disable-pcsc} \ | |
114 | %{!?with_openct:--enable-pcsc --disable-openct} \ | |
115 | --disable-silent-rules \ | |
116 | --enable-doc \ | |
117 | --with-pcsc-provider=%{_libdir}/libpcsclite.so.1 | |
118 | ||
119 | %{__make} | |
120 | ||
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-{bottom,top}} | |
124 | %{__make} install \ | |
125 | DESTDIR=$RPM_BUILD_ROOT | |
126 | ||
127 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/opensc | |
128 | install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-bottom/opensc | |
129 | install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/opensc | |
130 | ||
131 | # not needed (dlopened by soname) | |
132 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la | |
133 | ||
134 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
135 | ||
136 | %clean | |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
139 | %post -p /sbin/ldconfig | |
140 | %postun -p /sbin/ldconfig | |
141 | ||
142 | %files | |
143 | %defattr(644,root,root,755) | |
144 | %doc ChangeLog NEWS README doc/html.out/tools.html | |
145 | %attr(755,root,root) %{_bindir}/cardos-tool | |
146 | %attr(755,root,root) %{_bindir}/cryptoflex-tool | |
147 | %attr(755,root,root) %{_bindir}/eidenv | |
148 | %attr(755,root,root) %{_bindir}/netkey-tool | |
149 | %attr(755,root,root) %{_bindir}/opensc-explorer | |
150 | %attr(755,root,root) %{_bindir}/opensc-tool | |
151 | %attr(755,root,root) %{_bindir}/piv-tool | |
152 | %attr(755,root,root) %{_bindir}/pkcs11-tool | |
153 | %attr(755,root,root) %{_bindir}/pkcs15-crypt | |
154 | %attr(755,root,root) %{_bindir}/pkcs15-init | |
155 | %attr(755,root,root) %{_bindir}/pkcs15-tool | |
156 | %attr(755,root,root) %{_bindir}/westcos-tool | |
157 | %attr(755,root,root) %{_libdir}/libopensc.so.*.*.* | |
158 | %attr(755,root,root) %ghost %{_libdir}/libopensc.so.3 | |
159 | # PKCS11 modules | |
160 | %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so | |
161 | %attr(755,root,root) %{_libdir}/opensc-pkcs11.so | |
162 | %attr(755,root,root) %{_libdir}/pkcs11-spy.so | |
163 | %dir %{_libdir}/pkcs11 | |
164 | %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so | |
165 | %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so | |
166 | %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so | |
167 | %dir %{_datadir}/opensc | |
168 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf | |
169 | %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile | |
170 | %{_mandir}/man1/cardos-tool.1* | |
171 | %{_mandir}/man1/cryptoflex-tool.1* | |
172 | %{_mandir}/man1/eidenv.1* | |
173 | %{_mandir}/man1/netkey-tool.1* | |
174 | %{_mandir}/man1/opensc-explorer.1* | |
175 | %{_mandir}/man1/opensc-tool.1* | |
176 | %{_mandir}/man1/piv-tool.1* | |
177 | %{_mandir}/man1/pkcs11-tool.1* | |
178 | %{_mandir}/man1/pkcs15-crypt.1* | |
179 | %{_mandir}/man1/pkcs15-init.1* | |
180 | %{_mandir}/man1/pkcs15-tool.1* | |
181 | %{_mandir}/man1/westcos-tool.1* | |
182 | %{_mandir}/man5/pkcs15-profile.5* | |
183 | ||
184 | %files devel | |
185 | %defattr(644,root,root,755) | |
186 | %attr(755,root,root) %{_libdir}/libopensc.so | |
187 | %{_libdir}/libopensc.la | |
188 | ||
189 | %files static | |
190 | %defattr(644,root,root,755) | |
191 | %{_libdir}/libopensc.a | |
192 | ||
193 | %files initramfs | |
194 | %defattr(644,root,root,755) | |
195 | %doc README.initramfs | |
196 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/opensc | |
197 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/opensc | |
198 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-bottom/opensc |