Update package version to 3.124
This commit is contained in:
@@ -5,30 +5,63 @@
|
||||
# The prepare function is executed in the root of the temp directory
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
cd "$BPM_SOURCE"
|
||||
# Patch from Beyond Linux from Scratch
|
||||
patch -Np1 -i ../nss.patch
|
||||
chmod +x "$BPM_WORKDIR"/bundle.sh
|
||||
chmod +x "$BPM_WORKDIR"/certdata2pem.py
|
||||
|
||||
mkdir "$BPM_SOURCE"/certs
|
||||
ln -srft "$BPM_SOURCE"/certs "$BPM_SOURCE"/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h}
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
cd nss
|
||||
make BUILD_OPT=1 NSPR_INCLUDE_DIR=/usr/include/nspr USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz NSS_ENABLE_WERROR=0 USE_64=1 NSS_USE_SYSTEM_SQLITE=1
|
||||
cd certs
|
||||
"$BPM_WORKDIR"/certdata2pem.py
|
||||
|
||||
cd ..
|
||||
"$BPM_WORKDIR"/bundle.sh
|
||||
|
||||
cd "$BPM_SOURCE"/nss
|
||||
./build.sh --disable-tests --enable-libpkix --opt --system-nspr --system-sqlite
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
cd dist
|
||||
local nsprver="$(pkg-config --modversion nspr)"
|
||||
local libdir=/usr/lib includedir=/usr/include/nss
|
||||
|
||||
install -dm755 "$BPM_OUTPUT"/usr/{lib/pkgconfig,bin,include/nss}
|
||||
install -Dm755 Linux*/lib/*.so "$BPM_OUTPUT"/usr/lib
|
||||
install -Dm644 Linux*/lib/{*.chk,libcrmf.a} "$BPM_OUTPUT"/usr/lib
|
||||
cp -v -RL {public,private}/nss/* "$BPM_OUTPUT"/usr/include/nss
|
||||
install -Dm755 Linux*/bin/{certutil,nss-config,pk12util} "$BPM_OUTPUT"/usr/bin
|
||||
install -Dm644 Linux*/lib/pkgconfig/nss.pc "$BPM_OUTPUT"/usr/lib/pkgconfig
|
||||
sed nss/pkg/pkg-config/nss.pc.in \
|
||||
-e "s,%prefix%,/usr,g" \
|
||||
-e "s,%exec_prefix%,\${prefix},g" \
|
||||
-e "s,%libdir%,$libdir,g" \
|
||||
-e "s,%includedir%,$includedir,g" \
|
||||
-e "s,%NSPR_VERSION%,$nsprver,g" \
|
||||
-e "s,%NSS_VERSION%,$BPM_PKG_VERSION,g" |
|
||||
install -Dm644 /dev/stdin "$BPM_OUTPUT"/"$libdir"/pkgconfig/nss.pc
|
||||
|
||||
ln -sf pkcs11/p11-kit-trust.so "$BPM_OUTPUT"/usr/lib/p11-kit-trust.so
|
||||
ln -sf p11-kit-trust.so "$BPM_OUTPUT"/usr/lib/libnssckbi.so
|
||||
install -Dt "$BPM_OUTPUT"/"$libdir" dist/Release/lib/*.so
|
||||
|
||||
local vmajor vminor vpatch
|
||||
{ read vmajor; read vminor; read vpatch; } \
|
||||
< <(awk '/#define.*NSS_V(MAJOR|MINOR|PATCH)/ {print $3}' nss/lib/nss/nss.h)
|
||||
|
||||
sed nss/pkg/pkg-config/nss-config.in \
|
||||
-e "s,@prefix@,/usr,g" \
|
||||
-e "s,@exec_prefix@,/usr,g" \
|
||||
-e "s,@libdir@,$libdir,g" \
|
||||
-e "s,@includedir@,$includedir,g" \
|
||||
-e "s,@MOD_MAJOR_VERSION@,$vmajor,g" \
|
||||
-e "s,@MOD_MINOR_VERSION@,$vminor,g" \
|
||||
-e "s,@MOD_PATCH_VERSION@,$vpatch,g" |
|
||||
install -D /dev/stdin "$BPM_OUTPUT"/usr/bin/nss-config
|
||||
|
||||
install -D dist/Release/bin/{*util,shlibsign,signtool,signver,ssltap} -t "$BPM_OUTPUT"/usr/bin
|
||||
|
||||
install -Dm644 dist/public/nss/*.h -t "$BPM_OUTPUT"/"$includedir"
|
||||
|
||||
install -Dm644 nss/doc/nroff/{*util,signtool,signver,ssltap}.1 -t "$BPM_OUTPUT"/usr/share/man/man1
|
||||
|
||||
# Replace built-in trust with p11-kit connection
|
||||
ln -sf pkcs11/p11-kit-trust.so "$BPM_OUTPUT"/"$libdir"/libnssckbi.so
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user