smlinux/base/mozilla-nss/mozilla-nss.SMBuild
PktSurf 6035441c5b Upgraded base/curl to 7.88.1
Upgraded base/exiv2 to 0.27.5
Upgraded base/gdbm to 1.23
Upgraded base/gettext to 0.21.1
Upgraded base/git to 2.30.8
Upgraded base/glib to 2.70.3
Fixed build option in base/gnutls
Upgraded base/htop to 3.2.2
Upgraded base/icu to 72.1
Upgraded base/iptables to 1.8.9, discarded old patches
Upgraded base/libarchive to 3.6.2
Upgraded base/logrotate to 3.21.0
Upgraded base/make to 4.4
Discarded obsolete build options and fixed configure.local of base/mandoc
Upgraded base/mozilla-nss to 3.87 and nspr which is part of it to 4.35
Upgraded base/openssl to 1.1.1t
Added sha512 checksum for tar lzip file inside base/tar
2023-03-09 22:06:21 +05:30

110 lines
2.9 KiB
Text
Executable file

app=mozilla-nss
version=3.87
nsprversion=4.35
build=1sml
homepage="https://mozilla.org"
desc="set of cryptographic libraries from Mozilla for use in security-focused applications"
requires="gyp"
NJOBS="(echo $MAKEFLAGS | sed 's/-j//')"
build() {
mkandenterbuilddir
rm -rf nss-$version
rm -rf nspr-*
tar xf $srcdir/nss-$version.tar.?z*
cd nss-$version
tar xf $srcdir/nspr-$nsprversion.tar.?z*
mv nspr*/nspr .
fixbuilddirpermissions
# NSS doesn't like our ARM64-specific optimization C/CXXFLAGS
if [ "$arch" == "aarch64" ] ; then
unset CFLAGS CXXFLAGS
fi
# Disable Werror
export NSS_ENABLE_WERROR=0
# Disable deprecated ciphers
export NSS_DISABLE_DEPRECATED_SEED=1
export NSS_DISABLE_DEPRECATED_RC2=1
cd nss
./build.sh -v -j 8 --opt --system-sqlite --enable-libpkix --disable-tests
cd -
# Install all the needed stuff to the package directory
mkdir -p $pkg/{bin,lib,include/{nss,nspr}}
cd dist/Release
cp -pL bin/{certutil,cmsutil,crlutil,modutil,pk12util,shlibsign,signtool,signver,ssltap} $pkg/bin/
cp -pL lib/*.{so,a} $pkg/lib/
chmod 755 $pkg/lib/*.so*
cp -rL include/* $pkg/include/
cp -rpL ../public/nss/*.h $pkg/include/nss/
cd -
cd nss/cmd/smimetools
install -m 755 smime $pkg/bin/smime
sed -i -e 's#/usr/local/bin#/bin#g' $pkg/bin/smime
cd -
# Install nspr-config
cat nspr/Release/config/nspr-config | sed -e "s,^prefix=.*$,prefix=,g" > $pkg/bin/nspr-config
chmod 755 $pkg/bin/nspr-config
# Install nss-config
sed -e "s,@prefix@,,g" \
-e "s,@MOD_MAJOR_VERSION@,$(printf $version | cut -d. -f1),g" \
-e "s,@MOD_MAJOR_VERSION@,$(printf $version | cut -d. -f2),g" \
-e "s,@MOD_MAJOR_VERSION@,$(printf $version | cut -d. -f3),g" \
$srcdir/nss-config.in > $pkg/bin/nss-config
chmod 755 $pkg/bin/nss-config
# Provide pkg-config files
mkdir -p $pkg/lib/pkgconfig
cat <<EOT > $pkg/lib/pkgconfig/mozilla-nss.pc
prefix=
exec_prefix=\${prefix}
libdir=/lib
includedir=\${prefix}/include/nss
Name: NSS
Description: Network Security Services
Version: $version
Requires: nspr >= $nsprversion sqlite3
Libs: -L\${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3 -lnssutil3
Cflags: -I\${includedir}
EOT
cat <<EOT > $pkg/lib/pkgconfig/mozilla-nspr.pc
prefix=
exec_prefix=\${prefix}
libdir=/lib
includedir=\${prefix}/include/nspr
Name: NSPR
Description: The Netscape Portable Runtime
Version: $nsprversion
Libs: -L\${libdir} -lplds4 -lplc4 -lnspr4
Cflags: -I\${includedir}
EOT
# Create pkgconfig symlinks
(
cd $pkg/lib/pkgconfig
ln -s mozilla-nspr.pc nspr.pc
ln -s mozilla-nss.pc nss.pc
)
cp -a $srcdir/{MPL-1.1.txt,gpl-2.0.txt,lgpl-2.1.txt} $pkgdocs/
mkfinalpkg
}
sha512sums="
3f7b322e1b67cc94b2c807b38eb2ce46a0e1a61db755b553a5ba88965226e5db4c79fde5a4396d2740a9e58f1199c40e33cccae42d99b750629a54e190d67e45 nspr-4.35.tar.lz
820b7a4f1853698a8df1bb78a60f956fa5d698cced74527abd7fb1c9b57352f03191668c08403b2cde4597aa20b07277cd63ebf9125d652109f61954520bbdf0 nss-3.87.tar.lz
"