Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37536645
en ru br
Репозитории ALT
S:3.93.0-alt1
5.1: 3.12.9.0-alt1.M50P.1
4.1: 3.12.1-alt0.20080628.M41.2
4.0: 3.11.4-alt1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: nss

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Summary:        Netscape Network Security Services(NSS)
Name:           nss
Version:        3.12.9.0
Release:       alt1.M50P.1
License:        MPL/GPL/LGPL
Group:          System/Libraries
Url: http://www.mozilla.org/projects/security/pki/nss
Packager: Alexey Gladkov <legion at altlinux.ru>

Source0: nss-%version.tar
Source1: nss.pc.in
Source2: nss-config.in
Source3: nss-alt-ssl-addon-certs.txt
Source4: nss-db-%version.tar
Source5: setup-nsssysinit.sh
Source6: system-pkcs11.txt
Source7: nss-pem-%version.tar

Patch0: nss_with_system_nspr.patch
Patch2: nss-no-rpath.patch
Patch3: nss-use-sqlite.patch
Patch4: nss-use-mozsqlite.patch
Patch5: nss-fix-objdir.patch

# Fedora patches

Patch6: nss-enable-pem.patch
Patch11: nss-sysinit-fix-trustorder.patch
Patch12: nss-sysinit-userdb-first.patch
Patch13: allow-content-types-beyond-smime.patch
Patch14: dont-use-cpp-reserved-words.patch
Patch15: nsspem-642433.patch
Patch16: nss-recurse.patch

# Automatically added by buildreq on Wed Feb 13 2008 (-bi)

BuildRequires: chrpath zlib-devel libsqlite3-devel
BuildRequires: libnspr-devel >= 4.8.7-alt1.M50P.1
Requires: libnspr       >= 4.8.7-alt1.M50P.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.  See:
http://www.mozilla.org/projects/security/pki/nss/overview.html

%package -n lib%name
Summary:        Netscape Network Security Services(NSS)
Group:          System/Libraries

Provides: %name = %version-%release

%description -n lib%name
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.  See:
http://www.mozilla.org/projects/security/pki/nss/overview.html

%package -n lib%name-sysinit
Summary: System NSS Initilization
Group: System/Libraries
Requires: lib%name = %version-%release

Provides: %name-sysinit
Provides: %name-system-init

%description -n lib%name-sysinit
Default Operating System module that manages applications loading
NSS globally on the system. This module loads the system defined
PKCS #11 modules for NSS and chains with other NSS modules to load
any system or user configured modules.


%package -n lib%name-devel
Summary: NSS development kit
Group: Development/C
Requires: lib%name = %version-%release

Provides: %name-devel        = %version-%release
Provides: %name-pkcs11-devel = %version-%release

%description -n lib%name-devel
NSS development kit

%package -n lib%name-devel-static
Summary: NSS static libraries
Group: Development/C
Requires: lib%name-devel = %version-%release

Provides: %name-devel-static = %version-%release

%description -n lib%name-devel-static
NSS development kit (static libs)

%package -n %name-utils
Summary: Netscape Network Security Services Utilities
Group: Development/Other
Requires: lib%name = %version-%release

Provides: %name-tools

%description -n %name-utils
Netscape Network Security Services Utilities

%prep
%setup -q
%setup -q -T -D -a7
#patch0 -p0 -b .fix0
%patch2 -p0 -b .fix2
#patch3 -p0 -b .fix3
#patch4 -p0 -b .fix4
%patch5 -p0 -b .fix5

%patch6 -p1 -b .libpem
%patch11 -p1 -b .643134
%patch12 -p0 -b .603313
%patch13 -p1 -b .contenttypes
%patch14 -p1 -b .676036
%patch15 -p1 -b .642433
%patch16 -p1 -b .recurse

%build
export BUILD_OPT=1
export NS_USE_GCC=1
export NSS_ENABLE_ECC=1
export NSS_USE_SYSTEM_SQLITE=1
export USE_SYSTEM_ZLIB=1
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
export NSPR_INCLUDE_DIR=/usr/include/nspr
export NSPR_LIB_DIR=%_libdir

# Generate symbolic info for debuggers

export XCFLAGS=$RPM_OPT_FLAGS

%ifarch x86_64
export USE_64=1
%endif

# additional CA certificates

cat %SOURCE3 >> mozilla/security/nss/lib/ckfw/builtins/certdata.txt

make -C mozilla/security/coreconf
make -C mozilla/security/coreconf platform 2>/dev/null |grep '^Linux' >destdir
make -C mozilla/security/dbm
make -C mozilla/security/nss/lib/ckfw/builtins generate
make -C mozilla/security/nss

