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