Difference between revisions of "NSS"

From CBLFS
Jump to navigationJump to search
 
(55 intermediate revisions by 9 users not shown)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_3_RTM/src/nss-3.11.3.tar.gz
+
| http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_{{NSS-Version2}}_RTM/src/nss-{{NSS-Version}}.tar.gz
 +
|-
 +
!Download nss-config:
 +
| http://cross-lfs.org/~jciccone/{{NSS-Config-Name}}
 +
|-
 +
!Required Patch:
 +
| http://svn.cross-lfs.org/svn/repos/patches/nss/nss-{{NSS-Version}}-fixes-1.patch
 +
|-
 
|}
 
|}
  
 
----
 
----
  
'''''Look into why nss-config isn't shipped in the tarball.'''''
+
{{Package-Introduction|Network Security Services (NSS) is a set of libraries designed to support cross-platform development of security-enabled client and server applications.|http://www.mozilla.org/projects/security/pki/nss/}}
  
 
== Dependencies ==
 
== Dependencies ==
Line 13: Line 20:
 
=== Required ===
 
=== Required ===
 
* [[NSPR]]
 
* [[NSPR]]
 +
* [[SQLite3]]
  
 
== Non-Multilib ==
 
== Non-Multilib ==
 +
 +
{{Note|For Pure64 builds add <nowiki>'USE_64=1'</nowiki> to the make commands}}
  
 
Compile the package:
 
Compile the package:
  
  export WORKINGDIR=$PWD &&
+
  patch -Np0 -i ../nss-{{NSS-Version}}-fixes-1.patch &&
  echo 'INCLUDES += -I/usr/include/nspr' >> mozilla/security/coreconf/headers.mk &&
+
  sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk &&
  for dir in $PWD/mozilla/security/{coreconf,dbm,nss}; do
+
  for dir in mozilla/security/{coreconf,dbm,nss}; do
   cd $dir &&
+
   make -C $dir BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
  make BUILD_OPT=1
+
    NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) \
 +
    NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) \
 +
    FREEBL_NO_DEPEND=1 || break
 
  done
 
  done
  
 
Install the package
 
Install the package
  
  export NSS_LINUXDIR=$(basename `dir -d $WORKINGDIR/mozilla/dist/Linux*`) &&
+
  for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
cd $WORKINGDIR/mozilla/dist &&
+
  install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib
  install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib &&
+
done
  install -v -m644 $NSS_LINUXDIR/lib/{*.chk,*.a} /usr/lib &&
+
  for file in libcrmf.a libnssb.a libnssckfw.a; do
  install -v -d /usr/include/nss &&
