]>
Commit | Line | Data |
---|---|---|
3bcc3df9 | 1 | %define nspr_ver 1:4.10.7 |
8d1548f6 | 2 | %define foover %(echo %{version} | tr . _) |
e043961c | 3 | Summary: NSS - Network Security Services |
900f3743 | 4 | Summary(pl.UTF-8): NSS - Network Security Services |
e043961c | 5 | Name: nss |
6f305333 | 6 | Version: 3.17.4 |
e136c96b | 7 | Release: 3 |
c61925df | 8 | Epoch: 1 |
b0cd5268 | 9 | License: MPL v2.0 |
a20334db | 10 | Group: Libraries |
d6727b26 | 11 | Source0: http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_%{foover}_RTM/src/%{name}-%{version}.tar.gz |
6f305333 | 12 | # Source0-md5: a77df26072cabf8afb26911b6fa9b755 |
9e8d6618 | 13 | Source1: %{name}-mozilla-nss.pc |
8d1548f6 | 14 | Source2: %{name}-config.in |
867c7e33 ER |
15 | Source3: http://www.cacert.org/certs/root.der |
16 | # Source3-md5: a61b375e390d9c3654eebd2031461f6b | |
35beba87 | 17 | Source4: nss-softokn.pc.in |
219943bb | 18 | # Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1083900 |
1be8ae55 | 19 | Patch0: tls12.patch |
e136c96b | 20 | Patch1: x32.patch |
0c7a986a | 21 | URL: http://www.mozilla.org/projects/security/pki/nss/ |
923efc4a | 22 | BuildRequires: nspr-devel >= %{nspr_ver} |
867c7e33 | 23 | BuildRequires: nss-tools |
acc47f6e | 24 | BuildRequires: perl-base |
0e541f12 | 25 | BuildRequires: sqlite3-devel |
e814da19 | 26 | BuildRequires: zlib-devel |
7d80b913 | 27 | BuildConflicts: mozilla < 0.9.6-3 |
ce0a2a28 | 28 | Requires: %{name}-softokn-freebl = %{epoch}:%{version}-%{release} |
219943bb | 29 | Requires: nspr >= %{nspr_ver} |
64c1d08d | 30 | Obsoletes: libnss3 |
8a057a22 | 31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
e043961c | 32 | |
f68ec3a2 | 33 | %define specflags -fno-strict-aliasing |
c9f1afae JB |
34 | # signed - stripped before signing |
35 | %define _noautostrip .*%{_libdir}/libfreebl3.so\\|.*%{_libdir}/libsoftokn3.so | |
36 | %define _noautochrpath .*%{_libdir}/libfreebl3.so\\|.*%{_libdir}/libsoftokn3.so | |
f68ec3a2 | 37 | |
e3f4677f | 38 | %description |
6b813326 | 39 | NSS supports cross-platform development of security-enabled server |
d8ef6ecb | 40 | applications. Applications built with NSS can support PKCS #5, |
bf42a3ba | 41 | PKCS #7, PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 and v3, X.509 v3 |
6b813326 | 42 | certificates, and other security standards. |
e043961c | 43 | |
238a25a0 JR |
44 | %description -l pl.UTF-8 |
45 | NSS wspomaga pisanie wieloplatformowych bezpiecznych serwerów. | |
46 | Aplikacja używająca NSS jest w stanie obsłużyć PKCS #5, PKCS #7, | |
d8ef6ecb | 47 | PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 oraz v3, certyfikaty X.509 v3, |
238a25a0 | 48 | i wiele innych bezpiecznych standardów. |
e043961c | 49 | |
c3d988d0 JB |
50 | %package tools |
51 | Summary: NSS command line tools and utilities | |
c9f1afae | 52 | Summary(pl.UTF-8): Narzędzia NSS obsługiwane z linii poleceń |
c3d988d0 | 53 | Group: Applications |
93f17fb4 | 54 | Requires: %{name} = %{epoch}:%{version}-%{release} |
c3d988d0 JB |
55 | |
56 | %description tools | |
57 | The NSS Toolkit command line tool. | |
58 | ||
238a25a0 JR |
59 | %description tools -l pl.UTF-8 |
60 | Narzędzia NSS obsługiwane z linii poleceń. | |
c3d988d0 | 61 | |
e043961c | 62 | %package devel |
63 | Summary: NSS - header files | |
900f3743 | 64 | Summary(pl.UTF-8): NSS - pliki nagłówkowe |
e043961c | 65 | Group: Development/Libraries |
93f17fb4 | 66 | Requires: %{name} = %{epoch}:%{version}-%{release} |
923efc4a | 67 | Requires: nspr-devel >= %{nspr_ver} |
64c1d08d | 68 | Obsoletes: libnss3-devel |
e043961c | 69 | |
70 | %description devel | |
71 | Development part of NSS library. | |
72 | ||
238a25a0 JR |
73 | %description devel -l pl.UTF-8 |
74 | Część biblioteki NSS przeznaczona dla programistów. | |
e043961c | 75 | |
e043961c | 76 | %package static |
77 | Summary: NSS - static library | |
900f3743 | 78 | Summary(pl.UTF-8): NSS - biblioteka statyczna |
e043961c | 79 | Group: Development/Libraries |
93f17fb4 | 80 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
e043961c | 81 | |
82 | %description static | |
83 | Static NSS Toolkit libraries. | |
84 | ||
238a25a0 | 85 | %description static -l pl.UTF-8 |
e043961c | 86 | Statyczne wersje bibliotek z NSS. |
87 | ||
909366d3 AM |
88 | %package softokn-freebl |
89 | Summary: Freebl library for the Network Security Services | |
d6727b26 | 90 | Summary(pl.UTF-8): Biblioteka freebl dla bibliotek NSS |
909366d3 AM |
91 | Group: Libraries |
92 | ||
93 | %description softokn-freebl | |
d6727b26 JB |
94 | Freebl cryptographic library for the Network Security Services. |
95 | ||
96 | %description softokn-freebl -l pl.UTF-8 | |
97 | Biblioteka kryptograficzna freebl dla bibliotek NSS. | |
909366d3 | 98 | |
e043961c | 99 | %prep |
1015f127 | 100 | %setup -q |
219943bb | 101 | cd nss |
1be8ae55 | 102 | %patch0 -p1 |
219943bb | 103 | cd .. |
e136c96b | 104 | %patch1 -p1 |
e043961c | 105 | |
c9f1afae JB |
106 | %if 0%{!?debug:1} |
107 | # strip before signing | |
180376d6 | 108 | %{__sed} -i -e '/export ADDON_PATH$/a\ echo STRIP \; %{__strip} --strip-unneeded -R.comment -R.note ${5}' nss/cmd/shlibsign/sign.sh |
c9f1afae JB |
109 | %endif |
110 | ||
e043961c | 111 | %build |
867c7e33 | 112 | # http://wiki.cacert.org/wiki/NSSLib |
36f51713 | 113 | addbuiltin -n "CAcert Inc." -t "CT,C,C" < %{SOURCE3} >> nss/lib/ckfw/builtins/certdata.txt |
867c7e33 | 114 | |
ab170647 | 115 | %ifarch %{x8664} ppc64 sparc64 |
f68ec3a2 PS |
116 | export USE_64=1 |
117 | %endif | |
118 | ||
1be8ae55 | 119 | # http://pki.fedoraproject.org/wiki/ECC_Capable_NSS |
1be8ae55 AM |
120 | for dir in ecc noecc; do |
121 | install -d $dir | |
122 | cp -a nss $dir/nss | |
123 | done | |
124 | ||
13954840 ER |
125 | export BUILD_OPT=1 |
126 | export MOZILLA_CLIENT=1 | |
127 | export NSDISTMODE=copy | |
128 | export NSPR_INCLUDE_DIR=/usr/include/nspr | |
129 | export NSS_USE_SYSTEM_SQLITE=1 | |
130 | export USE_PTHREADS=1 | |
131 | export USE_SYSTEM_ZLIB=1 | |
132 | export ZLIB_LIBS="-lz" | |
4df145fa JR |
133 | %ifarch x32 |
134 | export USE_X32=1 | |
135 | %endif | |
1be8ae55 AM |
136 | |
137 | # https://bugzilla.mozilla.org/show_bug.cgi?id=1084623 | |
138 | ||
139 | # Forcing ecc with this hack would produce broken librares (softoken, freebl etc). | |
140 | # Thus we also build noecc version (which doesn't require hack) and use these | |
141 | # libs from there. | |
142 | sed -i -e 's|#error|#warning|g' ecc/nss/lib/freebl/ecl/ecl-curve.h | |
143 | %{__make} -j1 -C ecc/nss \ | |
144 | NSS_ECC_MORE_THAN_SUITE_B=1 \ | |
145 | CC="%{__cc}" \ | |
146 | OPTIMIZER="%{rpmcflags} %{rpmcppflags}" \ | |
147 | ||
148 | %{__make} -j1 -C noecc/nss \ | |
07b248d4 | 149 | CC="%{__cc}" \ |
36f51713 | 150 | OPTIMIZER="%{rpmcflags} %{rpmcppflags}" |
e043961c | 151 | |
152 | %install | |
153 | rm -rf $RPM_BUILD_ROOT | |
b0cd5268 | 154 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_includedir}/nss,/%{_lib},%{_libdir},%{_pkgconfigdir}} |
eec1fab1 | 155 | |
13954840 ER |
156 | cp -p ecc/dist/private/nss/* $RPM_BUILD_ROOT%{_includedir}/nss |
157 | cp -p ecc/dist/public/dbm/* $RPM_BUILD_ROOT%{_includedir}/nss | |
158 | cp -p ecc/dist/public/nss/* $RPM_BUILD_ROOT%{_includedir}/nss | |
159 | install -p ecc/dist/*/bin/* $RPM_BUILD_ROOT%{_bindir} | |
160 | install -p ecc/dist/*/lib/* $RPM_BUILD_ROOT%{_libdir} | |
1be8ae55 AM |
161 | |
162 | # non-ECC version, we need only libnssdbm3, libsoftokn3, libfreebl3 | |
13954840 ER |
163 | install -p noecc/dist/*/lib/libnssdbm3.* $RPM_BUILD_ROOT%{_libdir} |
164 | install -p noecc/dist/*/lib/libsoftokn3.* $RPM_BUILD_ROOT%{_libdir} | |
165 | install -p noecc/dist/*/lib/libfreebl3.* $RPM_BUILD_ROOT%{_libdir} | |
1be8ae55 | 166 | |
b0cd5268 | 167 | cp -p nss/doc/nroff/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
e043961c | 168 | |
8d1548f6 ER |
169 | %{__sed} -e ' |
170 | s#libdir=.*#libdir=%{_libdir}#g | |
171 | s#includedir=.*#includedir=%{_includedir}#g | |
172 | s#VERSION#%{version}#g | |
180376d6 JB |
173 | ' %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/nss.pc |
174 | # compatibility symlink | |
175 | ln -s nss.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/mozilla-nss.pc | |
8d1548f6 | 176 | |
35beba87 AM |
177 | cat %{SOURCE4} | \ |
178 | sed -e "s,%%libdir%%,%{_libdir},g" \ | |
179 | -e "s,%%prefix%%,%{_prefix},g" \ | |
180 | -e "s,%%exec_prefix%%,%{_prefix},g" \ | |
181 | -e "s,%%includedir%%,%{_includedir}/nss,g" \ | |
182 | -e "s,%%NSPR_VERSION%%,$(echo %{nspr_ver} | sed -e 's#.*:##g'),g" \ | |
183 | -e "s,%%NSS_VERSION%%,%{version},g" \ | |
184 | -e "s,%%SOFTOKEN_VERSION%%,%{version},g" > \ | |
185 | $RPM_BUILD_ROOT%{_pkgconfigdir}/nss-softokn.pc | |
186 | ||
187 | ||
180376d6 JB |
188 | NSS_VMAJOR=$(awk '/#define.*NSS_VMAJOR/ {print $3}' nss/lib/nss/nss.h) |
189 | NSS_VMINOR=$(awk '/#define.*NSS_VMINOR/ {print $3}' nss/lib/nss/nss.h) | |
190 | NSS_VPATCH=$(awk '/#define.*NSS_VPATCH/ {print $3}' nss/lib/nss/nss.h) | |
8d1548f6 ER |
191 | %{__sed} -e " |
192 | s,@libdir@,%{_libdir},g | |
193 | s,@prefix@,%{_prefix},g | |
194 | s,@exec_prefix@,%{_prefix},g | |
507f226d | 195 | s,@includedir@,%{_includedir}/nss,g |
69aeda39 ER |
196 | s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g |
197 | s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g | |
198 | s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g | |
8d1548f6 ER |
199 | " %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/nss-config |
200 | chmod +x $RPM_BUILD_ROOT%{_bindir}/nss-config | |
9e8d6618 | 201 | |
909366d3 AM |
202 | mv $RPM_BUILD_ROOT%{_libdir}/libfreebl3.so $RPM_BUILD_ROOT/%{_lib} |
203 | ln -s /%{_lib}/libfreebl3.so $RPM_BUILD_ROOT%{_libdir}/libfreebl3.so | |
69cbb7a2 AM |
204 | mv $RPM_BUILD_ROOT%{_libdir}/libfreebl3.chk $RPM_BUILD_ROOT/%{_lib} |
205 | ln -s /%{_lib}/libfreebl3.chk $RPM_BUILD_ROOT%{_libdir}/libfreebl3.chk | |
909366d3 | 206 | |
1be8ae55 AM |
207 | # conflict with openssl-static |
208 | mv $RPM_BUILD_ROOT%{_libdir}/libssl{,3}.a | |
209 | ||
e6093db0 | 210 | if [ ! -f "$RPM_BUILD_ROOT%{_includedir}/nss/nsslowhash.h" ]; then |
13954840 | 211 | echo >&2 "ERROR: %{_includedir}/nss/nsslowhash.h not installed. Needed by glibc" |
e6093db0 AM |
212 | exit 1 |
213 | fi | |
214 | ||
eccd0672 | 215 | %clean |
216 | rm -rf $RPM_BUILD_ROOT | |
217 | ||
985ee8fc JB |
218 | %post -p /sbin/ldconfig |
219 | %postun -p /sbin/ldconfig | |
e043961c | 220 | |
221 | %files | |
222 | %defattr(644,root,root,755) | |
b0cd5268 JB |
223 | # COPYING beside MPL v2.0 text contains GPL/LGPL compatibility notes |
224 | %doc nss/{COPYING,trademarks.txt} | |
c9f1afae JB |
225 | %attr(755,root,root) %{_libdir}/libfreebl3.so |
226 | %attr(755,root,root) %{_libdir}/libnss3.so | |
227 | %attr(755,root,root) %{_libdir}/libnssckbi.so | |
e0debb79 JB |
228 | %attr(755,root,root) %{_libdir}/libnssdbm3.so |
229 | %attr(755,root,root) %{_libdir}/libnssutil3.so | |
c9f1afae JB |
230 | %attr(755,root,root) %{_libdir}/libsmime3.so |
231 | %attr(755,root,root) %{_libdir}/libsoftokn3.so | |
232 | %attr(755,root,root) %{_libdir}/libssl3.so | |
233 | %{_libdir}/libfreebl3.chk | |
d6727b26 | 234 | %{_libdir}/libnssdbm3.chk |
c9f1afae | 235 | %{_libdir}/libsoftokn3.chk |
e043961c | 236 | |
237 | %files devel | |
238 | %defattr(644,root,root,755) | |
ed6867e9 | 239 | %attr(755,root,root) %{_bindir}/nss-config |
c89efb4d | 240 | %{_libdir}/libcrmf.a |
1be8ae55 | 241 | %{_libdir}/libfreebl.a |
d6727b26 | 242 | %{_includedir}/nss |
c9f1afae JB |
243 | %{_pkgconfigdir}/mozilla-nss.pc |
244 | %{_pkgconfigdir}/nss.pc | |
35beba87 | 245 | %{_pkgconfigdir}/nss-softokn.pc |
e043961c | 246 | |
247 | %files tools | |
248 | %defattr(644,root,root,755) | |
180376d6 JB |
249 | %attr(755,root,root) %{_bindir}/addbuiltin |
250 | %attr(755,root,root) %{_bindir}/atob | |
251 | %attr(755,root,root) %{_bindir}/baddbdir | |
252 | %attr(755,root,root) %{_bindir}/bltest | |
253 | %attr(755,root,root) %{_bindir}/btoa | |
254 | %attr(755,root,root) %{_bindir}/certcgi | |
255 | %attr(755,root,root) %{_bindir}/certutil | |
256 | %attr(755,root,root) %{_bindir}/checkcert | |
257 | %attr(755,root,root) %{_bindir}/chktest | |
258 | %attr(755,root,root) %{_bindir}/cmsutil | |
259 | %attr(755,root,root) %{_bindir}/conflict | |
260 | %attr(755,root,root) %{_bindir}/crlutil | |
261 | %attr(755,root,root) %{_bindir}/crmftest | |
262 | %attr(755,root,root) %{_bindir}/dbtest | |
263 | %attr(755,root,root) %{_bindir}/derdump | |
264 | %attr(755,root,root) %{_bindir}/dertimetest | |
265 | %attr(755,root,root) %{_bindir}/digest | |
266 | %attr(755,root,root) %{_bindir}/encodeinttest | |
267 | %attr(755,root,root) %{_bindir}/fipstest | |
268 | %attr(755,root,root) %{_bindir}/httpserv | |
269 | %attr(755,root,root) %{_bindir}/listsuites | |
270 | %attr(755,root,root) %{_bindir}/lowhashtest | |
271 | %attr(755,root,root) %{_bindir}/makepqg | |
272 | %attr(755,root,root) %{_bindir}/mangle | |
273 | %attr(755,root,root) %{_bindir}/modutil | |
274 | %attr(755,root,root) %{_bindir}/multinit | |
275 | %attr(755,root,root) %{_bindir}/nonspr10 | |
276 | %attr(755,root,root) %{_bindir}/ocspclnt | |
277 | %attr(755,root,root) %{_bindir}/ocspresp | |
278 | %attr(755,root,root) %{_bindir}/oidcalc | |
279 | %attr(755,root,root) %{_bindir}/p7content | |
280 | %attr(755,root,root) %{_bindir}/p7env | |
281 | %attr(755,root,root) %{_bindir}/p7sign | |
282 | %attr(755,root,root) %{_bindir}/p7verify | |
283 | %attr(755,root,root) %{_bindir}/pk11gcmtest | |
284 | %attr(755,root,root) %{_bindir}/pk11mode | |
285 | %attr(755,root,root) %{_bindir}/pk12util | |
286 | %attr(755,root,root) %{_bindir}/pk1sign | |
287 | %attr(755,root,root) %{_bindir}/pkix-errcodes | |
288 | %attr(755,root,root) %{_bindir}/pp | |
289 | %attr(755,root,root) %{_bindir}/pwdecrypt | |
290 | %attr(755,root,root) %{_bindir}/remtest | |
291 | %attr(755,root,root) %{_bindir}/rsaperf | |
292 | %attr(755,root,root) %{_bindir}/sdrtest | |
293 | %attr(755,root,root) %{_bindir}/secmodtest | |
294 | %attr(755,root,root) %{_bindir}/selfserv | |
295 | %attr(755,root,root) %{_bindir}/shlibsign | |
296 | %attr(755,root,root) %{_bindir}/signtool | |
297 | %attr(755,root,root) %{_bindir}/signver | |
298 | %attr(755,root,root) %{_bindir}/ssltap | |
299 | %attr(755,root,root) %{_bindir}/strsclnt | |
300 | %attr(755,root,root) %{_bindir}/symkeyutil | |
301 | %attr(755,root,root) %{_bindir}/tstclnt | |
302 | %attr(755,root,root) %{_bindir}/vfychain | |
303 | %attr(755,root,root) %{_bindir}/vfyserv | |
b0cd5268 JB |
304 | %{_mandir}/man1/certutil.1* |
305 | %{_mandir}/man1/cmsutil.1* | |
306 | %{_mandir}/man1/crlutil.1* | |
307 | %{_mandir}/man1/derdump.1* | |
308 | %{_mandir}/man1/modutil.1* | |
309 | %{_mandir}/man1/pk12util.1* | |
310 | %{_mandir}/man1/pp.1* | |
311 | %{_mandir}/man1/signtool.1* | |
312 | %{_mandir}/man1/signver.1* | |
313 | %{_mandir}/man1/ssltap.1* | |
314 | %{_mandir}/man1/vfychain.1* | |
315 | %{_mandir}/man1/vfyserv.1* | |
e043961c | 316 | |
317 | %files static | |
318 | %defattr(644,root,root,755) | |
c9f1afae JB |
319 | %{_libdir}/libcertdb.a |
320 | %{_libdir}/libcerthi.a | |
321 | %{_libdir}/libcryptohi.a | |
322 | %{_libdir}/libdbm.a | |
c9f1afae | 323 | %{_libdir}/libjar.a |
1be8ae55 | 324 | %{_libdir}/libnss.a |
c9f1afae JB |
325 | %{_libdir}/libnssb.a |
326 | %{_libdir}/libnssckfw.a | |
1be8ae55 | 327 | %{_libdir}/libnssdbm.a |
c9f1afae | 328 | %{_libdir}/libnssdev.a |
1be8ae55 AM |
329 | %{_libdir}/libnsspki.a |
330 | %{_libdir}/libnssutil.a | |
331 | %{_libdir}/libpk11wrap.a | |
c9f1afae JB |
332 | %{_libdir}/libpkcs12.a |
333 | %{_libdir}/libpkcs7.a | |
e0debb79 JB |
334 | %{_libdir}/libpkixcertsel.a |
335 | %{_libdir}/libpkixchecker.a | |
336 | %{_libdir}/libpkixcrlsel.a | |
337 | %{_libdir}/libpkixmodule.a | |
338 | %{_libdir}/libpkixparams.a | |
339 | %{_libdir}/libpkixpki.a | |
340 | %{_libdir}/libpkixresults.a | |
341 | %{_libdir}/libpkixstore.a | |
342 | %{_libdir}/libpkixsystem.a | |
343 | %{_libdir}/libpkixtop.a | |
344 | %{_libdir}/libpkixutil.a | |
c9f1afae | 345 | %{_libdir}/libsectool.a |
1be8ae55 AM |
346 | %{_libdir}/libsmime.a |
347 | %{_libdir}/libsoftokn.a | |
c9f1afae | 348 | %{_libdir}/libssl3.a |
909366d3 AM |
349 | |
350 | %files softokn-freebl | |
351 | %defattr(644,root,root,755) | |
352 | %attr(755,root,root) /%{_lib}/libfreebl3.so | |
69cbb7a2 | 353 | /%{_lib}/libfreebl3.chk |