114 lines
3.4 KiB
Bash
114 lines
3.4 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgbase=nss
|
|
pkgname=(nss ca-certificates-mozilla)
|
|
pkgver=3.89
|
|
pkgrel=01
|
|
pkgdesc="Network Security Services - zstd mandatory here!"
|
|
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
|
|
depends=('nspr>=4.35' sqlite zlib sh 'p11-kit>=0.23.19')
|
|
makedepends=(perl python gyp mercurial)
|
|
#options=(debug) # uncomment this if you need to build the nss debug pkg
|
|
_revision=4e4ebb9ad0d4391035c76c26967682c148ff0fd7
|
|
source=("hg+https://hg.mozilla.org/projects/nss#revision=$_revision"
|
|
bundle.sh
|
|
certdata2pem.py)
|
|
|
|
pkgver() {
|
|
cd nss
|
|
hg id -t -r. | sed 's/^NSS_//;s/_RTM$//;s/_/./g'
|
|
}
|
|
|
|
prepare() {
|
|
mkdir -p certs
|
|
ln -srft certs nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h}
|
|
}
|
|
|
|
build() {
|
|
cd certs
|
|
python ../certdata2pem.py
|
|
|
|
cd ..
|
|
sh ./bundle.sh
|
|
|
|
cd nss
|
|
./build.sh \
|
|
--target x64 \
|
|
--opt \
|
|
--system-sqlite \
|
|
--system-nspr \
|
|
--enable-libpkix \
|
|
--disable-tests
|
|
}
|
|
|
|
package_nss() {
|
|
local nsprver="$(pkg-config --modversion nspr)"
|
|
local libdir=/usr/lib
|
|
|
|
sed nss/pkg/pkg-config/nss.pc.in \
|
|
-e "s,%libdir%,$libdir,g" \
|
|
-e "s,%prefix%,/usr,g" \
|
|
-e "s,%exec_prefix%,/usr/bin,g" \
|
|
-e "s,%includedir%,/usr/include/nss,g" \
|
|
-e "s,%NSPR_VERSION%,$nsprver,g" \
|
|
-e "s,%NSS_VERSION%,$pkgver,g" |
|
|
install -Dm644 /dev/stdin "$pkgdir$libdir/pkgconfig/nss.pc"
|
|
|
|
ln -s nss.pc "$pkgdir$libdir/pkgconfig/mozilla-nss.pc"
|
|
|
|
install -Dt "$pkgdir$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,@libdir@,$libdir,g" \
|
|
-e "s,@prefix@,/usr/bin,g" \
|
|
-e "s,@exec_prefix@,/usr/bin,g" \
|
|
-e "s,@includedir@,/usr/include/nss,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 "$pkgdir/usr/bin/nss-config"
|
|
|
|
install -Dt "$pkgdir/usr/bin" \
|
|
dist/Release/bin/{*util,shlibsign,signtool,signver,ssltap}
|
|
|
|
install -Dt "$pkgdir/usr/include/nss" -m644 dist/public/nss/*.h
|
|
|
|
install -Dt "$pkgdir/usr/share/man/man1" -m644 \
|
|
nss/doc/nroff/{*util,signtool,signver,ssltap}.1
|
|
|
|
# Replace built-in trust with p11-kit connection
|
|
ln -s pkcs11/p11-kit-trust.so "$pkgdir$libdir/p11-kit-trust.so"
|
|
ln -sf p11-kit-trust.so "$pkgdir$libdir/libnssckbi.so"
|
|
}
|
|
|
|
package_ca-certificates-mozilla() {
|
|
pkgdesc="Mozilla's set of trusted CA certificates"
|
|
depends=('ca-certificates-utils>=20181109-3')
|
|
|
|
install -Dm644 ca-bundle.trust.p11-kit \
|
|
"$pkgdir/usr/share/ca-certificates/trust-source/mozilla.trust.p11-kit"
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=(MPL GPL)
|
|
|
|
sha256sums=(SKIP # nss
|
|
3bfadf722da6773bdabdd25bdf78158648043d1b7e57615574f189a88ca865dd # bundle.sh
|
|
d2a1579dae05fd16175fac27ef08b54731ecefdf414085c610179afcf62b096c) # certdata2pem.py
|
|
|
|
## 8deb0ef6045c74cabecddff08fc75fa0a8dc6683b30d98d6c69a2cfc45462c5d ca-certificates-mozilla-3.89-01-x86_64.pkg.tar.lz
|
|
## b5afbf7b1ce991a1c21a03e563db365cabb6165412b807fb57441eaf39cedc63 nss-3.89-01-x86_64.pkg.tar.lz
|
|
|
|
|