+
  install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib
  install -v -m644 {public,private}/nss/* /usr/include/nss &&
+
  done
  unset NSS_LINUXDIR WORKINGDIR
+
for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
 +
  install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin
 +
done
 +
  install -m755 -d /usr/include/nss3
 +
  install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 &&
 +
  ln -sfv nss3 /usr/include/nss
  
 
Create the pkg-config file:
 
Create the pkg-config file:
Line 39: Line 56:
 
  cat > /usr/lib/pkgconfig/nss.pc << "EOF"
 
  cat > /usr/lib/pkgconfig/nss.pc << "EOF"
 
  prefix=/usr
 
  prefix=/usr
  exec_prefix=/usr
+
  exec_prefix=/usr/bin
 
  libdir=/usr/lib
 
  libdir=/usr/lib
  includedir=/usr/include/nss
+
  includedir=/usr/include/nss3
 
   
 
   
 
  Name: NSS
 
  Name: NSS
 
  Description: Network Security Services
 
  Description: Network Security Services
  Version: 3.11.3
+
  Version: {{NSS-Version}}
  Requires: nspr >= 4.6.3
+
  Requires: sqlite3 nspr >= {{NSPR-Version}}
  Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -Wl,-R${libdir}
+
  Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
 
  Cflags: -I${includedir}
 
  Cflags: -I${includedir}
 
  EOF
 
  EOF
 +
 +
chmod 644 /usr/lib/pkgconfig/nss.pc
 +
ln -sfv nss.pc /usr/lib/pkgconfig/mozilla-nss.pc
 +
 +
Create /usr/bin/nss-config:
 +
 +
install -v -m755 ../{{NSS-Config-Name}} /usr/bin/nss-config &&
 +
sed -i -e "s/@MOD_MAJOR_VERSION@/3/" \
 +
        -e "s/@MOD_MINOR_VERSION@/12/" \
 +
        -e "s/@MOD_PATCH_VERSION@/3/" \
 +
        -e "s/@prefix@/\/usr/" \
 +
        /usr/bin/nss-config
  
 
== Multilib ==
 
== Multilib ==
Line 57: Line 86:
 
Compile the package:
 
Compile the package:
  
  export WORKINGDIR=$PWD &&
+
  export PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" USE_ARCH=32 &&
  echo 'INCLUDES += -I/usr/include/nspr' >> mozilla/security/coreconf/headers.mk &&
+
patch -Np0 -i ../nss-{{NSS-Version}}-fixes-1.patch &&
  for dir in $PWD/mozilla/security/{coreconf,dbm,nss}; do
+
  sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk &&
   cd $dir &&
+
  for dir in mozilla/security/{coreconf,dbm,nss}; do
  make CC="gcc ${BUILD32}" BUILD_OPT=1
+
   make -C $dir BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 CC="gcc ${BUILD32}" \
 +
    NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) \
 +
    NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) \
 +
    FREEBL_NO_DEPEND=1 || break
 
  done
 
  done
 +
unset PKG_CONFIG_PATH USE_ARCH
  
 
Install the package
 
Install the package
  
  export NSS_LINUXDIR=$(basename `dir -d $WORKINGDIR/mozilla/dist/Linux*`) &&
+
  for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
cd $WORKINGDIR/mozilla/dist &&
+
  install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib
  install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib &&
+
done
  install -v -m644 $NSS_LINUXDIR/lib/{*.chk,*.a} /usr/lib &&
+
  for file in libcrmf.a libnssb.a libnssckfw.a; do
  install -v -d /usr/include/nss &&
+
  install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib
  install -v -m644 {public,private}/nss/* /usr/include/nss &&
+
  done
  unset NSS_LINUXDIR WORKINGDIR
+
for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
 +
  install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin
 +
done
 +
  install -m755 -d /usr/include/nss3
 +
  install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 &&
 +
  ln -sfv nss3 /usr/include/nss
  
 
Create the pkg-config file:
 
Create the pkg-config file:
Line 78: Line 116:
 
  cat > /usr/lib/pkgconfig/nss.pc << "EOF"
 
  cat > /usr/lib/pkgconfig/nss.pc << "EOF"
 
  prefix=/usr
 
  prefix=/usr
  exec_prefix=/usr
+
  exec_prefix=/usr/bin
 
  libdir=/usr/lib
 
  libdir=/usr/lib
  includedir=/usr/include/nss
+
  includedir=/usr/include/nss3
 
   
 
   
 
  Name: NSS
 
  Name: NSS
 
  Description: Network Security Services
 
  Description: Network Security Services
  Version: 3.11.3
+
  Version: {{NSS-Version}}
  Requires: nspr >= 4.6.3
+
  Requires: sqlite3 nspr >= {{NSPR-Version}}
  Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -Wl,-R${libdir}
+
  Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
 
  Cflags: -I${includedir}
 
  Cflags: -I${includedir}
 
  EOF
 
  EOF
 +
 +
chmod 644 /usr/lib/pkgconfig/nss.pc
 +
ln -sfv nss.pc /usr/lib/pkgconfig/mozilla-nss.pc
 +
 +
Create /usr/bin/nss-config:
 +
 +
install -v -m755 ../{{NSS-Config-Name}} /usr/bin/nss-config-32 &&
 +
sed -i -e "s/@MOD_MAJOR_VERSION@/3/" \
 +
        -e "s/@MOD_MINOR_VERSION@/12/" \
 +
        -e "s/@MOD_PATCH_VERSION@/3/" \
 +
        -e "s/@prefix@/\/usr/" \
 +
        /usr/bin/nss-config-32
  
 
=== N32 ===
 
=== N32 ===
Line 94: Line 144:
 
Compile the package:
 
Compile the package:
  
  export WORKINGDIR=$PWD &&
+
  export PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" USE_ARCH=N32 &&
  echo 'INCLUDES += -I/usr/include/nspr' >> mozilla/security/coreconf/headers.mk &&
+
patch -Np0 -i ../nss-{{NSS-Version}}-fixes-1.patch &&
  for dir in $PWD/mozilla/security/{coreconf,dbm,nss}; do
+
  sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk &&
   cd $dir &&
+
  for dir in mozilla/security/{coreconf,dbm,nss}; do
  make CC="gcc ${BUILDN32}" BUILD_OPT=1
+
   make -C $dir BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 CC="gcc ${BUILDN32}" \
 +
    NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) \
 +
    NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) \
 +
    FREEBL_NO_DEPEND=1 || break
 
  done
 
  done
 +
unset PKG_CONFIG_PATH USE_ARCH
  
 
Install the package
 
Install the package
  
  export NSS_LINUXDIR=$(basename `dir -d $WORKINGDIR/mozilla/dist/Linux*`) &&
+
  for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
cd $WORKINGDIR/mozilla/dist &&
+
  install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib32
  install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib32 &&
+
done
  install -v -m644 $NSS_LINUXDIR/lib/{*.chk,*.a} /usr/lib32 &&
+
  for file in libcrmf.a libnssb.a libnssckfw.a; do
  install -v -d /usr/include/nss &&
+
  install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib32
  install -v -m644 {public,private}/nss/* /usr/include/nss &&
+
  done
  unset NSS_LINUXDIR WORKINGDIR
+
for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
 +
  install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin
 +
done
 +
  install -m755 -d /usr/include/nss3
 +
  install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 &&
 +
  ln -sfv nss3 /usr/include/nss
  
 
Create the pkg-config file:
 
Create the pkg-config file:
Line 115: Line 174:
 
  cat > /usr/lib32/pkgconfig/nss.pc << "EOF"
 
  cat > /usr/lib32/pkgconfig/nss.pc << "EOF"
 
  prefix=/usr
 
  prefix=/usr
  exec_prefix=/usr
+
  exec_prefix=/usr/bin
 
  libdir=/usr/lib32
 
  libdir=/usr/lib32
  includedir=/usr/include/nss
+
  includedir=/usr/include/nss3
 
   
 
   
 
  Name: NSS
 
  Name: NSS
 
  Description: Network Security Services
 
  Description: Network Security Services
  Version: 3.11.3
+
  Version: {{NSS-Version}}
  Requires: nspr >= 4.6.3
+
  Requires: sqlite3 nspr >= {{NSPR-Version}}
  Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -Wl,-R${libdir}
+
  Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
 
  Cflags: -I${includedir}
 
  Cflags: -I${includedir}
 
  EOF
 
  EOF
 +
 +
chmod 644 /usr/lib32/pkgconfig/nss.pc
 +
ln -sfv nss.pc /usr/lib32/pkgconfig/mozilla-nss.pc
 +
 +
Create /usr/bin/nss-config:
 +
 +
install -v -m755 ../{{NSS-Config-Name}} /usr/bin/nss-config-n32 &&
 +
sed -i -e "s/@MOD_MAJOR_VERSION@/3/" \
 +
        -e "s/@MOD_MINOR_VERSION@/12/" \
 +
        -e "s/@MOD_PATCH_VERSION@/3/" \
 +
        -e "s/@prefix@/\/usr/" \
 +
        -e "/libdir=/s/\/lib/&32/" \
 +
        /usr/bin/nss-config-n32
  
 
=== 64Bit ===
 
=== 64Bit ===
Line 131: Line 203:
 
Compile the package:
 
Compile the package:
  
  export WORKINGDIR=$PWD &&
+
  export PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" USE_ARCH=64 &&
  echo 'INCLUDES += -I/usr/include/nspr' >> mozilla/security/coreconf/headers.mk &&
+
patch -Np0 -i ../nss-{{NSS-Version}}-fixes-1.patch &&
  for dir in $PWD/mozilla/security/{coreconf,dbm,nss}; do
+
  sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk &&
   cd $dir &&
+
  for dir in mozilla/security/{coreconf,dbm,nss}; do
  make CC="gcc ${BUILD64}" USE_64=1 BUILD_OPT=1
+
   make -C $dir USE_64=1 BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 CC="gcc ${BUILD64}" \
 +
    NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) \
 +
    NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) \
 +
    FREEBL_NO_DEPEND=1 || break
 
  done
 
  done
 +
unset PKG_CONFIG_PATH USE_ARCH
  
 
Install the package
 
Install the package
  
  export NSS_LINUXDIR=$(basename `dir -d $WORKINGDIR/mozilla/dist/Linux*`) &&
+
  for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
cd $WORKINGDIR/mozilla/dist &&
+
  install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib64
  install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib64 &&
+
done
  install -v -m644 $NSS_LINUXDIR/lib/{*.chk,*.a} /usr/lib64 &&
+
  for file in libcrmf.a libnssb.a libnssckfw.a; do
  install -v -d /usr/include/nss &&
+
  install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib64
  install -v -m644 {public,private}/nss/* /usr/include/nss &&
+
  done
  unset NSS_LINUXDIR WORKINGDIR
+
for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
 +
  install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin
 +
done
 +
  install -m755 -d /usr/include/nss3
 +
  install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 &&
 +
  ln -sfv nss3 /usr/include/nss
  
 
Create the pkg-config file:
 
Create the pkg-config file:
Line 152: Line 233:
 
  cat > /usr/lib64/pkgconfig/nss.pc << "EOF"
 
  cat > /usr/lib64/pkgconfig/nss.pc << "EOF"
 
  prefix=/usr
 
  prefix=/usr
  exec_prefix=/usr
+
  exec_prefix=/usr/bin
 
  libdir=/usr/lib64
 
  libdir=/usr/lib64
  includedir=/usr/include/nss
+
  includedir=/usr/include/nss3
 
   
 
   
 
  Name: NSS
 
  Name: NSS
 
  Description: Network Security Services
 
  Description: Network Security Services
  Version: 3.11.3
+
  Version: {{NSS-Version}}
  Requires: nspr >= 4.6.3
+
  Requires: sqlite3 nspr >= {{NSPR-Version}}
  Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -Wl,-R${libdir}
+
  Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
 
  Cflags: -I${includedir}
 
  Cflags: -I${includedir}
 
  EOF
 
  EOF
 +
 +
chmod 644 /usr/lib64/pkgconfig/nss.pc
 +
ln -sfv nss.pc /usr/lib64/pkgconfig/mozilla-nss.pc
 +
 +
Create /usr/bin/nss-config:
 +
 +
install -v -m755 ../{{NSS-Config-Name}} /usr/bin/nss-config-64 &&
 +
sed -i -e "s/@MOD_MAJOR_VERSION@/3/" \
 +
        -e "s/@MOD_MINOR_VERSION@/12/" \
 +
        -e "s/@MOD_PATCH_VERSION@/3/" \
 +
        -e "s/@prefix@/\/usr/" \
 +
        -e "/libdir=/s/\/lib/&64/" \
 +
        /usr/bin/nss-config-64 &&
 +
ln -sfv multiarch_wrapper /usr/bin/nss-config
 +
 +
= Contents =
 +
 +
{| style="text-align: left;"
 +
|-
 +
! Installed Programs:
 +
| nspr-config and nss-config
 +
|-
 +
! Installed Libraries:
 +
| libcrmf.a, libfreebl3.so, libnspr4.so, libnss3.so, libnssckbi.so, libplc4.so, libplds4.so, libsmime3.so, libsoftokn3.so and libssl3.so
 +
|-
 +
! Installed Directory:
 +
| /usr/include/nspr and /usr/include/nss
 +
|}
 +
 +
=== Short Descriptions ===
 +
 +
{| style="text-align: left;"
 +
|-
 +
! nspr-config
 +
| is used to determine the NSPR installation settings of the installed NSPR libraries.
 +
|-
 +
! nss-config
 +
| is used to determine the NSS library settings of the installed NSS libraries.
 +
|}
 +
 +
The '''libnspr4.so''', '''libplc4.so''' and '''libplds4.so''' libraries make up the Netscape Portable Runtime (NSPR) libraries. These libraries provide a platform-neutral API for system level and libc like functions. The API is used in the Mozilla client, many of the Netscape/AOL/iPlanet offerings and other software applications.
 +
 +
The '''libcrmf.a''', '''libfreebl.so''', '''libnss3.so''', '''libnssckbi.so''', '''libsmime3.so''', '''libsoftokn3.so''' and '''libnssl3.so''' libraries make up the NSS libraries.
 +
 +
[[Category:Security]]

Latest revision as of 18:07, 1 January 2010

Download Source: http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_4_RTM/src/nss-3.12.4.tar.gz
Download nss-config: http://cross-lfs.org/~jciccone/nss-3.12-r5-config.in
Required Patch: http://svn.cross-lfs.org/svn/repos/patches/nss/nss-3.12.4-fixes-1.patch

Introduction to NSS

Network Security Services (NSS) is a set of libraries designed to support cross-platform development of security-enabled client and server applications.

Project Homepage: http://www.mozilla.org/projects/security/pki/nss/

Dependencies

Required

Non-Multilib

Caution.png

Note

For Pure64 builds add 'USE_64=1' to the make commands

Compile the package:

patch -Np0 -i ../nss-3.12.4-fixes-1.patch &&
sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk &&
for dir in mozilla/security/{coreconf,dbm,nss}; do
  make -C $dir  BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
    NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) \
    NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) \
    FREEBL_NO_DEPEND=1 || break
done

Install the package

for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
  install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib
done
for file in libcrmf.a libnssb.a libnssckfw.a; do
  install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib
done
for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
  install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin
done
install -m755 -d /usr/include/nss3
install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 &&
ln -sfv nss3 /usr/include/nss

Create the pkg-config file:

cat > /usr/lib/pkgconfig/nss.pc << "EOF"
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib
includedir=/usr/include/nss3

Name: NSS
Description: Network Security Services
Version: 3.12.4
Requires: sqlite3 nspr >= 4.9.4
Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
Cflags: -I${includedir}
EOF

chmod 644 /usr/lib/pkgconfig/nss.pc
ln -sfv nss.pc /usr/lib/pkgconfig/mozilla-nss.pc

Create /usr/bin/nss-config:

install -v -m755 ../nss-3.12-r5-config.in /usr/bin/nss-config &&
sed -i -e "s/@MOD_MAJOR_VERSION@/3/" \
       -e "s/@MOD_MINOR_VERSION@/12/" \
       -e "s/@MOD_PATCH_VERSION@/3/" \
       -e "s/@prefix@/\/usr/" \
       /usr/bin/nss-config

Multilib

32Bit

Compile the package:

export PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" USE_ARCH=32 &&
patch -Np0 -i ../nss-3.12.4-fixes-1.patch &&
sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk &&
for dir in mozilla/security/{coreconf,dbm,nss}; do
  make -C $dir  BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 CC="gcc ${BUILD32}" \
    NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) \
    NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) \
    FREEBL_NO_DEPEND=1 || break
done
unset PKG_CONFIG_PATH USE_ARCH

Install the package

for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
  install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib
done
for file in libcrmf.a libnssb.a libnssckfw.a; do
  install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib
done
for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
  install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin
done
install -m755 -d /usr/include/nss3
install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 &&
ln -sfv nss3 /usr/include/nss

Create the pkg-config file:

cat > /usr/lib/pkgconfig/nss.pc << "EOF"
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib
includedir=/usr/include/nss3

Name: NSS
Description: Network Security Services
Version: 3.12.4
Requires: sqlite3 nspr >= 4.9.4
Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
Cflags: -I${includedir}
EOF

chmod 644 /usr/lib/pkgconfig/nss.pc
ln -sfv nss.pc /usr/lib/pkgconfig/mozilla-nss.pc

Create /usr/bin/nss-config:

install -v -m755 ../nss-3.12-r5-config.in /usr/bin/nss-config-32 &&
sed -i -e "s/@MOD_MAJOR_VERSION@/3/" \
       -e "s/@MOD_MINOR_VERSION@/12/" \
       -e "s/@MOD_PATCH_VERSION@/3/" \
       -e "s/@prefix@/\/usr/" \
       /usr/bin/nss-config-32

N32

Compile the package:

export PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" USE_ARCH=N32 &&
patch -Np0 -i ../nss-3.12.4-fixes-1.patch &&
sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk &&
for dir in mozilla/security/{coreconf,dbm,nss}; do
  make -C $dir  BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 CC="gcc ${BUILDN32}" \
    NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) \
    NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) \
    FREEBL_NO_DEPEND=1 || break
done
unset PKG_CONFIG_PATH USE_ARCH

Install the package

for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
  install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib32
done
for file in libcrmf.a libnssb.a libnssckfw.a; do
  install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib32
done
for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
  install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin
done
install -m755 -d /usr/include/nss3
install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 &&
ln -sfv nss3 /usr/include/nss

Create the pkg-config file:

cat > /usr/lib32/pkgconfig/nss.pc << "EOF"
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib32
includedir=/usr/include/nss3

Name: NSS
Description: Network Security Services
Version: 3.12.4
Requires: sqlite3 nspr >= 4.9.4
Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
Cflags: -I${includedir}
EOF

chmod 644 /usr/lib32/pkgconfig/nss.pc
ln -sfv nss.pc /usr/lib32/pkgconfig/mozilla-nss.pc

Create /usr/bin/nss-config:

install -v -m755 ../nss-3.12-r5-config.in /usr/bin/nss-config-n32 &&
sed -i -e "s/@MOD_MAJOR_VERSION@/3/" \
       -e "s/@MOD_MINOR_VERSION@/12/" \
       -e "s/@MOD_PATCH_VERSION@/3/" \
       -e "s/@prefix@/\/usr/" \
       -e "/libdir=/s/\/lib/&32/" \
       /usr/bin/nss-config-n32

64Bit

Compile the package:

export PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" USE_ARCH=64 &&
patch -Np0 -i ../nss-3.12.4-fixes-1.patch &&
sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk &&
for dir in mozilla/security/{coreconf,dbm,nss}; do
  make -C $dir USE_64=1 BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 CC="gcc ${BUILD64}" \
    NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) \
    NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) \
    FREEBL_NO_DEPEND=1 || break
done
unset PKG_CONFIG_PATH USE_ARCH

Install the package

for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
  install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib64
done
for file in libcrmf.a libnssb.a libnssckfw.a; do
  install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib64
done
for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
  install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin
done
install -m755 -d /usr/include/nss3
install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 &&
ln -sfv nss3 /usr/include/nss

Create the pkg-config file:

cat > /usr/lib64/pkgconfig/nss.pc << "EOF"
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib64
includedir=/usr/include/nss3

Name: NSS
Description: Network Security Services
Version: 3.12.4
Requires: sqlite3 nspr >= 4.9.4
Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
Cflags: -I${includedir}
EOF

chmod 644 /usr/lib64/pkgconfig/nss.pc
ln -sfv nss.pc /usr/lib64/pkgconfig/mozilla-nss.pc

Create /usr/bin/nss-config:

install -v -m755 ../nss-3.12-r5-config.in /usr/bin/nss-config-64 &&
sed -i -e "s/@MOD_MAJOR_VERSION@/3/" \
       -e "s/@MOD_MINOR_VERSION@/12/" \
       -e "s/@MOD_PATCH_VERSION@/3/" \
       -e "s/@prefix@/\/usr/" \
       -e "/libdir=/s/\/lib/&64/" \
       /usr/bin/nss-config-64 &&
ln -sfv multiarch_wrapper /usr/bin/nss-config

Contents

Installed Programs: nspr-config and nss-config
Installed Libraries: libcrmf.a, libfreebl3.so, libnspr4.so, libnss3.so, libnssckbi.so, libplc4.so, libplds4.so, libsmime3.so, libsoftokn3.so and libssl3.so
Installed Directory: /usr/include/nspr and /usr/include/nss

Short Descriptions

nspr-config is used to determine the NSPR installation settings of the installed NSPR libraries.
nss-config is used to determine the NSS library settings of the installed NSS libraries.

The libnspr4.so, libplc4.so and libplds4.so libraries make up the Netscape Portable Runtime (NSPR) libraries. These libraries provide a platform-neutral API for system level and libc like functions. The API is used in the Mozilla client, many of the Netscape/AOL/iPlanet offerings and other software applications.

The libcrmf.a, libfreebl.so, libnss3.so, libnssckbi.so, libsmime3.so, libsoftokn3.so and libnssl3.so libraries make up the NSS libraries.

Retrieved from "?title=NSS&oldid=19761"