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