]>
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 |
129b876b | 6 | Version: 3.17.2 |
219943bb | 7 | Release: 2 |
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 |
129b876b | 12 | # Source0-md5: d3edb6f6c3688b2fde67ec9c9a8c1214 |
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 | |
e043961c | 17 | Patch0: %{name}-Makefile.patch |
219943bb AM |
18 | # Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1083900 |
19 | Patch1: tls12.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 |
e043961c | 100 | %patch0 -p1 |
219943bb AM |
101 | cd nss |
102 | %patch1 -p1 | |
103 | cd .. | |
e043961c | 104 | |
c9f1afae JB |
105 | %if 0%{!?debug:1} |
106 | # strip before signing | |
180376d6 | 107 | %{__sed} -i -e '/export ADDON_PATH$/a\ echo STRIP \; %{__strip} --strip-unneeded -R.comment -R.note ${5}' nss/cmd/shlibsign/sign.sh |
c9f1afae JB |
108 | %endif |
109 | ||
e043961c | 110 | %build |
180376d6 | 111 | cd nss |
e043961c | 112 | |
867c7e33 ER |
113 | # http://wiki.cacert.org/wiki/NSSLib |
114 | addbuiltin -n "CAcert Inc." -t "CT,C,C" < %{SOURCE3} >> lib/ckfw/builtins/certdata.txt | |
115 | ||
ab170647 | 116 | %ifarch %{x8664} ppc64 sparc64 |
f68ec3a2 PS |
117 | export USE_64=1 |
118 | %endif | |
119 | ||
180376d6 | 120 | %{__make} -C coreconf -j1 \ |
e043961c | 121 | NSDISTMODE=copy \ |
122 | NS_USE_GCC=1 \ | |
123 | MOZILLA_CLIENT=1 \ | |
124 | NO_MDUPDATE=1 \ | |
125 | USE_PTHREADS=1 \ | |
126 | BUILD_OPT=1 \ | |
07b248d4 | 127 | CC="%{__cc}" \ |
e043961c | 128 | OPTIMIZER="%{rpmcflags}" |
129 | ||
180376d6 | 130 | %{__make} -j1 \ |
e043961c | 131 | NSDISTMODE=copy \ |
132 | NS_USE_GCC=1 \ | |
133 | MOZILLA_CLIENT=1 \ | |
134 | NO_MDUPDATE=1 \ | |
135 | USE_PTHREADS=1 \ | |
0d478c4c JB |
136 | USE_SYSTEM_ZLIB=1 \ |
137 | ZLIB_LIBS="-lz" \ | |
07b248d4 JB |
138 | BUILD_OPT=1 \ |
139 | CC="%{__cc}" \ | |
e043961c | 140 | OPTIMIZER="%{rpmcflags}" \ |
2455c084 | 141 | PLATFORM="pld" |
e043961c | 142 | |
143 | %install | |
144 | rm -rf $RPM_BUILD_ROOT | |
b0cd5268 | 145 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_includedir}/nss,/%{_lib},%{_libdir},%{_pkgconfigdir}} |
eec1fab1 | 146 | |
180376d6 JB |
147 | install dist/private/nss/* $RPM_BUILD_ROOT%{_includedir}/nss |
148 | install dist/public/dbm/* $RPM_BUILD_ROOT%{_includedir}/nss | |
149 | install dist/public/nss/* $RPM_BUILD_ROOT%{_includedir}/nss | |
150 | install dist/pld/bin/* $RPM_BUILD_ROOT%{_bindir} | |
151 | install dist/pld/lib/* $RPM_BUILD_ROOT%{_libdir} | |
b0cd5268 | 152 | cp -p nss/doc/nroff/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
e043961c | 153 | |
8d1548f6 ER |
154 | %{__sed} -e ' |
155 | s#libdir=.*#libdir=%{_libdir}#g | |
156 | s#includedir=.*#includedir=%{_includedir}#g | |
157 | s#VERSION#%{version}#g | |
180376d6 JB |
158 | ' %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/nss.pc |
159 | # compatibility symlink | |
160 | ln -s nss.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/mozilla-nss.pc | |
8d1548f6 | 161 | |
180376d6 JB |
162 | NSS_VMAJOR=$(awk '/#define.*NSS_VMAJOR/ {print $3}' nss/lib/nss/nss.h) |
163 | NSS_VMINOR=$(awk '/#define.*NSS_VMINOR/ {print $3}' nss/lib/nss/nss.h) | |
164 | NSS_VPATCH=$(awk '/#define.*NSS_VPATCH/ {print $3}' nss/lib/nss/nss.h) | |
8d1548f6 ER |
165 | %{__sed} -e " |
166 | s,@libdir@,%{_libdir},g | |
167 | s,@prefix@,%{_prefix},g | |
168 | s,@exec_prefix@,%{_prefix},g | |
507f226d | 169 | s,@includedir@,%{_includedir}/nss,g |
69aeda39 ER |
170 | s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g |
171 | s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g | |
172 | s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g | |
8d1548f6 ER |
173 | " %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/nss-config |
174 | chmod +x $RPM_BUILD_ROOT%{_bindir}/nss-config | |
9e8d6618 | 175 | |
909366d3 AM |
176 | mv $RPM_BUILD_ROOT%{_libdir}/libfreebl3.so $RPM_BUILD_ROOT/%{_lib} |
177 | ln -s /%{_lib}/libfreebl3.so $RPM_BUILD_ROOT%{_libdir}/libfreebl3.so | |
69cbb7a2 AM |
178 | mv $RPM_BUILD_ROOT%{_libdir}/libfreebl3.chk $RPM_BUILD_ROOT/%{_lib} |
179 | ln -s /%{_lib}/libfreebl3.chk $RPM_BUILD_ROOT%{_libdir}/libfreebl3.chk | |
909366d3 | 180 | |
e6093db0 AM |
181 | if [ ! -f "$RPM_BUILD_ROOT%{_includedir}/nss/nsslowhash.h" ]; then |
182 | echo "ERROR: %{_includedir}/nss/nsslowhash.h not installed. Needed by glibc" >&2 | |
183 | exit 1 | |
184 | fi | |
185 | ||
eccd0672 | 186 | %clean |
187 | rm -rf $RPM_BUILD_ROOT | |
188 | ||
985ee8fc JB |
189 | %post -p /sbin/ldconfig |
190 | %postun -p /sbin/ldconfig | |
e043961c | 191 | |
192 | %files | |
193 | %defattr(644,root,root,755) | |
b0cd5268 JB |
194 | # COPYING beside MPL v2.0 text contains GPL/LGPL compatibility notes |
195 | %doc nss/{COPYING,trademarks.txt} | |
c9f1afae JB |
196 | %attr(755,root,root) %{_libdir}/libfreebl3.so |
197 | %attr(755,root,root) %{_libdir}/libnss3.so | |
198 | %attr(755,root,root) %{_libdir}/libnssckbi.so | |
e0debb79 JB |
199 | %attr(755,root,root) %{_libdir}/libnssdbm3.so |
200 | %attr(755,root,root) %{_libdir}/libnssutil3.so | |
c9f1afae JB |
201 | %attr(755,root,root) %{_libdir}/libsmime3.so |
202 | %attr(755,root,root) %{_libdir}/libsoftokn3.so | |
203 | %attr(755,root,root) %{_libdir}/libssl3.so | |
204 | %{_libdir}/libfreebl3.chk | |
d6727b26 | 205 | %{_libdir}/libnssdbm3.chk |
c9f1afae | 206 | %{_libdir}/libsoftokn3.chk |
e043961c | 207 | |
208 | %files devel | |
209 | %defattr(644,root,root,755) | |
ed6867e9 | 210 | %attr(755,root,root) %{_bindir}/nss-config |
c89efb4d | 211 | %{_libdir}/libcrmf.a |
d6727b26 | 212 | %{_includedir}/nss |
c9f1afae JB |
213 | %{_pkgconfigdir}/mozilla-nss.pc |
214 | %{_pkgconfigdir}/nss.pc | |
e043961c | 215 | |
216 | %files tools | |
217 | %defattr(644,root,root,755) | |
180376d6 JB |
218 | %attr(755,root,root) %{_bindir}/addbuiltin |
219 | %attr(755,root,root) %{_bindir}/atob | |
220 | %attr(755,root,root) %{_bindir}/baddbdir | |
221 | %attr(755,root,root) %{_bindir}/bltest | |
222 | %attr(755,root,root) %{_bindir}/btoa | |
223 | %attr(755,root,root) %{_bindir}/certcgi | |
224 | %attr(755,root,root) %{_bindir}/certutil | |
225 | %attr(755,root,root) %{_bindir}/checkcert | |
226 | %attr(755,root,root) %{_bindir}/chktest | |
227 | %attr(755,root,root) %{_bindir}/cmsutil | |
228 | %attr(755,root,root) %{_bindir}/conflict | |
229 | %attr(755,root,root) %{_bindir}/crlutil | |
230 | %attr(755,root,root) %{_bindir}/crmftest | |
231 | %attr(755,root,root) %{_bindir}/dbtest | |
232 | %attr(755,root,root) %{_bindir}/derdump | |
233 | %attr(755,root,root) %{_bindir}/dertimetest | |
234 | %attr(755,root,root) %{_bindir}/digest | |
235 | %attr(755,root,root) %{_bindir}/encodeinttest | |
236 | %attr(755,root,root) %{_bindir}/fipstest | |
237 | %attr(755,root,root) %{_bindir}/httpserv | |
238 | %attr(755,root,root) %{_bindir}/listsuites | |
239 | %attr(755,root,root) %{_bindir}/lowhashtest | |
240 | %attr(755,root,root) %{_bindir}/makepqg | |
241 | %attr(755,root,root) %{_bindir}/mangle | |
242 | %attr(755,root,root) %{_bindir}/modutil | |
243 | %attr(755,root,root) %{_bindir}/multinit | |
244 | %attr(755,root,root) %{_bindir}/nonspr10 | |
245 | %attr(755,root,root) %{_bindir}/ocspclnt | |
246 | %attr(755,root,root) %{_bindir}/ocspresp | |
247 | %attr(755,root,root) %{_bindir}/oidcalc | |
248 | %attr(755,root,root) %{_bindir}/p7content | |
249 | %attr(755,root,root) %{_bindir}/p7env | |
250 | %attr(755,root,root) %{_bindir}/p7sign | |
251 | %attr(755,root,root) %{_bindir}/p7verify | |
252 | %attr(755,root,root) %{_bindir}/pk11gcmtest | |
253 | %attr(755,root,root) %{_bindir}/pk11mode | |
254 | %attr(755,root,root) %{_bindir}/pk12util | |
255 | %attr(755,root,root) %{_bindir}/pk1sign | |
256 | %attr(755,root,root) %{_bindir}/pkix-errcodes | |
257 | %attr(755,root,root) %{_bindir}/pp | |
258 | %attr(755,root,root) %{_bindir}/pwdecrypt | |
259 | %attr(755,root,root) %{_bindir}/remtest | |
260 | %attr(755,root,root) %{_bindir}/rsaperf | |
261 | %attr(755,root,root) %{_bindir}/sdrtest | |
262 | %attr(755,root,root) %{_bindir}/secmodtest | |
263 | %attr(755,root,root) %{_bindir}/selfserv | |
264 | %attr(755,root,root) %{_bindir}/shlibsign | |
265 | %attr(755,root,root) %{_bindir}/signtool | |
266 | %attr(755,root,root) %{_bindir}/signver | |
267 | %attr(755,root,root) %{_bindir}/ssltap | |
268 | %attr(755,root,root) %{_bindir}/strsclnt | |
269 | %attr(755,root,root) %{_bindir}/symkeyutil | |
270 | %attr(755,root,root) %{_bindir}/tstclnt | |
271 | %attr(755,root,root) %{_bindir}/vfychain | |
272 | %attr(755,root,root) %{_bindir}/vfyserv | |
b0cd5268 JB |
273 | %{_mandir}/man1/certutil.1* |
274 | %{_mandir}/man1/cmsutil.1* | |
275 | %{_mandir}/man1/crlutil.1* | |
276 | %{_mandir}/man1/derdump.1* | |
277 | %{_mandir}/man1/modutil.1* | |
278 | %{_mandir}/man1/pk12util.1* | |
279 | %{_mandir}/man1/pp.1* | |
280 | %{_mandir}/man1/signtool.1* | |
281 | %{_mandir}/man1/signver.1* | |
282 | %{_mandir}/man1/ssltap.1* | |
283 | %{_mandir}/man1/vfychain.1* | |
284 | %{_mandir}/man1/vfyserv.1* | |
e043961c | 285 | |
286 | %files static | |
287 | %defattr(644,root,root,755) | |
c9f1afae JB |
288 | %{_libdir}/libcertdb.a |
289 | %{_libdir}/libcerthi.a | |
290 | %{_libdir}/libcryptohi.a | |
291 | %{_libdir}/libdbm.a | |
292 | %{_libdir}/libfreebl3.a | |
293 | %{_libdir}/libjar.a | |
294 | %{_libdir}/libnss3.a | |
295 | %{_libdir}/libnssb.a | |
296 | %{_libdir}/libnssckfw.a | |
e0debb79 | 297 | %{_libdir}/libnssdbm3.a |
c9f1afae JB |
298 | %{_libdir}/libnssdev.a |
299 | %{_libdir}/libnsspki3.a | |
e0debb79 JB |
300 | %{_libdir}/libnssutil3.a |
301 | %{_libdir}/libpk11wrap3.a | |
c9f1afae JB |
302 | %{_libdir}/libpkcs12.a |
303 | %{_libdir}/libpkcs7.a | |
e0debb79 JB |
304 | %{_libdir}/libpkixcertsel.a |
305 | %{_libdir}/libpkixchecker.a | |
306 | %{_libdir}/libpkixcrlsel.a | |
307 | %{_libdir}/libpkixmodule.a | |
308 | %{_libdir}/libpkixparams.a | |
309 | %{_libdir}/libpkixpki.a | |
310 | %{_libdir}/libpkixresults.a | |
311 | %{_libdir}/libpkixstore.a | |
312 | %{_libdir}/libpkixsystem.a | |
313 | %{_libdir}/libpkixtop.a | |
314 | %{_libdir}/libpkixutil.a | |
c9f1afae | 315 | %{_libdir}/libsectool.a |
c9f1afae JB |
316 | %{_libdir}/libsmime3.a |
317 | %{_libdir}/libsoftokn3.a | |
318 | %{_libdir}/libssl3.a | |
909366d3 AM |
319 | |
320 | %files softokn-freebl | |
321 | %defattr(644,root,root,755) | |
322 | %attr(755,root,root) /%{_lib}/libfreebl3.so | |
69cbb7a2 | 323 | /%{_lib}/libfreebl3.chk |