Repacked rust toolchain and source in lzip file format Added mozilla-nss to base Updated base section build list
108 lines
3 KiB
Text
108 lines
3 KiB
Text
# Maintainer: PktSurf <smlinux@pktsurf.in>
|
|
app=mozilla-nss
|
|
version=3.106
|
|
nsprversion=4.36
|
|
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//')"
|
|
|
|
prepbuilddir() {
|
|
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
|
|
}
|
|
|
|
build() {
|
|
# 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 4 --opt --system-sqlite --enable-libpkix --disable-tests
|
|
cd -
|
|
|
|
# Install all the needed stuff to the package directory
|
|
mkdir -p $pkg/usr/{bin,lib,include/{nss,nspr}}
|
|
cd dist/Release
|
|
cp -pL bin/{certutil,cmsutil,crlutil,modutil,pk12util,shlibsign,signtool,signver,ssltap} $pkg/usr/bin/
|
|
cp -pL lib/*.{so,a} $pkg/usr/lib/
|
|
chmod 755 $pkg/usr/lib/*.so*
|
|
cp -rL include/* $pkg/usr/include/
|
|
cp -rpL ../public/nss/*.h $pkg/usr/include/nss/
|
|
|
|
cd -
|
|
|
|
cd nss/cmd/smimetools
|
|
install -m 755 smime $pkg/usr/bin/smime
|
|
sed -i -e 's#/usr/local/bin#/bin#g' $pkg/usr/bin/smime
|
|
cd -
|
|
|
|
# Install nspr-config
|
|
cat nspr/Release/config/nspr-config | sed -e "s,^prefix=.*$,prefix=,g" > $pkg/usr/bin/nspr-config
|
|
chmod 755 $pkg/usr/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/usr/bin/nss-config
|
|
chmod 755 $pkg/usr/bin/nss-config
|
|
|
|
# Provide pkg-config files
|
|
mkdir -p $pkg/usr/lib/pkgconfig
|
|
cat <<EOT > $pkg/usr/lib/pkgconfig/mozilla-nss.pc
|
|
prefix=/usr
|
|
exec_prefix=\${prefix}
|
|
libdir=\${prefix}/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/usr/lib/pkgconfig/mozilla-nspr.pc
|
|
prefix=/usr
|
|
exec_prefix=\${prefix}
|
|
libdir=\${prefix}/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/usr/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="
|
|
f19fa9c343df1530f7fe9266b28f1bd71f9b477da76381a58f024f34ecd7210adaa5e4c33314b4d315092d683f6c37b7f4d105b151b66947618157e829bf3f02 nspr-4.36.tar.lz
|
|
d687b1d52c50c56fb42a712913ea4f862b1cc547a47da6f05b3a499f2048bcac71442e3c848775a63d2ca403367629619bcdc49c9a1c9ecbfc09d55c0fe17781 nss-3.106.tar.lz
|
|
"
|