]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - nss-softokn/nss-softokn.spec
Move all packages to root.
[people/amarx/ipfire-3.x.git] / nss-softokn / nss-softokn.spec
CommitLineData
98e4b7dc
MT
1%global nspr_version 4.8.6
2%global nss_name nss
3%global nss_util_version 3.12.8
4%global unsupported_tools_directory %{_libdir}/nss/unsupported-tools
5%global saved_files_dir %{_libdir}/nss/saved
6
7# Produce .chk files for the final stripped binaries
8%define __spec_install_post \
9 %{?__debug_package:%{__debug_install_post}} \
10 %{__arch_install_post} \
11 %{__os_install_post} \
12 $RPM_BUILD_ROOT/%{unsupported_tools_directory}/shlibsign -i $RPM_BUILD_ROOT/%{_libdir}/libsoftokn3.so \
13 $RPM_BUILD_ROOT/%{unsupported_tools_directory}/shlibsign -i $RPM_BUILD_ROOT/%{_lib}/libfreebl3.so \
14 $RPM_BUILD_ROOT/%{unsupported_tools_directory}/shlibsign -i $RPM_BUILD_ROOT/%{_libdir}/libnssdbm3.so \
15%{nil}
16
17Summary: Network Security Services Softoken Module
18Name: nss-softokn
19Version: 3.12.8
20Release: 2%{?dist}
21License: MPLv1.1 or GPLv2+ or LGPLv2+
22URL: http://www.mozilla.org/projects/security/pki/nss/
23Group: System Environment/Libraries
24Requires: nspr >= %{nspr_version}
25Requires: nss-util >= %{nss_util_version}
26Requires: nss-softokn-freebl%{_isa} >= %{version}
27BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
28BuildRequires: nspr-devel >= %{nspr_version}
29BuildRequires: nss-util-devel >= %{nss_util_version}
30BuildRequires: sqlite-devel
31BuildRequires: zlib-devel
32BuildRequires: pkgconfig
33BuildRequires: gawk
34BuildRequires: psmisc
35BuildRequires: perl
36
37Source0: %{name}-%{version}-stripped.tar.bz2
38# The nss-softokn tar ball is a subset of nss-{version}-stripped.tar.bz2,
39# Therefore we use the nss-split-softokn.sh script to keep only what we need.
40# Download the nss tarball via git from the nss propect and follow these
41# steps to make the tarball for nss-util out of the one for nss:
42# fedpkg clone nss
43# fedpkg clone nss-softokn
44# cd nss-softokn
45# cp ../../nss/devel/${version}-stripped.tar.bz2 .
46# sh ./nss-split-softokn.sh ${version}
47# A file named {name}-{version}-stripped.tar.bz2 should appear
48Source1: nss-split-softokn.sh
49Source2: nss-softokn.pc.in
50Source3: nss-softokn-config.in
51
52Patch2: nss-softokn-3.12.4-prelink.patch
53Patch3: nss-softokn-3.12.4-fips-fix.patch
54
55%description
56Network Security Services Softoken Cryptographic Module
57
58%package freebl
59Summary: Freebl library for the Network Security Services
60Group: System Environment/Base
61Conflicts: nss < 3.12.2.99.3-5
62Conflicts: prelink < 0.4.3
63
64%description freebl
65NSS Softoken Cryptographic Module Freelb Library
66
67Install the nss-softokn-freebl package if you need the freebl
68library.
69
70%package freebl-devel
71Summary: Header and Library files for doing development with the Freebl library for NSS
72Group: System Environment/Base
73Provides: nss-softokn-freebl-static = %{version}-%{release}
74Requires: nss-softokn-freebl%{?_isa} = %{version}-%{release}
75
76%description freebl-devel
77NSS Softoken Cryptographic Module Freelb Library Development Tools
78
79%package devel
80Summary: Development libraries for Network Security Services
81Group: Development/Libraries
82Requires: nss-softokn%{?_isa} = %{version}-%{release}
83Requires: nspr-devel >= %{nspr_version}
84Requires: nss-util-devel >= %{nss_util_version}
85Requires: pkgconfig
86BuildRequires: nspr-devel >= %{nspr_version}
87BuildRequires: nss-util-devel >= %{nss_util_version}
88# require nss at least the version when we split via subpackages
89BuildRequires: nss-devel >= 3.12.2.99.3-11
90
91%description devel
92Header and Library files for doing development with Network Security Services.
93
94
95%prep
96%setup -q
97
98%patch2 -p0 -b .prelink
99%patch3 -p0 -b .fipsfix
100
101
102%build
103
104FREEBL_NO_DEPEND=1
105export FREEBL_NO_DEPEND
106
107FREEBL_USE_PRELINK=1
108export FREEBL_USE_PRELINK
109
110# Enable compiler optimizations and disable debugging code
111BUILD_OPT=1
112export BUILD_OPT
113
114# Generate symbolic info for debuggers
115XCFLAGS=$RPM_OPT_FLAGS
116export XCFLAGS
117
118PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
119PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
120
121export PKG_CONFIG_ALLOW_SYSTEM_LIBS
122export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
123
124NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'`
125NSPR_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nspr | sed 's/-L//'`
126
127export NSPR_INCLUDE_DIR
128export NSPR_LIB_DIR
129
130NSS_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nss-util | sed 's/-I//'`
131NSS_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nss-util | sed 's/-L//'`
132
133export NSS_INCLUDE_DIR
134export NSS_LIB_DIR
135
136NSS_USE_SYSTEM_SQLITE=1
137export NSS_USE_SYSTEM_SQLITE
138
139%ifarch x86_64 ppc64 ia64 s390x sparc64
140USE_64=1
141export USE_64
142%endif
143
144# Compile softokn plus needed support
145%{__make} -C ./mozilla/security/coreconf
146%{__make} -C ./mozilla/security/dbm
147%{__make} -C ./mozilla/security/nss
148
149# Set up our package file
150# The nspr_version and nss_util_version globals used here
151# must match the ones nss-softokn has for its Requires.
152%{__mkdir_p} ./mozilla/dist/pkgconfig
153%{__cat} %{SOURCE2} | sed -e "s,%%libdir%%,%{_libdir},g" \
154 -e "s,%%prefix%%,%{_prefix},g" \
155 -e "s,%%exec_prefix%%,%{_prefix},g" \
156 -e "s,%%includedir%%,%{_includedir}/nss3,g" \
157 -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
158 -e "s,%%NSSUTIL_VERSION%%,%{nss_util_version},g" \
159 -e "s,%%SOFTOKEN_VERSION%%,%{version},g" > \
160 ./mozilla/dist/pkgconfig/nss-softokn.pc
161
162SOFTOKEN_VMAJOR=`cat mozilla/security/nss/lib/softoken/softkver.h | grep "#define.*SOFTOKEN_VMAJOR" | awk '{print $3}'`
163SOFTOKEN_VMINOR=`cat mozilla/security/nss/lib/softoken/softkver.h | grep "#define.*SOFTOKEN_VMINOR" | awk '{print $3}'`
164SOFTOKEN_VPATCH=`cat mozilla/security/nss/lib/softoken/softkver.h | grep "#define.*SOFTOKEN_VPATCH" | awk '{print $3}'`
165
166export SOFTOKEN_VMAJOR
167export SOFTOKEN_VMINOR
168export SOFTOKEN_VPATCH
169
170%{__cat} %{SOURCE3} | sed -e "s,@libdir@,%{_libdir},g" \
171 -e "s,@prefix@,%{_prefix},g" \
172 -e "s,@exec_prefix@,%{_prefix},g" \
173 -e "s,@includedir@,%{_includedir}/nss3,g" \
174 -e "s,@MOD_MAJOR_VERSION@,$SOFTOKEN_VMAJOR,g" \
175 -e "s,@MOD_MINOR_VERSION@,$SOFTOKEN_VMINOR,g" \
176 -e "s,@MOD_PATCH_VERSION@,$SOFTOKEN_VPATCH,g" \
177 > ./mozilla/dist/pkgconfig/nss-softokn-config
178
179chmod 755 ./mozilla/dist/pkgconfig/nss-softokn-config
180
181
182# enable the following line to force a test failure
183# find ./mozilla -name \*.chk | xargs rm -f
184
185#
186# We can't run a subset of the tests because the tools have
187# dependencies on nss libraries outside of softokn.
188# Let's leave this as a place holder.
189#
190
191
192%install
193
194%{__rm} -rf $RPM_BUILD_ROOT
195
196# There is no make install target so we'll do it ourselves.
197
198%{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/nss3
199%{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir}
200%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}
201%{__mkdir_p} $RPM_BUILD_ROOT/%{_lib}
202%{__mkdir_p} $RPM_BUILD_ROOT/%{unsupported_tools_directory}
203%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
204%{__mkdir_p} $RPM_BUILD_ROOT/%{saved_files_dir}
205
206# Copy the binary libraries we want
207for file in libsoftokn3.so libnssdbm3.so
208do
209 %{__install} -p -m 755 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir}
210done
211
212# Because libcrypt depends on libfreebl3.so, it is special
213# so we install it in /lib{64}, keeping a symbolic link to it
214# back in /usr/lib{64} to keep everyone else working
215for file in libfreebl3.so
216do
217 %{__install} -p -m 755 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_lib}
218 ln -sf ../../%{_lib}/libfreebl3.so $RPM_BUILD_ROOT/%{_libdir}/libfreebl3.so
219done
220
221# Make sure chk files can be found in both places
222for file in libfreebl3.chk
223do
224 ln -s ../../%{_lib}/$file $RPM_BUILD_ROOT/%{_libdir}/$file
225done
226
227# Copy the binaries we ship as unsupported
228for file in shlibsign
229do
230 %{__install} -p -m 755 mozilla/dist/*.OBJ/bin/$file $RPM_BUILD_ROOT/%{unsupported_tools_directory}
231done
232
233# Copy the include files we want
234for file in mozilla/dist/public/nss/*.h
235do
236 %{__install} -p -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/nss3
237done
238
239# Copy a freebl include file we also want
240for file in mozilla/dist/private/nss/blapi.h
241do
242 %{__install} -p -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/nss3
243done
244
245# Copy the static freebl library
246for file in libfreebl.a
247do
248%{__install} -p -m 644 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir}
249done
250
251# Copy the package configuration files
252%{__install} -p -m 644 ./mozilla/dist/pkgconfig/nss-softokn.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nss-softokn.pc
253%{__install} -p -m 755 ./mozilla/dist/pkgconfig/nss-softokn-config $RPM_BUILD_ROOT/%{_bindir}/nss-softokn-config
254
255%clean
256%{__rm} -rf $RPM_BUILD_ROOT
257
258
259%post
260/sbin/ldconfig >/dev/null 2>/dev/null
261
262%postun
263/sbin/ldconfig >/dev/null 2>/dev/null
264
265%files
266%defattr(-,root,root)
267%{_libdir}/libnssdbm3.so
268%{_libdir}/libnssdbm3.chk
269%{_libdir}/libsoftokn3.so
270%{_libdir}/libsoftokn3.chk
271# shared with nss-tools
272%dir %{_libdir}/nss
273%dir %{saved_files_dir}
274%dir %{unsupported_tools_directory}
275%{unsupported_tools_directory}/shlibsign
276
277%files freebl
278%defattr(-,root,root)
279/%{_lib}/libfreebl3.so
280/%{_lib}/libfreebl3.chk
281# and these symbolic links
282%{_libdir}/libfreebl3.so
283%{_libdir}/libfreebl3.chk
284
285%files freebl-devel
286%defattr(-,root,root)
287%{_libdir}/libfreebl.a
288%{_includedir}/nss3/blapi.h
289
290%files devel
291%defattr(-,root,root)
292%{_libdir}/pkgconfig/nss-softokn.pc
293%{_bindir}/nss-softokn-config
294
295# co-owned with nss
296%dir %{_includedir}/nss3
297#
298# The following headers are those exported public in
299# mozilla/security/nss/lib/freebl/manifest.mn and
300# mozilla/security/nss/lib/softoken/manifest.mn
301#
302# The following list is short because many headers, such as
303# the pkcs #11 ones, have been provided by nss-util-devel
304# which installed them before us.
305#
306%{_includedir}/nss3/blapit.h
307%{_includedir}/nss3/ecl-exp.h
308%{_includedir}/nss3/hasht.h
309%{_includedir}/nss3/sechash.h
310%{_includedir}/nss3/nsslowhash.h
311%{_includedir}/nss3/secmodt.h
312%{_includedir}/nss3/shsign.h
313
314%changelog
315* Wed Sep 29 2010 jkeating - 3.12.8-2
316- Rebuilt for gcc bug 634757
317
318* Thu Sep 23 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.8-1
319- Update to 3.12.8
320- Adhere to static library packaging guidelines (#609613)
321- Fix nss-util-devel version dependency line
322- Shorten freebl and freebl subpackages descriptions
323
324* Sat Sep 18 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.99.4-1
325- NSS 3.12.8 RC0
326
327* Sat Sep 12 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7.99.3-2
328- Update the required version of nss-util to 3.12.7.99.3
329
330* Sat Sep 04 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7.99.3-1
331- NSS 3.12.8 Beta 3
332
333* Mon Aug 30 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7-3
334- Update BuildRequires on nspr-devel and nss-util-devel
335
336* Sat Aug 29 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7-2
337- Define NSS_USE_SYSTEM_SQLITE and remove nss-nolocalsql patch
338- Fix rpmlint warnings about macros in comments and changelog
339
340* Mon Aug 16 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7-1
341- Update to 3.12.7
342- Fix build files to ensure nsslowhash.h is included in public headers
343
344* Tue Jun 08 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.6-3
345- Retagging
346
347* Mon Jun 07 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.6-2
348- Bump NVR to be greater than those for nss-softokn subpackages in F11 (rhbz#601407)
349
350* Sun Jun 06 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-23
351- Bump release number
352
353* Fri Jun 04 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-22
354- Cleanup changelog comments to avoid unwanted macro expansions
355
356* Wed Jun 02 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-21
357- Retagging
358
359* Wed Jun 02 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-20
360- Add %%{?_isa} to the requires in the devel packages (#596840)
361- Fix typo in the package description (#598295)
362- Update nspr version to 4.8.4
363
364* Sat May 08 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-19
365- Consider the system as not fips enabled when /proc/sys/crypto/fips_enabled isn't present (rhbz#590199)
366
367* Sat May 08 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-18
368- Fix Conflicts line to prevent update when prelink is not yet the right version (rhbz#590199)
369
370* Mon Apr 19 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-17
371- Updated prelink patch rhbz#504949
372
373* Wed Apr 15 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-16
374- allow prelink of softoken and freebl. Change the verify code to use
375 prelink -u if prelink is installed. Fix by Robert Relyea rhbz#504949
376
377* Mon Jan 18 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-15
378- Move libfreebl3.so and its .chk file to /lib{64} (rhbz#561544)
379
380* Mon Jan 18 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.4-13
381- Fix in nss-softokn-spec.in
382- Require nss-util >= 3.12.4
383
384* Thu Dec 03 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-12
385- Require nss-util 3.12.5
386
387* Fri Nov 20 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-11
388- export freebl devel tools (#538226)
389
390* Tue Sep 23 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-10
391- Fix paths in nss-softokn-prelink so signed libraries don't get touched, rhbz#524794
392
393* Thu Sep 17 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-9
394- Add nssdbm3.so to nss-softokn-prelink.conf, rhbz#524077
395
396* Thu Sep 10 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-8
397- Retagging for a chained build
398
399* Thu Sep 10 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-6
400- Don't list libraries in nss-softokn-config, dynamic linking required
401
402* Tue Sep 08 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-5
403- Installing shared libraries to %%{_libdir}
404
405* Sun Sep 06 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-4
406- Postuninstall scriptlet finishes quietly
407
408* Sat Sep 05 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-3
409- Remove symblic links to shared libraries from devel, rhbz#521155
410- Apply the nss-nolocalsql patch
411- No rpath-link in nss-softokn-config
412
413* Fri Sep 04 2009 serstring=Elio Maldonado<emaldona@redhat.cpm> - 3.12.4-2
414- Retagging to pick up the correct .cvsignore
415
416* Tue Sep 01 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-1
417- Update to 3.12.4
418- Fix logic on postun
419- Don't require sqlite
420
421* Mon Aug 31 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-24
422- Fixed test on %postun to avoid returning 1 when nss-softokn instances still remain
423
424* Sun Aug 30 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-23
425- Explicitly state via nss_util_version the nss-util version we require
426
427* Fri Aug 28 2009 Warren Togami <wtogami@redhat.com> - 3.12.3.99.3-22
428- caolan's nss-softokn.pc patch
429
430* Thu Aug 27 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-21
431- Bump the release number for a chained build of nss-util, nss-softokn and nss
432
433* Thu Aug 27 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-20
434- List freebl, nssdbm and softokn libraries in nss-softokn-config and nss-softokn.pc
435
436* Thu Aug 27 2009 Elio Maldonado@<emaldona@redhat.com> - 3.12.3.99.3-19
437- Determine NSSUTIL_INCLUDE_DIR and NSSUTIL_LIB_DIR with a pkg-config query on nss-util
438- Remove the release 17 hack
439
440* Wed Aug 27 2009 Elio maldonado<emaldona@redhat.com> - 3.12.3.99.3-18
441- fix spurious executable permissions on nss-softokn.pc
442
443* Thu Aug 27 2009 Adel Gadllah <adel.gadllah@gmail.com> - 3.12.3.99.3-17
444- Add hack to fix build
445
446* Tue Aug 25 2009 Dennis Gilmore <dennis@ausil.us> - 3.12.3.99.3-16
447- only have a single Requires: line in the .pc file
448
449* Tue Aug 25 2009 Dennis Gilmore <dennis@ausil.us> - 3.12.3.99.3-12
450- bump to unique rpm nvr
451
452* Tue Aug 25 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-10
453- Build after nss with subpackages and new nss-util
454
455* Thu Aug 20 2009 Dennis Gilmore <dennis@ausil.us> 3.12.3.99.3-9
456- revert to shipping bits
457
458* Thu Aug 19 2009 Elio Maldonado <emaldona@redhat.com> 3.12.3.99.3-8.1
459- Disable installing until conflicts are relsoved
460
461* Thu Aug 19 2009 Elio Maldonado <emaldona@redhat.com> 3.12.3.99.3-8
462- Initial build