@@ -15,13 +15,21 @@ BuildRequires: openssl-devel
15
15
BuildRequires: /usr/bin/xsltproc
16
16
BuildRequires: docbook-style-xsl
17
17
BuildRequires: autoconf automake libtool gcc
18
+ %if 0%{?fedora } > 40 || 0%{?rhel } > 10
19
+ BuildRequires: bash-completion-devel
20
+ %else
18
21
BuildRequires: bash-completion
22
+ %endif
19
23
BuildRequires: zlib-ng-devel
20
24
# For tests
21
25
BuildRequires: libcmocka-devel
22
26
BuildRequires: vim-common
27
+ %if ! 0%{?rhel }
23
28
BuildRequires: softhsm
24
29
BuildRequires: openssl
30
+ BuildRequires: openpace-devel
31
+ %endif
32
+ Requires: %{name }-libs = %{version }-%{release }
25
33
Requires: pcsc-lite-libs%{?_isa }
26
34
Requires: pcsc-lite
27
35
Obsoletes: mozilla-opensc-signer < 0.12.0
@@ -39,6 +47,13 @@ supporting this API (such as Mozilla Firefox and Thunderbird) can use it. On
39
47
the card OpenSC implements the PKCS#15 standard and aims to be compatible with
40
48
every software/card that does so, too.
41
49
50
+ %package libs
51
+ Requires: pcsc-lite-libs%{?_isa }
52
+ Summary: OpenSC libraries
53
+
54
+ %description libs
55
+ OpenSC libraries.
56
+
42
57
43
58
%prep
44
59
%setup -q
@@ -57,7 +72,6 @@ sed -i -e "/XFAIL_TESTS/,$ {
57
72
q
58
73
}" tests/Makefile.am
59
74
60
-
61
75
cp -p src/pkcs15init/README ./README.pkcs15init
62
76
cp -p src/scconf/README.scconf .
63
77
# No {_libdir} here to avoid multilib conflicts; it's just an example
@@ -116,9 +130,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libopensc.so
116
130
rm -f $RPM_BUILD_ROOT%{_libdir }/pkgconfig/*.pc
117
131
rm -f $RPM_BUILD_ROOT%{_libdir }/libsmm-local .so
118
132
119
- # the npa-tool builds to nothing since we do not have OpenPACE library
133
+ %if 0%{? rhel }
120
134
rm -rf %{buildroot }%{_bindir }/npa-tool
121
135
rm -rf %{buildroot }%{_mandir }/man1/npa-tool.1*
136
+ %endif
122
137
123
138
# the pkcs11-register is not applicable to Fedora/RHEL where we use p11-kit
124
139
rm -rf %{buildroot }%{_bindir }/pkcs11-register
@@ -134,24 +149,16 @@ rm %{buildroot}%{_mandir}/man1/opensc-notify.1*
134
149
135
150
%{_datadir }/bash-completion/*
136
151
137
- %ifarch %{ix86 }
138
- %{_mandir }/man5/opensc-%{_arch }.conf.5*
139
- %else
140
- %config(noreplace) %{_sysconfdir }/opensc.conf
141
- %{_mandir }/man5/opensc.conf.5*
142
- %endif
143
152
144
- %config(noreplace) %{_sysconfdir }/opensc-%{_arch }.conf
145
- # Co-owned with p11-kit so it is not hard dependency
146
- %dir %{_datadir }/p11-kit
147
- %dir %{_datadir }/p11-kit/modules
148
- %{_datadir }/p11-kit/modules/opensc.module
149
153
%{_bindir }/cardos-tool
150
154
%{_bindir }/cryptoflex-tool
151
155
%{_bindir }/eidenv
152
156
%{_bindir }/iasecc-tool
153
157
%{_bindir }/gids-tool
154
158
%{_bindir }/netkey-tool
159
+ %if ! 0%{?rhel }
160
+ %{_bindir }/npa-tool
161
+ %endif
155
162
%{_bindir }/openpgp-tool
156
163
%{_bindir }/opensc-explorer
157
164
%{_bindir }/opensc-tool
@@ -167,14 +174,6 @@ rm %{buildroot}%{_mandir}/man1/opensc-notify.1*
167
174
%{_bindir }/egk-tool
168
175
%{_bindir }/goid-tool
169
176
%{_bindir }/dtrust-tool
170
- %{_libdir }/lib*.so.*
171
- %{_libdir }/opensc-pkcs11.so
172
- %{_libdir }/pkcs11-spy.so
173
- %{_libdir }/onepin-opensc-pkcs11.so
174
- %dir %{_libdir }/pkcs11
175
- %{_libdir }/pkcs11/opensc-pkcs11.so
176
- %{_libdir }/pkcs11/onepin-opensc-pkcs11.so
177
- %{_libdir }/pkcs11/pkcs11-spy.so
178
177
%{_datadir }/opensc/
179
178
%{_mandir }/man1/cardos-tool.1*
180
179
%{_mandir }/man1/cryptoflex-tool.1*
@@ -183,6 +182,9 @@ rm %{buildroot}%{_mandir}/man1/opensc-notify.1*
183
182
%{_mandir }/man1/goid-tool.1*
184
183
%{_mandir }/man1/iasecc-tool.1*
185
184
%{_mandir }/man1/netkey-tool.1*
185
+ %if ! 0%{?rhel }
186
+ %{_mandir }/man1/npa-tool.1*
187
+ %endif
186
188
%{_mandir }/man1/openpgp-tool.1*
187
189
%{_mandir }/man1/opensc-explorer.*
188
190
%{_mandir }/man1/opensc-tool.1*
@@ -198,3 +200,31 @@ rm %{buildroot}%{_mandir}/man1/opensc-notify.1*
198
200
%{_mandir }/man1/egk-tool.1*
199
201
%{_mandir }/man1/dtrust-tool.1*
200
202
%{_mandir }/man5/pkcs15-profile.5*
203
+
204
+ %files libs
205
+ %ifarch %{ix86 }
206
+ %{_mandir }/man5/opensc-%{_arch }.conf.5*
207
+ %else
208
+ %config(noreplace) %{_sysconfdir }/opensc.conf
209
+ %{_mandir }/man5/opensc.conf.5*
210
+ %endif
211
+
212
+ %config(noreplace) %{_sysconfdir }/opensc-%{_arch }.conf
213
+ # Co-owned with p11-kit so it is not hard dependency
214
+ %dir %{_datadir }/p11-kit
215
+ %dir %{_datadir }/p11-kit/modules
216
+ %{_datadir }/p11-kit/modules/opensc.module
217
+ %{_libdir }/lib*.so.*
218
+ %{_libdir }/opensc-pkcs11.so
219
+ %{_libdir }/pkcs11-spy.so
220
+ %{_libdir }/onepin-opensc-pkcs11.so
221
+ %dir %{_libdir }/pkcs11
222
+ %{_libdir }/pkcs11/opensc-pkcs11.so
223
+ %{_libdir }/pkcs11/onepin-opensc-pkcs11.so
224
+ %{_libdir }/pkcs11/pkcs11-spy.so
225
+
226
+ # For OpenPACE
227
+ %if ! 0%{?rhel }
228
+ %config(noreplace) %{_sysconfdir }/eac/cvc/DESCHSMCVCA00001
229
+ %config(noreplace) %{_sysconfdir }/eac/cvc/DESRCACC100001
230
+ %endif
0 commit comments