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