1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
5 pkgname=(nss ca-certificates-mozilla)
8 pkgdesc="Network Security Services"
9 url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
28 _revision=c8e02a52aa1979e28bdba814df1b72fc743d66d4
30 "hg+https://hg.mozilla.org/projects/nss#revision=$_revision"
35 '4be5dd836c844fdd7b63302a6994d62149082c3bc81eef70f373f416fed80a61a923960e4390d1c391b81ab01b409370d788818a30ffdd3a4ed467b670f990f6'
36 '6bb59dcc9289916dcbf8fb6d73db0c0cd7582dc12a3aa4e8be19ec62c9ede65fdd9470a2d92ec5a114506b78d2d21b8ae0a1b45a17dc1f90f7d75434a93da510')
40 hg id -t -r. | sed 's/^NSS_//;s/_RTM$//;s/_/./g'
45 ln -srft certs nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h}
49 local buildsh_options=(
65 ./build.sh "${buildsh_options[@]}"
69 local nsprver="$(pkg-config --modversion nspr)"
70 local libdir=/usr/lib includedir=/usr/include/nss
72 sed nss/pkg/pkg-config/nss.pc.in \
73 -e "s,%prefix%,/usr,g" \
74 -e "s,%exec_prefix%,\${prefix},g" \
75 -e "s,%libdir%,$libdir,g" \
76 -e "s,%includedir%,$includedir,g" \
77 -e "s,%NSPR_VERSION%,$nsprver,g" \
78 -e "s,%NSS_VERSION%,$pkgver,g" |
79 install -Dm644 /dev/stdin "$pkgdir$libdir/pkgconfig/nss.pc"
81 ln -s nss.pc "$pkgdir$libdir/pkgconfig/mozilla-nss.pc"
83 install -Dt "$pkgdir$libdir" dist/Release/lib/*.so
85 local vmajor vminor vpatch
86 { read vmajor; read vminor; read vpatch; } \
87 < <(awk '/#define.*NSS_V(MAJOR|MINOR|PATCH)/ {print $3}' nss/lib/nss/nss.h)
89 sed nss/pkg/pkg-config/nss-config.in \
90 -e "s,@prefix@,/usr,g" \
91 -e "s,@exec_prefix@,/usr,g" \
92 -e "s,@libdir@,$libdir,g" \
93 -e "s,@includedir@,$includedir,g" \
94 -e "s,@MOD_MAJOR_VERSION@,$vmajor,g" \
95 -e "s,@MOD_MINOR_VERSION@,$vminor,g" \
96 -e "s,@MOD_PATCH_VERSION@,$vpatch,g" |
97 install -D /dev/stdin "$pkgdir/usr/bin/nss-config"
99 install -Dt "$pkgdir/usr/bin" \
100 dist/Release/bin/{*util,shlibsign,signtool,signver,ssltap}
102 install -Dt "$pkgdir$includedir" -m644 dist/public/nss/*.h
104 install -Dt "$pkgdir/usr/share/man/man1" -m644 \
105 nss/doc/nroff/{*util,signtool,signver,ssltap}.1
107 # Replace built-in trust with p11-kit connection
108 ln -s pkcs11/p11-kit-trust.so "$pkgdir$libdir/p11-kit-trust.so"
109 ln -sf p11-kit-trust.so "$pkgdir$libdir/libnssckbi.so"
112 package_ca-certificates-mozilla() {
113 pkgdesc="Mozilla's set of trusted CA certificates"
114 depends=('ca-certificates-utils>=20181109-3')
116 install -Dm644 ca-bundle.trust.p11-kit \
117 "$pkgdir/usr/share/ca-certificates/trust-source/mozilla.trust.p11-kit"
120 # vim:set sw=2 sts=-1 et: