nss/nss.spec

470 lines
15 KiB
RPMSpec
Raw Permalink Normal View History

2016-11-15 23:28:09 +03:00
%bcond_without lib
%define url_ver %(echo %{version}| sed -e "s|\\.|_|g")
2012-02-01 15:03:05 +04:00
2016-11-15 23:28:09 +03:00
%define major 3
%define libname %mklibname %{name} %{major}
2013-08-13 21:17:09 +04:00
%define libfreebl %mklibname freebl %{major}
2016-11-15 23:28:09 +03:00
%define devname %mklibname -d %{name}
2016-08-08 12:33:40 +03:00
%define sdevname %mklibname -d -s %{name}
%define _disable_lto 1
2012-02-01 15:03:05 +04:00
# this seems fragile, so require the exact version or later (#58754)
%define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0)
%define nspr_version %(pkg-config --modversion nspr &>/dev/null && pkg-config --modversion nspr 2>/dev/null || echo 0)
2013-08-13 21:17:09 +04:00
%define build_empty 0
2017-01-25 17:38:36 +03:00
%{?_with_empty: %{expand: %%global build_empty 1}}
%{?_without_empty: %{expand: %%global build_empty 0}}
2013-08-13 21:17:09 +04:00
2019-06-12 09:51:41 +00:00
Summary: Network Security Services
2012-02-01 15:03:05 +04:00
Name: nss
2025-02-13 23:06:01 +00:00
Version: 3.59
2020-05-04 00:49:55 +00:00
Release: 1
2024-08-22 13:11:21 +00:00
#Epoch: 2
2012-02-01 15:03:05 +04:00
Group: System/Libraries
2013-08-13 19:42:02 +04:00
License: MPL or GPLv2+ or LGPLv2+
2016-08-08 12:33:40 +03:00
Url: http://www.mozilla.org/projects/security/pki/nss/index.html
Source0: http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_%{url_ver}_RTM/src/nss-%{version}.tar.gz
Source2: nss.pc.in
2017-01-25 18:16:17 +03:00
Source3: nss-config.in
2016-08-08 12:33:40 +03:00
Source4: blank-cert8.db
Source5: blank-key3.db
Source6: blank-secmod.db
Source7: certdata_empty.txt
2012-02-01 15:03:05 +04:00
# https://www.verisign.com/support/verisign-intermediate-ca/secure-site-intermediate/index.html
# converted from PEM to DER format with openssl command:
# openssl x509 -in cert.pem -inform PEM -outform DER -out cert.der
# this way we can avoid a buildrequires for openssl
2016-08-08 12:33:40 +03:00
Source8: verisign-class-3-secure-server-ca.der
2012-02-01 15:03:05 +04:00
# Brasilian government certificate
# verified in person with a government official
2020-01-09 00:17:11 +00:00
Source9: https://github.com/demoiselle/certificate/raw/master/impl/ca-icp-brasil/src/main/resources/trustedca/CertificadoACRaiz.crt
Source10: nss-softokn.pc.in
2012-02-01 15:03:05 +04:00
Patch0: nss-no-rpath.patch
2016-08-08 12:33:40 +03:00
Patch2: renegotiate-transitional.patch
# (tpg) be carefull with last nspr4-4.10 because prtypes.h was moved to include/nspr4/
Patch4: nss-3.15.1-correct-path-to-prtypes.h.patch
2013-08-13 21:17:09 +04:00
BuildRequires: rootcerts >= 1:20120218.00
2012-02-01 15:03:05 +04:00
BuildRequires: zip
2016-08-08 12:33:40 +03:00
BuildRequires: pkgconfig(nspr)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(zlib)
2012-02-01 15:03:05 +04:00
%description
Network Security Services (NSS) is a set of libraries designed to
support cross-platform development of security-enabled client and 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. For detailed information on standards supported, see
http://www.mozilla.org/projects/security/pki/nss/overview.html.
%if %without lib
Note: This package currently contains the NSS binaries only. The
libraries have been not been included due to conflicts with the Mozilla
libraries.
%endif
2016-11-15 23:28:09 +03:00
%files
%doc docs/*
%attr(0755,root,root) %{_bindir}/addbuiltin
%attr(0755,root,root) %{_bindir}/atob
%attr(0755,root,root) %{_bindir}/baddbdir
%attr(0755,root,root) %{_bindir}/bltest
%attr(0755,root,root) %{_bindir}/btoa
%attr(0755,root,root) %{_bindir}/certutil
%attr(0755,root,root) %{_bindir}/chktest
%attr(0755,root,root) %{_bindir}/cmsutil
%attr(0755,root,root) %{_bindir}/conflict
%attr(0755,root,root) %{_bindir}/crlutil
%attr(0755,root,root) %{_bindir}/crmftest
%attr(0755,root,root) %{_bindir}/dbtest
%attr(0755,root,root) %{_bindir}/derdump
%attr(0755,root,root) %{_bindir}/dertimetest
%attr(0755,root,root) %{_bindir}/digest
%attr(0755,root,root) %{_bindir}/ecperf
%attr(0755,root,root) %{_bindir}/encodeinttest
2017-01-25 18:58:35 +03:00
%attr(0755,root,root) %{_bindir}/fbectest
2016-11-15 23:28:09 +03:00
%attr(0755,root,root) %{_bindir}/fipstest
%attr(0755,root,root) %{_bindir}/httpserv
%attr(0755,root,root) %{_bindir}/listsuites
%attr(0755,root,root) %{_bindir}/lowhashtest
%attr(0755,root,root) %{_bindir}/makepqg
%attr(0755,root,root) %{_bindir}/mangle
%attr(0755,root,root) %{_bindir}/modutil
%attr(0755,root,root) %{_bindir}/multinit
%attr(0755,root,root) %{_bindir}/nonspr10
2018-10-29 17:54:09 +03:00
%attr(0755,root,root) %{_bindir}/nss-policy-check
2016-11-15 23:28:09 +03:00
%attr(0755,root,root) %{_bindir}/ocspclnt
%attr(0755,root,root) %{_bindir}/ocspresp
%attr(0755,root,root) %{_bindir}/oidcalc
%attr(0755,root,root) %{_bindir}/p7content
%attr(0755,root,root) %{_bindir}/p7env
%attr(0755,root,root) %{_bindir}/p7sign
%attr(0755,root,root) %{_bindir}/p7verify
2017-01-25 18:58:35 +03:00
%attr(0755,root,root) %{_bindir}/pk11ectest
2016-11-15 23:28:09 +03:00
%attr(0755,root,root) %{_bindir}/pk11gcmtest
2019-03-22 19:37:53 +03:00
%attr(0755,root,root) %{_bindir}/pk11importtest
2016-11-15 23:28:09 +03:00
%attr(0755,root,root) %{_bindir}/pk11mode
%attr(0755,root,root) %{_bindir}/pk12util
%attr(0755,root,root) %{_bindir}/pk1sign
%attr(0755,root,root) %{_bindir}/pkix-errcodes
%attr(0755,root,root) %{_bindir}/pp
%attr(0755,root,root) %{_bindir}/pwdecrypt
%attr(0755,root,root) %{_bindir}/remtest
%attr(0755,root,root) %{_bindir}/rsaperf
2018-01-21 01:00:47 +03:00
%attr(0755,root,root) %{_bindir}/rsapoptst
2016-11-15 23:28:09 +03:00
%attr(0755,root,root) %{_bindir}/sdrtest
%attr(0755,root,root) %{_bindir}/secmodtest
%attr(0755,root,root) %{_bindir}/selfserv
%attr(0755,root,root) %{_bindir}/signtool
%attr(0755,root,root) %{_bindir}/signver
%attr(0755,root,root) %{_bindir}/smime
%attr(0755,root,root) %{_bindir}/ssltap
%attr(0755,root,root) %{_bindir}/strsclnt
%attr(0755,root,root) %{_bindir}/symkeyutil
%attr(0755,root,root) %{_bindir}/tstclnt
%attr(0755,root,root) %{_bindir}/vfychain
%attr(0755,root,root) %{_bindir}/vfyserv
2017-01-25 17:38:36 +03:00
2016-11-15 23:28:09 +03:00
%dir %{_sysconfdir}/pki/nssdb
%config(noreplace) %{_sysconfdir}/pki/nssdb/cert8.db
%config(noreplace) %{_sysconfdir}/pki/nssdb/key3.db
%config(noreplace) %{_sysconfdir}/pki/nssdb/secmod.db
#-------------------------------------------------------------------------
2013-08-13 21:17:09 +04:00
%package shlibsign
2019-06-12 09:56:36 +00:00
Summary: Network Security Services - shlibsign
2013-08-13 21:17:09 +04:00
Group: System/Libraries
Conflicts: %{name} < 2:3.13.1-2
2012-02-01 17:15:04 +04:00
2013-08-13 21:17:09 +04:00
%description shlibsign
This package contains the binary shlibsign needed by libfreebl3
and libsoftokn3.
2012-02-01 17:15:04 +04:00
2016-11-15 23:28:09 +03:00
%files shlibsign
%attr(0755,root,root) %{_bindir}/shlibsign
#-------------------------------------------------------------------------
2012-02-01 15:03:05 +04:00
%if %with lib
%package -n %{libname}
Summary: Network Security Services (NSS)
Group: System/Libraries
%description -n %{libname}
2013-08-13 21:17:09 +04:00
This package contains the shared libraries libnss3, libnssckbi, libnssdbm3,
libnssutil3, libsmime3, and libssl3.
2016-11-15 23:28:09 +03:00
%files -n %{libname}
/%{_lib}/libnss%{major}.so
/%{_lib}/libnssckbi.so
%if %{build_empty}
/%{_lib}/libnssckbi_empty.so
%endif
/%{_lib}/libnssutil%{major}.so
/%{_lib}/libnssdbm%{major}.so
/%{_lib}/libsmime%{major}.so
/%{_lib}/libssl%{major}.so
#-------------------------------------------------------------------------
2013-08-13 21:17:09 +04:00
%package -n %{libfreebl}
Summary: Network Security Services (NSS)
Group: System/Libraries
Requires(post): nss-shlibsign
Requires(post): rpm-helper
2018-11-08 16:15:11 +08:00
Requires(post): coreutils
Requires(post): /bin/sh
2020-04-20 21:52:52 +03:00
Provides: nss-softokn%{?_isa} = %{EVRD}
2013-08-13 21:17:09 +04:00
Conflicts: %{_lib}nss3 < 2:3.13.1-5
%description -n %{libfreebl}
This package contains the shared libraries libfreebl3 and libsoftokn3.
2012-02-01 15:03:05 +04:00
2016-11-15 23:28:09 +03:00
%files -n %{libfreebl}
/%{_lib}/libfreebl%{major}.so
/%{_lib}/libfreeblpriv%{major}.so
/%{_lib}/libsoftokn%{major}.so
%defattr(0644,root,root,0755)
%ghost /%{_lib}/libfreebl%{major}.chk
%ghost /%{_lib}/libsoftokn%{major}.chk
2018-11-08 16:15:11 +08:00
%posttrans -n %{libfreebl}
%create_ghostfile /%{_lib}/libsoftokn%{major}.chk root root 644
%create_ghostfile /%{_lib}/libfreebl%{major}.chk root root 644
%{_bindir}/shlibsign -i /%{_lib}/libsoftokn%{major}.so >/dev/null 2>/dev/null
%{_bindir}/shlibsign -i /%{_lib}/libfreebl%{major}.so >/dev/null 2>/dev/null
2016-11-15 23:28:09 +03:00
#-------------------------------------------------------------------------
2016-08-08 12:33:40 +03:00
%package -n %{devname}
2012-02-01 15:03:05 +04:00
Summary: Network Security Services (NSS) - development files
Group: Development/C++
2016-11-15 23:28:09 +03:00
Requires: %{libname} >= %{EVRD}
Requires: %{libfreebl} >= %{EVRD}
Provides: nss-devel = %{EVRD}
# a BR of Java in RH/OEU
Provides: nss-softokn-freebl-devel = %{EVRD}
2013-08-13 21:17:09 +04:00
%rename %{libname}-devel
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
%description -n %{devname}
2012-02-01 15:03:05 +04:00
Header files to doing development with Network Security Services.
2016-11-15 23:28:09 +03:00
%files -n %{devname}
%attr(0755,root,root) %{_bindir}/nss-config
%_libdir/*.so
%dir %{_includedir}/nss
%{_includedir}/nss/*.h
%{_includedir}/nss/nssck.api
%{_libdir}/pkgconfig/nss.pc
%{_libdir}/pkgconfig/nss-softokn.pc
2016-11-15 23:28:09 +03:00
%{_libdir}/libsoftokn%{major}.chk
%{_libdir}/libfreebl%{major}.chk
#-------------------------------------------------------------------------
2016-08-08 12:33:40 +03:00
%package -n %{sdevname}
2012-02-01 15:03:05 +04:00
Summary: Network Security Services (NSS) - static libraries
Group: Development/C++
2016-11-15 23:28:09 +03:00
Requires: %{libname} >= %{EVRD}
Requires: %{devname} >= %{EVRD}
Provides: nss-static-devel = %{EVRD}
2012-02-01 15:03:05 +04:00
Conflicts: libopenssl-static-devel
2013-08-13 21:17:09 +04:00
%rename %{libname}-static-devel
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
%description -n %{sdevname}
2012-02-01 15:03:05 +04:00
Static libraries for doing development with Network Security Services.
2016-11-15 23:28:09 +03:00
%files -n %{sdevname}
%{_libdir}/libcrmf.a
%{_libdir}/libnss.a
%{_libdir}/libnssutil.a
%{_libdir}/libnssb.a
%{_libdir}/libnssckfw.a
%{_libdir}/libsmime.a
%{_libdir}/libssl.a
2012-02-01 15:03:05 +04:00
%endif
2016-11-15 23:28:09 +03:00
#-------------------------------------------------------------------------
2012-02-01 15:03:05 +04:00
%prep
2013-08-13 21:17:09 +04:00
%setup -q
2016-08-08 12:33:40 +03:00
#% apply_patches
%patch0 -p0
%patch2 -p0 -b .transitional
%patch4 -p1
2012-02-01 15:03:05 +04:00
find . -type d -perm 0700 -exec chmod 755 {} \;
find . -type f -perm 0555 -exec chmod 755 {} \;
find . -type f -perm 0444 -exec chmod 644 {} \;
2012-02-23 04:58:42 +04:00
find . -name '*.h' -executable -exec chmod -x {} \;
find . -name '*.c' -executable -exec chmod -x {} \;
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
# remove hardcoded gcc
sed -i 's!gcc!%{__cc}!g' nss/coreconf/Linux.mk
2012-02-01 15:03:05 +04:00
%build
2016-08-08 12:33:40 +03:00
%serverbuild
2020-01-13 16:30:31 +03:00
%setup_compile_flags
2016-08-08 12:33:40 +03:00
export CC=gcc
2012-02-01 15:03:05 +04:00
export BUILD_OPT=1
export OPTIMIZER="%{optflags}"
export XCFLAGS="%{optflags} -Wno-error"
2012-02-01 15:03:05 +04:00
export ARCHFLAG="$LDFLAGS"
export LIBDIR=%{_libdir}
export USE_SYSTEM_ZLIB=1
export ZLIB_LIBS="-lz"
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
2013-08-13 21:17:09 +04:00
export NSPR_INCLUDE_DIR=`%{_bindir}/pkg-config --cflags-only-I nspr | sed 's/-I//'`
export NSPR_LIB_DIR=`%{_bindir}/pkg-config --libs-only-L nspr | sed 's/-L//'`
2012-02-01 15:03:05 +04:00
export MOZILLA_CLIENT=1
export NS_USE_GCC=1
export NSS_USE_SYSTEM_SQLITE=1
export NSS_ENABLE_ECC=1
# external tests are causing build problems because they access ssl internal types
# TODO: Investigate as there may be a better solution
export NSS_DISABLE_GTESTS=1
2013-08-13 21:17:09 +04:00
%if %{build_empty}
# (oe) the "trust no one" scenario, it goes like:
2017-08-11 21:33:08 +03:00
# 1. mv /%%{_lib}/libnssckbi.so /%%{_lib}/libnssckbi.so.BAK
# 2. mv /%%{_lib}/libnssckbi_empty.so /%%{_lib}/libnssckbi.so
2013-08-13 21:17:09 +04:00
# 3. restart ff/tb
# it has to be done manually for now, but at least we have a way for
# users to quickly mitigate future problems, or whatever :-)
2016-08-08 12:33:40 +03:00
pushd nss/lib/ckfw/builtins
perl ./certdata.perl < %{SOURCE7}
2013-08-13 21:17:09 +04:00
popd
%endif
2016-08-08 12:33:40 +03:00
export NATIVE_CC="/usr/bin/gcc"
export TARGETCC="%{__cc}"
export TARGETCCC="%{__cxx}"
export TARGETRANLIB="%{__ranlib}"
%ifarch x86_64 ppc64 ia64 s390x aarch64
export USE_64=1
%else
unset USE_64 || :
%endif
2020-01-13 16:30:31 +03:00
%make -j1 -C ./nss/coreconf
%make -j1 -C ./nss/lib/dbm
%make -j1 -C ./nss
2012-02-01 15:03:05 +04:00
2013-08-13 21:17:09 +04:00
%if %{build_empty}
# tuck away the empty libnssckbi.so library
2016-08-08 12:33:40 +03:00
cp -p nss/lib/ckfw/builtins/Linux*/libnssckbi.so libnssckbi_empty.so
2013-08-13 21:17:09 +04:00
%endif
2012-02-01 15:03:05 +04:00
# install new Verisign intermediate certificate
# http://qa.mandriva.com/show_bug.cgi?id=29612
# use built addbuildin command to avoid having
# a buildrequires for nss
ADDBUILTIN=`%{_bindir}/find . -type f -name addbuiltin`
if [ -z "$ADDBUILTIN" ]; then
2017-08-11 21:33:08 +03:00
exit 1
2012-02-01 15:03:05 +04:00
fi
ADDBUILTIN="$PWD/$ADDBUILTIN"
OLD="$LD_LIBRARY_PATH"
2016-08-08 12:33:40 +03:00
libpath=`%{_bindir}/find ./dist/ -name "Linux*.*" -type d`
2012-02-01 15:03:05 +04:00
# to use the built libraries instead of requiring nss
# again as buildrequires
export LD_LIBRARY_PATH="$PWD/$libpath/lib"
2013-08-13 21:49:58 +04:00
pushd nss/lib/ckfw/builtins
2013-08-13 21:17:09 +04:00
# (oe) for reference:
# *ALL* of the root CA certs are hard coded into the libnssckbi.so library.
# So, for Mandriva we can add/remove certs easily in the rootcerts package. Please
# checkout and examine the rootcerts package.
# Once this has been done and the new rootcerts package has been installed this
# package (nss) has to be rebuilt to pickup the changes made. The "recreate
# certificates" lines below generates a new certdata.c source containing the root
# CA certs for mozilla.
# *ALL* of the mozilla based softwares that support SSL has to link against
# the NSS library.
2012-02-01 15:03:05 +04:00
# recreate certificates
2017-01-25 17:38:36 +03:00
perl ./certdata.perl /etc/pki/tls/mozilla/certdata.txt
2012-02-01 15:03:05 +04:00
2020-01-13 16:30:31 +03:00
%make clean
%make -j1
2012-02-01 15:03:05 +04:00
popd
export LD_LIBRARY_PATH="$OLD"
%install
2013-08-13 21:49:58 +04:00
pushd dist/$(uname -s)*
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
mkdir -p %{buildroot}%{_bindir}
cp -aL bin/* %{buildroot}%{_bindir}
2012-02-01 15:03:05 +04:00
%if %with lib
2016-08-08 12:33:40 +03:00
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}/%{_lib}
mkdir -p %{buildroot}%{_includedir}/nss
cp -aL ../public/nss/* %{buildroot}%{_includedir}/nss
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
cp -aL lib/libcrmf.a \
2017-08-11 21:33:08 +03:00
lib/libnss.a \
lib/libnssb.a \
lib/libnssckbi.so \
lib/libnssckfw.a \
lib/libnssutil.a \
lib/libsmime.a \
lib/libssl.a \
%{buildroot}%{_libdir}
2012-02-01 15:03:05 +04:00
# Copy the binary libraries we want
2016-08-08 12:33:40 +03:00
for file in libsoftokn3.so libfreebl3.so libfreeblpriv3.so libnss3.so libnssutil3.so \
2017-08-11 21:33:08 +03:00
libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so
2012-02-01 15:03:05 +04:00
do
2017-08-11 21:33:08 +03:00
install -m 755 lib/$file %{buildroot}/%{_lib}
ln -sf ../../%{_lib}/$file %{buildroot}%{_libdir}/$file
2012-02-01 15:03:05 +04:00
done
# These ghost files will be generated in the post step
# Make sure chk files can be found in both places
for file in libsoftokn3.chk libfreebl3.chk
do
2017-08-11 21:33:08 +03:00
touch %{buildroot}/%{_lib}/$file
ln -s ../../%{_lib}/$file %{buildroot}%{_libdir}/$file
2012-02-01 15:03:05 +04:00
done
2016-08-08 12:33:40 +03:00
mkdir -p %{buildroot}%{_libdir}/pkgconfig
cat %{SOURCE2} | sed -e "s,%%libdir%%,%{_libdir},g" \
2017-08-11 21:33:08 +03:00
-e "s,%%prefix%%,%{_prefix},g" \
-e "s,%%exec_prefix%%,%{_prefix},g" \
-e "s,%%includedir%%,%{_includedir}/nss,g" \
-e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
-e "s,%%NSS_VERSION%%,%{version},g" > \
%{buildroot}%{_libdir}/pkgconfig/nss.pc
cat %{SOURCE10} | 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,%%NSPR_VERSION%%,%{nspr_version},g" \
-e "s,%%SOFTOKEN_VERSION%%,%{version},g" > \
%{buildroot}%{_libdir}/pkgconfig/nss-softokn.pc
2012-02-01 15:03:05 +04:00
%endif
popd
%if %with lib
2013-08-13 21:49:58 +04:00
export NSS_VMAJOR=`%{__cat} nss/lib/nss/nss.h | %{__grep} "#define.*NSS_VMAJOR" | %{__awk} '{print $3}'`
export NSS_VMINOR=`%{__cat} nss/lib/nss/nss.h | %{__grep} "#define.*NSS_VMINOR" | %{__awk} '{print $3}'`
export NSS_VPATCH=`echo %{version} | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
mkdir -p %{buildroot}%{_bindir}
cat %{SOURCE3} | sed -e "s,@libdir@,%{_libdir},g" \
2017-08-11 21:33:08 +03:00
-e "s,@prefix@,%{_prefix},g" \
-e "s,@exec_prefix@,%{_prefix},g" \
-e "s,@includedir@,%{_includedir}/nss%{major},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" \
> %{buildroot}/%{_bindir}/nss-config
2012-02-01 15:03:05 +04:00
%endif
2013-08-13 21:49:58 +04:00
pushd nss/cmd/smimetools
2016-08-08 12:33:40 +03:00
install -m 0755 smime %{buildroot}%{_bindir}
perl -pi -e 's|/usr/local/bin|%{_bindir}|g' %{buildroot}%{_bindir}/smime
2012-02-01 15:03:05 +04:00
popd
# add docs
2016-08-08 12:33:40 +03:00
mkdir -p docs/SSLsample
#cp -a mozilla/security/nss/cmd/SSLsample/README docs/SSLsample/
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
mkdir -p docs/bltest
2013-08-13 21:49:58 +04:00
cp -a nss/cmd/bltest/tests/* docs/bltest/
2013-08-13 21:17:09 +04:00
chmod -R a+r docs
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
mkdir -p docs/modutil
cp -a nss/cmd/modutil/*.html docs/modutil/
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
mkdir -p docs/signtool
cp -a nss/cmd/signtool/README docs/signtool/
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
mkdir -p docs/signver
cp -a nss/cmd/signver/examples/1/*.pl docs/signver/
cp -a nss/cmd/signver/examples/1/*.html docs/signver/
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
mkdir -p docs/ssltap
cp -a nss/cmd/ssltap/*.html docs/ssltap/
2012-02-01 15:03:05 +04:00
# Install the empty NSS db files
2016-08-08 12:33:40 +03:00
mkdir -p %{buildroot}%{_sysconfdir}/pki/nssdb
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pki/nssdb/cert8.db
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/pki/nssdb/key3.db
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/pki/nssdb/secmod.db
2012-02-01 15:03:05 +04:00
2016-08-08 12:33:40 +03:00
%{_bindir}/find docs -type f | %{_bindir}/xargs -t perl -pi -e 's/\r$//g'
2012-02-01 15:03:05 +04:00
2013-08-13 21:17:09 +04:00
%if %{build_empty}
# install the empty libnssckbi.so library (use alternatives?)
install -m0755 libnssckbi_empty.so %{buildroot}/%{_lib}/libnssckbi_empty.so
%endif