]>
Commit | Line | Data |
---|---|---|
1 | %define foover %(echo %{version} | tr . _) | |
2 | Summary: NSS - Network Security Services | |
3 | Summary(pl.UTF-8): NSS - Network Security Services | |
4 | Name: nss | |
5 | Version: 3.13.6 | |
6 | Release: 1 | |
7 | Epoch: 1 | |
8 | License: MPL v1.1 or GPL v2+ or LGPL v2.1+ | |
9 | Group: Libraries | |
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 | |
14 | #Source0: %{name}-%{version}.tar.bz2 | |
15 | Source0: http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_%{foover}_RTM/src/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: 15ea0e3b63cd0d18b5b75619afc46c3e | |
17 | Source1: %{name}-mozilla-nss.pc | |
18 | Source2: %{name}-config.in | |
19 | Source3: http://www.cacert.org/certs/root.der | |
20 | # Source3-md5: a61b375e390d9c3654eebd2031461f6b | |
21 | Patch0: %{name}-Makefile.patch | |
22 | URL: http://www.mozilla.org/projects/security/pki/nss/ | |
23 | BuildRequires: nspr-devel >= 1:4.9 | |
24 | BuildRequires: nss-tools | |
25 | BuildRequires: perl-base | |
26 | BuildRequires: sqlite3-devel | |
27 | BuildRequires: zlib-devel | |
28 | BuildConflicts: mozilla < 0.9.6-3 | |
29 | Requires: nspr >= 1:4.9 | |
30 | Requires: %{name}-softokn-freebl = %{epoch}:%{version}-%{release} | |
31 | Obsoletes: libnss3 | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %define specflags -fno-strict-aliasing | |
35 | # signed - stripped before signing | |
36 | %define _noautostrip .*%{_libdir}/libfreebl3.so\\|.*%{_libdir}/libsoftokn3.so | |
37 | %define _noautochrpath .*%{_libdir}/libfreebl3.so\\|.*%{_libdir}/libsoftokn3.so | |
38 | ||
39 | %description | |
40 | NSS supports cross-platform development of security-enabled server | |
41 | applications. Applications built with NSS can support PKCS #5, | |
42 | PKCS #7, PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 and v3, X.509 v3 | |
43 | certificates, and other security standards. | |
44 | ||
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, | |
48 | PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 oraz v3, certyfikaty X.509 v3, | |
49 | i wiele innych bezpiecznych standardów. | |
50 | ||
51 | %package tools | |
52 | Summary: NSS command line tools and utilities | |
53 | Summary(pl.UTF-8): Narzędzia NSS obsługiwane z linii poleceń | |
54 | Group: Applications | |
55 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
56 | ||
57 | %description tools | |
58 | The NSS Toolkit command line tool. | |
59 | ||
60 | %description tools -l pl.UTF-8 | |
61 | Narzędzia NSS obsługiwane z linii poleceń. | |
62 | ||
63 | %package devel | |
64 | Summary: NSS - header files | |
65 | Summary(pl.UTF-8): NSS - pliki nagłówkowe | |
66 | Group: Development/Libraries | |
67 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
68 | Requires: nspr-devel >= 1:4.9 | |
69 | Obsoletes: libnss3-devel | |
70 | ||
71 | %description devel | |
72 | Development part of NSS library. | |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Część biblioteki NSS przeznaczona dla programistów. | |
76 | ||
77 | %package static | |
78 | Summary: NSS - static library | |
79 | Summary(pl.UTF-8): NSS - biblioteka statyczna | |
80 | Group: Development/Libraries | |
81 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
82 | ||
83 | %description static | |
84 | Static NSS Toolkit libraries. | |
85 | ||
86 | %description static -l pl.UTF-8 | |
87 | Statyczne wersje bibliotek z NSS. | |
88 | ||
89 | %package softokn-freebl | |
90 | Summary: Freebl library for the Network Security Services | |
91 | Summary(pl.UTF-8): Biblioteka freebl dla bibliotek NSS | |
92 | Group: Libraries | |
93 | ||
94 | %description softokn-freebl | |
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. | |
99 | ||
100 | %prep | |
101 | %setup -q | |
102 | %patch0 -p1 | |
103 | ||
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 | ||
109 | %build | |
110 | cd mozilla/security/nss | |
111 | ||
112 | # http://wiki.cacert.org/wiki/NSSLib | |
113 | addbuiltin -n "CAcert Inc." -t "CT,C,C" < %{SOURCE3} >> lib/ckfw/builtins/certdata.txt | |
114 | %{__make} -C lib/ckfw/builtins generate | |
115 | ||
116 | %ifarch %{x8664} ppc64 sparc64 | |
117 | export USE_64=1 | |
118 | %endif | |
119 | ||
120 | %{__make} -j1 build_coreconf \ | |
121 | NSDISTMODE=copy \ | |
122 | NS_USE_GCC=1 \ | |
123 | MOZILLA_CLIENT=1 \ | |
124 | NO_MDUPDATE=1 \ | |
125 | USE_PTHREADS=1 \ | |
126 | BUILD_OPT=1 \ | |
127 | CC="%{__cc}" \ | |
128 | OPTIMIZER="%{rpmcflags}" | |
129 | ||
130 | %{__make} -j1 build_dbm \ | |
131 | NSDISTMODE=copy \ | |
132 | NS_USE_GCC=1 \ | |
133 | MOZILLA_CLIENT=1 \ | |
134 | NO_MDUPDATE=1 \ | |
135 | USE_PTHREADS=1 \ | |
136 | BUILD_OPT=1 \ | |
137 | CC="%{__cc}" \ | |
138 | OPTIMIZER="%{rpmcflags}" \ | |
139 | PLATFORM="pld" | |
140 | ||
141 | %{__make} -j1 all \ | |
142 | NSDISTMODE=copy \ | |
143 | NS_USE_GCC=1 \ | |
144 | MOZILLA_CLIENT=1 \ | |
145 | NO_MDUPDATE=1 \ | |
146 | USE_PTHREADS=1 \ | |
147 | USE_SYSTEM_ZLIB=1 \ | |
148 | ZLIB_LIBS="-lz" \ | |
149 | BUILD_OPT=1 \ | |
150 | CC="%{__cc}" \ | |
151 | OPTIMIZER="%{rpmcflags}" \ | |
152 | PLATFORM="pld" | |
153 | ||
154 | %install | |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/nss,/%{_lib},%{_libdir},%{_pkgconfigdir}} | |
157 | ||
158 | install mozilla/dist/private/nss/* $RPM_BUILD_ROOT%{_includedir}/nss | |
159 | install mozilla/dist/public/dbm/* $RPM_BUILD_ROOT%{_includedir}/nss | |
160 | install mozilla/dist/public/nss/* $RPM_BUILD_ROOT%{_includedir}/nss | |
161 | install mozilla/dist/pld/bin/* $RPM_BUILD_ROOT%{_bindir} | |
162 | install mozilla/dist/pld/lib/* $RPM_BUILD_ROOT%{_libdir} | |
163 | ||
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 | |
178 | s,@includedir@,%{_includedir}/nss,g | |
179 | s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g | |
180 | s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g | |
181 | s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g | |
182 | " %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/nss-config | |
183 | chmod +x $RPM_BUILD_ROOT%{_bindir}/nss-config | |
184 | ||
185 | mv $RPM_BUILD_ROOT%{_libdir}/libfreebl3.so $RPM_BUILD_ROOT/%{_lib} | |
186 | ln -s /%{_lib}/libfreebl3.so $RPM_BUILD_ROOT%{_libdir}/libfreebl3.so | |
187 | mv $RPM_BUILD_ROOT%{_libdir}/libfreebl3.chk $RPM_BUILD_ROOT/%{_lib} | |
188 | ln -s /%{_lib}/libfreebl3.chk $RPM_BUILD_ROOT%{_libdir}/libfreebl3.chk | |
189 | ||
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 | ||
195 | %clean | |
196 | rm -rf $RPM_BUILD_ROOT | |
197 | ||
198 | %post -p /sbin/ldconfig | |
199 | %postun -p /sbin/ldconfig | |
200 | ||
201 | %files | |
202 | %defattr(644,root,root,755) | |
203 | %attr(755,root,root) %{_libdir}/libfreebl3.so | |
204 | %attr(755,root,root) %{_libdir}/libnss3.so | |
205 | %attr(755,root,root) %{_libdir}/libnssckbi.so | |
206 | %attr(755,root,root) %{_libdir}/libnssdbm3.so | |
207 | %attr(755,root,root) %{_libdir}/libnssutil3.so | |
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 | |
212 | %{_libdir}/libnssdbm3.chk | |
213 | %{_libdir}/libsoftokn3.chk | |
214 | ||
215 | %files devel | |
216 | %defattr(644,root,root,755) | |
217 | %attr(755,root,root) %{_bindir}/nss-config | |
218 | %{_libdir}/libcrmf.a | |
219 | %{_includedir}/nss | |
220 | %{_pkgconfigdir}/mozilla-nss.pc | |
221 | %{_pkgconfigdir}/nss.pc | |
222 | ||
223 | %files tools | |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_bindir}/* | |
226 | %exclude %{_bindir}/nss-config | |
227 | ||
228 | %files static | |
229 | %defattr(644,root,root,755) | |
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 | |
239 | %{_libdir}/libnssdbm3.a | |
240 | %{_libdir}/libnssdev.a | |
241 | %{_libdir}/libnsspki3.a | |
242 | %{_libdir}/libnssutil3.a | |
243 | %{_libdir}/libpk11wrap3.a | |
244 | %{_libdir}/libpkcs12.a | |
245 | %{_libdir}/libpkcs7.a | |
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 | |
257 | %{_libdir}/libsectool.a | |
258 | %{_libdir}/libsmime3.a | |
259 | %{_libdir}/libsoftokn3.a | |
260 | %{_libdir}/libssl3.a | |
261 | ||
262 | %files softokn-freebl | |
263 | %defattr(644,root,root,755) | |
264 | %attr(755,root,root) /%{_lib}/libfreebl3.so | |
265 | /%{_lib}/libfreebl3.chk |