]>
Commit | Line | Data |
---|---|---|
8d1548f6 | 1 | %define foover %(echo %{version} | tr . _) |
e043961c | 2 | Summary: NSS - Network Security Services |
900f3743 | 3 | Summary(pl.UTF-8): NSS - Network Security Services |
e043961c | 4 | Name: nss |
036e710e | 5 | Version: 3.13.6 |
2455c084 | 6 | Release: 1 |
c61925df | 7 | Epoch: 1 |
c9f1afae | 8 | License: MPL v1.1 or GPL v2+ or LGPL v2.1+ |
a20334db | 9 | Group: Libraries |
de78c6c4 JB |
10 | # :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot mozilla/dbm -r DBM_1_61_RTM |
11 | # :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot mozilla/security/dbm -r DBM_1_61_RTM | |
12 | # :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot mozilla/security/coreconf -r NSS_3_9_4_RTM | |
13 | # :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot mozilla/security/nss -r NSS_3_9_4_RTM | |
1a10ee06 | 14 | #Source0: %{name}-%{version}.tar.bz2 |
d6727b26 | 15 | Source0: http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_%{foover}_RTM/src/%{name}-%{version}.tar.gz |
036e710e | 16 | # Source0-md5: 15ea0e3b63cd0d18b5b75619afc46c3e |
9e8d6618 | 17 | Source1: %{name}-mozilla-nss.pc |
8d1548f6 | 18 | Source2: %{name}-config.in |
867c7e33 ER |
19 | Source3: http://www.cacert.org/certs/root.der |
20 | # Source3-md5: a61b375e390d9c3654eebd2031461f6b | |
e043961c | 21 | Patch0: %{name}-Makefile.patch |
0c7a986a | 22 | URL: http://www.mozilla.org/projects/security/pki/nss/ |
58a19c98 | 23 | BuildRequires: nspr-devel >= 1:4.9 |
867c7e33 | 24 | BuildRequires: nss-tools |
acc47f6e | 25 | BuildRequires: perl-base |
0e541f12 | 26 | BuildRequires: sqlite3-devel |
e814da19 | 27 | BuildRequires: zlib-devel |
7d80b913 | 28 | BuildConflicts: mozilla < 0.9.6-3 |
58a19c98 | 29 | Requires: nspr >= 1:4.9 |
ce0a2a28 | 30 | Requires: %{name}-softokn-freebl = %{epoch}:%{version}-%{release} |
64c1d08d | 31 | Obsoletes: libnss3 |
8a057a22 | 32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
e043961c | 33 | |
f68ec3a2 | 34 | %define specflags -fno-strict-aliasing |
c9f1afae JB |
35 | # signed - stripped before signing |
36 | %define _noautostrip .*%{_libdir}/libfreebl3.so\\|.*%{_libdir}/libsoftokn3.so | |
37 | %define _noautochrpath .*%{_libdir}/libfreebl3.so\\|.*%{_libdir}/libsoftokn3.so | |
f68ec3a2 | 38 | |
e3f4677f | 39 | %description |
6b813326 | 40 | NSS supports cross-platform development of security-enabled server |
d8ef6ecb | 41 | applications. Applications built with NSS can support PKCS #5, |
bf42a3ba | 42 | PKCS #7, PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 and v3, X.509 v3 |
6b813326 | 43 | certificates, and other security standards. |
e043961c | 44 | |
238a25a0 JR |
45 | %description -l pl.UTF-8 |
46 | NSS wspomaga pisanie wieloplatformowych bezpiecznych serwerów. | |
47 | Aplikacja używająca NSS jest w stanie obsłużyć PKCS #5, PKCS #7, | |
d8ef6ecb | 48 | PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 oraz v3, certyfikaty X.509 v3, |
238a25a0 | 49 | i wiele innych bezpiecznych standardów. |
e043961c | 50 | |
c3d988d0 JB |
51 | %package tools |
52 | Summary: NSS command line tools and utilities | |
c9f1afae | 53 | Summary(pl.UTF-8): Narzędzia NSS obsługiwane z linii poleceń |
c3d988d0 | 54 | Group: Applications |
93f17fb4 | 55 | Requires: %{name} = %{epoch}:%{version}-%{release} |
c3d988d0 JB |
56 | |
57 | %description tools | |
58 | The NSS Toolkit command line tool. | |
59 | ||
238a25a0 JR |
60 | %description tools -l pl.UTF-8 |
61 | Narzędzia NSS obsługiwane z linii poleceń. | |
c3d988d0 | 62 | |
e043961c | 63 | %package devel |
64 | Summary: NSS - header files | |
900f3743 | 65 | Summary(pl.UTF-8): NSS - pliki nagłówkowe |
e043961c | 66 | Group: Development/Libraries |
93f17fb4 | 67 | Requires: %{name} = %{epoch}:%{version}-%{release} |
58a19c98 | 68 | Requires: nspr-devel >= 1:4.9 |
64c1d08d | 69 | Obsoletes: libnss3-devel |
e043961c | 70 | |
71 | %description devel | |
72 | Development part of NSS library. | |
73 | ||
238a25a0 JR |
74 | %description devel -l pl.UTF-8 |
75 | Część biblioteki NSS przeznaczona dla programistów. | |
e043961c | 76 | |
e043961c | 77 | %package static |
78 | Summary: NSS - static library | |
900f3743 | 79 | Summary(pl.UTF-8): NSS - biblioteka statyczna |
e043961c | 80 | Group: Development/Libraries |
93f17fb4 | 81 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
e043961c | 82 | |
83 | %description static | |
84 | Static NSS Toolkit libraries. | |
85 | ||
238a25a0 | 86 | %description static -l pl.UTF-8 |
e043961c | 87 | Statyczne wersje bibliotek z NSS. |
88 | ||
909366d3 AM |
89 | %package softokn-freebl |
90 | Summary: Freebl library for the Network Security Services | |
d6727b26 | 91 | Summary(pl.UTF-8): Biblioteka freebl dla bibliotek NSS |
909366d3 AM |
92 | Group: Libraries |
93 | ||
94 | %description softokn-freebl | |
d6727b26 JB |
95 | Freebl cryptographic library for the Network Security Services. |
96 | ||
97 | %description softokn-freebl -l pl.UTF-8 | |
98 | Biblioteka kryptograficzna freebl dla bibliotek NSS. | |
909366d3 | 99 | |
e043961c | 100 | %prep |
1015f127 | 101 | %setup -q |
e043961c | 102 | %patch0 -p1 |
103 | ||
c9f1afae JB |
104 | %if 0%{!?debug:1} |
105 | # strip before signing | |
106 | sed -i -e '/export ADDON_PATH$/a\ echo STRIP \; %{__strip} --strip-unneeded -R.comment -R.note ${5}' mozilla/security/nss/cmd/shlibsign/sign.sh | |
107 | %endif | |
108 | ||
e043961c | 109 | %build |
110 | cd mozilla/security/nss | |
111 | ||
867c7e33 ER |
112 | # http://wiki.cacert.org/wiki/NSSLib |
113 | addbuiltin -n "CAcert Inc." -t "CT,C,C" < %{SOURCE3} >> lib/ckfw/builtins/certdata.txt | |
a4ca01ff | 114 | %{__make} -C lib/ckfw/builtins generate |
867c7e33 | 115 | |
ab170647 | 116 | %ifarch %{x8664} ppc64 sparc64 |
f68ec3a2 PS |
117 | export USE_64=1 |
118 | %endif | |
119 | ||
8d1548f6 | 120 | %{__make} -j1 build_coreconf \ |
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 | ||
8d1548f6 | 130 | %{__make} -j1 build_dbm \ |
e043961c | 131 | NSDISTMODE=copy \ |
132 | NS_USE_GCC=1 \ | |
133 | MOZILLA_CLIENT=1 \ | |
134 | NO_MDUPDATE=1 \ | |
135 | USE_PTHREADS=1 \ | |
136 | BUILD_OPT=1 \ | |
07b248d4 | 137 | CC="%{__cc}" \ |
e043961c | 138 | OPTIMIZER="%{rpmcflags}" \ |
6b813326 | 139 | PLATFORM="pld" |
e3f4677f | 140 | |
8d1548f6 | 141 | %{__make} -j1 all \ |
e043961c | 142 | NSDISTMODE=copy \ |
143 | NS_USE_GCC=1 \ | |
144 | MOZILLA_CLIENT=1 \ | |
145 | NO_MDUPDATE=1 \ | |
146 | USE_PTHREADS=1 \ | |
0d478c4c JB |
147 | USE_SYSTEM_ZLIB=1 \ |
148 | ZLIB_LIBS="-lz" \ | |
07b248d4 JB |
149 | BUILD_OPT=1 \ |
150 | CC="%{__cc}" \ | |
e043961c | 151 | OPTIMIZER="%{rpmcflags}" \ |
2455c084 | 152 | PLATFORM="pld" |
e043961c | 153 | |
154 | %install | |
155 | rm -rf $RPM_BUILD_ROOT | |
909366d3 | 156 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/nss,/%{_lib},%{_libdir},%{_pkgconfigdir}} |
eec1fab1 | 157 | |
bf42a3ba | 158 | install mozilla/dist/private/nss/* $RPM_BUILD_ROOT%{_includedir}/nss |
e043961c | 159 | install mozilla/dist/public/dbm/* $RPM_BUILD_ROOT%{_includedir}/nss |
bf42a3ba | 160 | install mozilla/dist/public/nss/* $RPM_BUILD_ROOT%{_includedir}/nss |
e043961c | 161 | install mozilla/dist/pld/bin/* $RPM_BUILD_ROOT%{_bindir} |
162 | install mozilla/dist/pld/lib/* $RPM_BUILD_ROOT%{_libdir} | |
163 | ||
8d1548f6 ER |
164 | %{__sed} -e ' |
165 | s#libdir=.*#libdir=%{_libdir}#g | |
166 | s#includedir=.*#includedir=%{_includedir}#g | |
167 | s#VERSION#%{version}#g | |
168 | ' %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozilla-nss.pc | |
169 | ln -s mozilla-nss.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/nss.pc | |
170 | ||
171 | NSS_VMAJOR=$(awk '/#define.*NSS_VMAJOR/ {print $3}' mozilla/security/nss/lib/nss/nss.h) | |
172 | NSS_VMINOR=$(awk '/#define.*NSS_VMINOR/ {print $3}' mozilla/security/nss/lib/nss/nss.h) | |
173 | NSS_VPATCH=$(awk '/#define.*NSS_VPATCH/ {print $3}' mozilla/security/nss/lib/nss/nss.h) | |
174 | %{__sed} -e " | |
175 | s,@libdir@,%{_libdir},g | |
176 | s,@prefix@,%{_prefix},g | |
177 | s,@exec_prefix@,%{_prefix},g | |
507f226d | 178 | s,@includedir@,%{_includedir}/nss,g |
69aeda39 ER |
179 | s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g |
180 | s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g | |
181 | s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g | |
8d1548f6 ER |
182 | " %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/nss-config |
183 | chmod +x $RPM_BUILD_ROOT%{_bindir}/nss-config | |
9e8d6618 | 184 | |
909366d3 AM |
185 | mv $RPM_BUILD_ROOT%{_libdir}/libfreebl3.so $RPM_BUILD_ROOT/%{_lib} |
186 | ln -s /%{_lib}/libfreebl3.so $RPM_BUILD_ROOT%{_libdir}/libfreebl3.so | |
69cbb7a2 AM |
187 | mv $RPM_BUILD_ROOT%{_libdir}/libfreebl3.chk $RPM_BUILD_ROOT/%{_lib} |
188 | ln -s /%{_lib}/libfreebl3.chk $RPM_BUILD_ROOT%{_libdir}/libfreebl3.chk | |
909366d3 | 189 | |
e6093db0 AM |
190 | if [ ! -f "$RPM_BUILD_ROOT%{_includedir}/nss/nsslowhash.h" ]; then |
191 | echo "ERROR: %{_includedir}/nss/nsslowhash.h not installed. Needed by glibc" >&2 | |
192 | exit 1 | |
193 | fi | |
194 | ||
eccd0672 | 195 | %clean |
196 | rm -rf $RPM_BUILD_ROOT | |
197 | ||
985ee8fc JB |
198 | %post -p /sbin/ldconfig |
199 | %postun -p /sbin/ldconfig | |
e043961c | 200 | |
201 | %files | |
202 | %defattr(644,root,root,755) | |
c9f1afae JB |
203 | %attr(755,root,root) %{_libdir}/libfreebl3.so |
204 | %attr(755,root,root) %{_libdir}/libnss3.so | |
205 | %attr(755,root,root) %{_libdir}/libnssckbi.so | |
e0debb79 JB |
206 | %attr(755,root,root) %{_libdir}/libnssdbm3.so |
207 | %attr(755,root,root) %{_libdir}/libnssutil3.so | |
c9f1afae JB |
208 | %attr(755,root,root) %{_libdir}/libsmime3.so |
209 | %attr(755,root,root) %{_libdir}/libsoftokn3.so | |
210 | %attr(755,root,root) %{_libdir}/libssl3.so | |
211 | %{_libdir}/libfreebl3.chk | |
d6727b26 | 212 | %{_libdir}/libnssdbm3.chk |
c9f1afae | 213 | %{_libdir}/libsoftokn3.chk |
e043961c | 214 | |
215 | %files devel | |
216 | %defattr(644,root,root,755) | |
ed6867e9 | 217 | %attr(755,root,root) %{_bindir}/nss-config |
c89efb4d | 218 | %{_libdir}/libcrmf.a |
d6727b26 | 219 | %{_includedir}/nss |
c9f1afae JB |
220 | %{_pkgconfigdir}/mozilla-nss.pc |
221 | %{_pkgconfigdir}/nss.pc | |
e043961c | 222 | |
223 | %files tools | |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_bindir}/* | |
8d1548f6 | 226 | %exclude %{_bindir}/nss-config |
e043961c | 227 | |
228 | %files static | |
229 | %defattr(644,root,root,755) | |
c9f1afae JB |
230 | %{_libdir}/libcertdb.a |
231 | %{_libdir}/libcerthi.a | |
232 | %{_libdir}/libcryptohi.a | |
233 | %{_libdir}/libdbm.a | |
234 | %{_libdir}/libfreebl3.a | |
235 | %{_libdir}/libjar.a | |
236 | %{_libdir}/libnss3.a | |
237 | %{_libdir}/libnssb.a | |
238 | %{_libdir}/libnssckfw.a | |
e0debb79 | 239 | %{_libdir}/libnssdbm3.a |
c9f1afae JB |
240 | %{_libdir}/libnssdev.a |
241 | %{_libdir}/libnsspki3.a | |
e0debb79 JB |
242 | %{_libdir}/libnssutil3.a |
243 | %{_libdir}/libpk11wrap3.a | |
c9f1afae JB |
244 | %{_libdir}/libpkcs12.a |
245 | %{_libdir}/libpkcs7.a | |
e0debb79 JB |
246 | %{_libdir}/libpkixcertsel.a |
247 | %{_libdir}/libpkixchecker.a | |
248 | %{_libdir}/libpkixcrlsel.a | |
249 | %{_libdir}/libpkixmodule.a | |
250 | %{_libdir}/libpkixparams.a | |
251 | %{_libdir}/libpkixpki.a | |
252 | %{_libdir}/libpkixresults.a | |
253 | %{_libdir}/libpkixstore.a | |
254 | %{_libdir}/libpkixsystem.a | |
255 | %{_libdir}/libpkixtop.a | |
256 | %{_libdir}/libpkixutil.a | |
c9f1afae | 257 | %{_libdir}/libsectool.a |
c9f1afae JB |
258 | %{_libdir}/libsmime3.a |
259 | %{_libdir}/libsoftokn3.a | |
260 | %{_libdir}/libssl3.a | |
909366d3 AM |
261 | |
262 | %files softokn-freebl | |
263 | %defattr(644,root,root,755) | |
264 | %attr(755,root,root) /%{_lib}/libfreebl3.so | |
69cbb7a2 | 265 | /%{_lib}/libfreebl3.chk |