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