6a6023ab57
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/mozilla-nss?expand=0&rev=012f77fb1152b888f0b9f8e5e9da47e4
318 lines
9.3 KiB
RPMSpec
318 lines
9.3 KiB
RPMSpec
#
|
|
# spec file for package mozilla-nss (Version 3.12.4)
|
|
#
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2006-2009 Wolfgang Rosenauer
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: mozilla-nss
|
|
BuildRequires: gcc-c++ mozilla-nspr-devel zlib-devel
|
|
%if %suse_version == 1030
|
|
BuildRequires: sqlite-devel
|
|
%endif
|
|
%if %suse_version > 1030
|
|
BuildRequires: sqlite3-devel
|
|
%endif
|
|
License: GPLv2+ ; LGPLv2.1+ ; MPL
|
|
Version: 3.12.4
|
|
Release: 4
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: mozilla-nss-64bit
|
|
%endif
|
|
#
|
|
Summary: Network (Netscape) Security Services
|
|
Url: http://www.mozilla.org/projects/security/pki/nss/
|
|
Group: System/Libraries
|
|
# cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r <RTM_TAG> NSS
|
|
Source: nss-%{version}.tar.bz2
|
|
Source1: nss.pc.in
|
|
Source2: addon-certs.txt
|
|
Source3: nss-config.in
|
|
Source4: %{name}-rpmlintrc
|
|
Source5: baselibs.conf
|
|
Patch1: nss-opt.patch
|
|
Patch2: nss-sqlitename.patch
|
|
Patch3: system-nspr.patch
|
|
Patch4: char.patch
|
|
Patch5: nss-no-rpath.patch
|
|
Patch6: nss-ckbi-1_77.patch.bz2
|
|
Patch9: malloc.patch
|
|
%define nspr_ver %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
|
|
PreReq: mozilla-nspr >= %nspr_ver
|
|
PreReq: libfreebl3 >= %{version}
|
|
Requires: mozilla-nss-certs
|
|
Requires(post): coreutils
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%define nssdbdir %{_sysconfdir}/pki/nssdb
|
|
%define run_testsuite 1
|
|
|
|
%description
|
|
Network Security Services (NSS) is a set of libraries designed to
|
|
support cross-platform development of security-enabled server
|
|
applications. Applications built with NSS can support SSL v2 and v3,
|
|
TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3
|
|
certificates, and other security standards.
|
|
|
|
|
|
%package devel
|
|
License: GPLv2+ ; LGPLv2.1+ ; MPL
|
|
Summary: Network (Netscape) Security Services development files
|
|
Group: Development/Libraries/Other
|
|
Requires: mozilla-nspr-devel
|
|
Requires: mozilla-nss = %{version}-%{release}
|
|
Requires: libfreebl3 = %{version}-%{release}
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: mozilla-nss-devel-64bit
|
|
%endif
|
|
|
|
%description devel
|
|
Network Security Services (NSS) is a set of libraries designed to
|
|
support cross-platform development of security-enabled server
|
|
applications. Applications built with NSS can support SSL v2 and v3,
|
|
TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3
|
|
certificates, and other security standards.
|
|
|
|
|
|
%package tools
|
|
License: GPLv2+ ; LGPLv2.1+ ; MPL
|
|
Summary: Tools for developing, debugging, and managing applications that use NSS
|
|
Group: System/Management
|
|
PreReq: mozilla-nss >= %{version}
|
|
|
|
%description tools
|
|
The NSS Security Tools allow developers to test, debug, and manage
|
|
applications that use NSS.
|
|
|
|
|
|
%package -n libfreebl3
|
|
License: GPLv2+ ; LGPLv2.1+ ; MPL
|
|
Summary: Freebl library for the Network Security Services
|
|
Group: System/Libraries
|
|
|
|
%description -n libfreebl3
|
|
Network Security Services (NSS) is a set of libraries designed to
|
|
support cross-platform development of security-enabled server
|
|
applications. Applications built with NSS can support SSL v2 and v3,
|
|
TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3
|
|
certificates, and other security standards.
|
|
|
|
This package installs the freebl library from NSS.
|
|
|
|
|
|
%package certs
|
|
License: GPLv2+ ; LGPLv2.1+ ; MPL
|
|
Summary: CA certificates for NSS
|
|
Group: Productivity/Networking/Security
|
|
|
|
%description certs
|
|
This package contains the integrated CA root certificates from the
|
|
Mozilla project.
|
|
|
|
|
|
%prep
|
|
%setup -n nss-%{version} -q
|
|
cd mozilla
|
|
%patch1
|
|
%patch2
|
|
%patch3
|
|
%patch4
|
|
%patch5
|
|
%patch6 -p1
|
|
%if %suse_version > 1110
|
|
%patch9
|
|
%endif
|
|
# additional CA certificates
|
|
#cd security/nss/lib/ckfw/builtins
|
|
#cat %{SOURCE2} >> certdata.txt
|
|
#make generate
|
|
|
|
%build
|
|
export FREEBL_NO_DEPEND=1
|
|
cd mozilla/security/nss
|
|
export NSPR_INCLUDE_DIR=`nspr-config --includedir`
|
|
export NSPR_LIB_DIR=`nspr-config --libdir`
|
|
export OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
|
export LIBDIR=%{_libdir}
|
|
%ifarch x86_64 s390x ppc64 ia64
|
|
export USE_64=1
|
|
%endif
|
|
%if %suse_version > 1020
|
|
export NSS_USE_SYSTEM_SQLITE=1
|
|
%endif
|
|
MAKE_FLAGS="BUILD_OPT=1 NSS_ENABLE_ECC=1"
|
|
make nss_build_all $MAKE_FLAGS
|
|
# run testsuite
|
|
%if %run_testsuite
|
|
export BUILD_OPT=1
|
|
export HOST="localhost"
|
|
export DOMSUF=" "
|
|
export USE_IP=TRUE
|
|
export IP_ADDRESS="127.0.0.1"
|
|
cd tests
|
|
./all.sh
|
|
if grep "FAILED" ../../../tests_results/security/localhost.1/output.log ; then
|
|
echo "Testsuite FAILED"
|
|
exit 1
|
|
fi
|
|
%endif
|
|
|
|
%install
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/nss
|
|
mkdir -p $RPM_BUILD_ROOT%{_includedir}/nss3
|
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
|
pushd mozilla/dist/Linux*
|
|
# copy headers
|
|
cp -rL ../public/nss/*.h $RPM_BUILD_ROOT%{_includedir}/nss3
|
|
# copy dynamic libs
|
|
cp -L lib/libnss3.so \
|
|
lib/libnssdbm3.so \
|
|
lib/libnssdbm3.chk \
|
|
lib/libnssutil3.so \
|
|
lib/libnssckbi.so \
|
|
lib/libsmime3.so \
|
|
lib/libsoftokn3.so \
|
|
lib/libsoftokn3.chk \
|
|
lib/libssl3.so \
|
|
$RPM_BUILD_ROOT%{_libdir}
|
|
cp -L lib/libfreebl3.so \
|
|
lib/libfreebl3.chk \
|
|
$RPM_BUILD_ROOT/%{_lib}
|
|
%if %suse_version < 1030
|
|
cp -L lib/libnsssqlite3.so \
|
|
$RPM_BUILD_ROOT%{_libdir}
|
|
%endif
|
|
# copy static libs
|
|
cp -L lib/libcrmf.a \
|
|
lib/libnssb.a \
|
|
lib/libnssckfw.a \
|
|
$RPM_BUILD_ROOT%{_libdir}
|
|
# copy tools
|
|
cp -L bin/certutil \
|
|
bin/cmsutil \
|
|
bin/crlutil \
|
|
bin/modutil \
|
|
bin/pk12util \
|
|
bin/signtool \
|
|
bin/signver \
|
|
bin/ssltap \
|
|
$RPM_BUILD_ROOT%{_bindir}
|
|
# copy unsupported tools
|
|
cp -L bin/atob \
|
|
bin/btoa \
|
|
bin/derdump \
|
|
bin/ocspclnt \
|
|
bin/pp \
|
|
bin/selfserv \
|
|
bin/shlibsign \
|
|
bin/strsclnt \
|
|
bin/symkeyutil \
|
|
bin/tstclnt \
|
|
bin/vfyserv \
|
|
bin/vfychain \
|
|
$RPM_BUILD_ROOT%{_libexecdir}/nss
|
|
# prepare pkgconfig file
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig/
|
|
sed "s:%%LIBDIR%%:%{_libdir}:g
|
|
s:%%VERSION%%:%{version}:g
|
|
s:%%NSPR_VERSION%%:%{nspr_ver}:g" \
|
|
%{SOURCE1} > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/nss.pc
|
|
# prepare nss-config file
|
|
popd
|
|
NSS_VMAJOR=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}'`
|
|
NSS_VMINOR=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}'`
|
|
NSS_VPATCH=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}'`
|
|
cat %{SOURCE3} | sed -e "s,@libdir@,%{_libdir},g" \
|
|
-e "s,@prefix@,%{_prefix},g" \
|
|
-e "s,@exec_prefix@,%{_prefix},g" \
|
|
-e "s,@includedir@,%{_includedir}/nss3,g" \
|
|
-e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \
|
|
-e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \
|
|
-e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \
|
|
> $RPM_BUILD_ROOT/%{_bindir}/nss-config
|
|
chmod 755 $RPM_BUILD_ROOT/%{_bindir}/nss-config
|
|
# create shlib sigs after extracting debuginfo
|
|
%define __spec_install_post \
|
|
%{?__debug_package:%{__debug_install_post}} \
|
|
%{__arch_install_post} \
|
|
%{__os_install_post} \
|
|
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_lib}:$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libexecdir}/nss/shlibsign -i $RPM_BUILD_ROOT%{_libdir}/libsoftokn3.so \
|
|
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_lib}:$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libexecdir}/nss/shlibsign -i $RPM_BUILD_ROOT%{_libdir}/libnssdbm3.so \
|
|
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_lib}:$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libexecdir}/nss/shlibsign -i $RPM_BUILD_ROOT/%{_lib}/libfreebl3.so \
|
|
%{nil}
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%post -n libfreebl3 -p /sbin/ldconfig
|
|
|
|
%postun -n libfreebl3 -p /sbin/ldconfig
|
|
|
|
%post tools
|
|
if [ ! -d "%{nssdbdir}" ] ; then
|
|
mkdir -p "%{nssdbdir}"
|
|
fi
|
|
if [ ! -f "%{nssdbdir}/pkcs11.txt" ] ; then
|
|
modutil -force -dbdir "sql:%{nssdbdir}" -create
|
|
chmod 644 "%{nssdbdir}"/*
|
|
fi
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libnss3.so
|
|
%{_libdir}/libnssdbm3.so
|
|
%{_libdir}/libnssutil3.so
|
|
%{_libdir}/libsmime3.so
|
|
%{_libdir}/libsoftokn3.so
|
|
%{_libdir}/libssl3.so
|
|
%if %suse_version < 1030
|
|
%{_libdir}/libnsssqlite3.so
|
|
%endif
|
|
%{_libdir}/libsoftokn3.chk
|
|
%{_libdir}/libnssdbm3.chk
|
|
|
|
%files devel
|
|
%defattr(644, root, root, 755)
|
|
%{_includedir}/nss3/
|
|
%{_libdir}/*.a
|
|
%{_libdir}/pkgconfig/*
|
|
%attr(755,root,root) %{_bindir}/nss-config
|
|
|
|
%files tools
|
|
%defattr(-, root, root)
|
|
%{_bindir}/*
|
|
%{_libexecdir}/nss/
|
|
%exclude %{_bindir}/nss-config
|
|
|
|
%files -n libfreebl3
|
|
%defattr(-, root, root)
|
|
/%{_lib}/libfreebl3.so
|
|
/%{_lib}/libfreebl3.chk
|
|
|
|
%files certs
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libnssckbi.so
|
|
|
|
%changelog
|