%install
%__mkdir_p %buildroot{%_bindir,%_libdir/pkgconfig,%_includedir}

# Get some variables

DESTDIR="$(head -1 destdir)"
NSPR_VERSION="$(nspr-config --version)"
nss_h="mozilla/security/nss/lib/nss/nss.h"
NSS_VMAJOR="$(sed -ne 's,^#define[[:space:]]\+NSS_VMAJOR[[:space:]]\+,,p' "$nss_h")"
NSS_VMINOR="$(sed -ne 's,^#define[[:space:]]\+NSS_VMINOR[[:space:]]\+,,p' "$nss_h")"
NSS_VPATCH="$(sed -ne 's,^#define[[:space:]]\+NSS_VPATCH[[:space:]]\+,,p' "$nss_h")"

# Install NSS libraries

cd mozilla/dist
cp -aL "$DESTDIR"/bin/* %buildroot%_bindir
cp -aL "$DESTDIR"/lib/* %buildroot%_libdir

# Install NSS headers

cd public
cp -aL nss %buildroot%_includedir

# Install NSS utils

sed -e "s, at libdir at ,%_libdir,g" \
   -e "s, at prefix at ,%_prefix,g" \
   -e "s, at exec_prefix at ,%_prefix,g" \
   -e "s, at includedir at ,%_includedir/nss,g" \
   -e "s, at NSPR_VERSION at ,$NSPR_VERSION,g" \
   -e "s, at NSS_VERSION at ,%version,g" \
%SOURCE1 > %buildroot/%_libdir/pkgconfig/nss.pc

sed -e "s, at libdir at ,%_libdir,g" \
   -e "s, at prefix at ,%_prefix,g" \
   -e "s, at exec_prefix at ,%_prefix,g" \
   -e "s, at includedir at ,%_includedir/nss,g" \
   -e "s, at MOD_MAJOR_VERSION at ,$NSS_VMAJOR,g" \
   -e "s, at MOD_MINOR_VERSION at ,$NSS_VMINOR,g" \
   -e "s, at MOD_PATCH_VERSION at ,$NSS_VPATCH,g" \
   %SOURCE2 > %buildroot/%_bindir/nss-config

chmod 755 %buildroot/%_bindir/nss-config

# Add real RPATH

find "%buildroot%_bindir" "%buildroot%_libdir" -type f |
while read f; do
 %__file "$f" | grep -qs ELF || continue
 if chrpath -l "$f" | fgrep -qs "RPATH="; then
   chrpath -d "$f"
 fi
done

# https://wiki.mozilla.org/NSS_Shared_DB

# https://wiki.mozilla.org/NSS_Shared_DB_Samples
# https://wiki.mozilla.org/NSS_Shared_DB_Howto
# https://wiki.mozilla.org/NSS_Shared_DB_And_LINUX
mkdir -p -- %buildroot/%_sysconfdir/pki/nssdb
tar -x -C %buildroot/%_sysconfdir/pki/nssdb -f %SOURCE4
find %buildroot/%_sysconfdir/pki/nssdb -name 'blank-*.db' -printf '%%h %%f\n' |
while read p n; do
mv -f -- "$p/$n" "$p/${n##blank-}"
done

install -p -m755 %SOURCE5 %buildroot/%_bindir/setup-nsssysinit.sh
install -p -m644 %SOURCE6 %buildroot/%_sysconfdir/pki/nssdb/pkcs11.txt

%files -n %name-utils
%_bindir/*
%exclude %_bindir/setup-nsssysinit.sh
# Remove tests and samples
%exclude %_bindir/%name-config
%exclude %_bindir/bltest
%exclude %_bindir/dbtest
%exclude %_bindir/mangle
%exclude %_bindir/ocspclnt
%exclude %_bindir/oidcalc
%exclude %_bindir/sdrtest
%exclude %_bindir/shlibsign
%exclude %_bindir/tstclnt
%exclude %_bindir/vfyserv

%files -n lib%name
%_libdir/*.so*
%_libdir/*.chk
%dir %_sysconfdir/pki
%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
%exclude %_libdir/libnsssysinit.so

%files -n lib%name-sysinit
%_libdir/libnsssysinit.so
%config(noreplace) %_sysconfdir/pki/nssdb/cert9.db
%config(noreplace) %_sysconfdir/pki/nssdb/key4.db
%config(noreplace) %_sysconfdir/pki/nssdb/pkcs11.txt
%_bindir/setup-nsssysinit.sh

%files -n lib%name-devel
%_bindir/%name-config
%dir %_includedir/%name
%_includedir/%name
%_libdir/pkgconfig/*

%files -n lib%name-devel-static
%_libdir/*.a

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin