summaryrefslogtreecommitdiff
path: root/libre/nss-static/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/nss-static/PKGBUILD')
-rw-r--r--libre/nss-static/PKGBUILD64
1 files changed, 64 insertions, 0 deletions
diff --git a/libre/nss-static/PKGBUILD b/libre/nss-static/PKGBUILD
new file mode 100644
index 000000000..4887f4f34
--- /dev/null
+++ b/libre/nss-static/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Márcio Silva <coadde@parabola.nu>
+# based of nss
+
+pkgbase=nss
+pkgname=nss-static
+pkgver=3.23
+pkgrel=3
+pkgdesc="Mozilla Network Security Services (static libraries only)"
+arch=(i686 x86_64 armv7h)
+url="http://www.mozilla.org/projects/security/pki/nss/"
+license=('MPL' 'GPL')
+_nsprver=4.12
+depends=('nspr-static' 'sqlite-static' 'p11-kit-static' 'nss')
+makedepends=('perl' 'python2')
+options=('!strip' '!makeflags' 'staticlibs')
+source=("https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_${pkgver//./_}_RTM/src/${pkgbase}-${pkgver}.tar.gz"
+ legacy-certs.patch)
+sha256sums=('94b383e31c9671e9dfcca81084a8a813817e8f05a57f54533509b318d26e11cf'
+ '5f793af9c8558324e4188163862e0e70a5b069a44ad9e7817e0767093739f2a0')
+
+prepare() {
+ mkdir certs
+
+ cd nss-$pkgver
+
+ # Still needed - Evolution (Camel) and Telepathy-Gabble (Wocky) use
+ # their own validation which doesn't work with trusted intermediates
+ patch nss/lib/ckfw/builtins/certdata.txt ../legacy-certs.patch
+
+ # Respect LDFLAGS
+ sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/' \
+ -i nss/coreconf/rules.mk
+
+ ln -sr nss/lib/ckfw/builtins/certdata.txt ../certs/
+ ln -sr nss/lib/ckfw/builtins/nssckbi.h ../certs/
+}
+
+
+build() {
+ cd nss-$pkgver/nss
+ export BUILD_OPT=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+ export NSPR_INCLUDE_DIR="`nspr-config --includedir`"
+ export NSPR_LIB_DIR="`nspr-config --libdir`"
+ export XCFLAGS="${CFLAGS}"
+
+ [ "$CARCH" = "x86_64" ] && export USE_64=1
+
+ make -C coreconf
+ make -C lib/dbm
+ make
+}
+
+package() {
+ cd nss-$pkgver
+ install -d "$pkgdir"/usr/lib
+ cd dist/*.OBJ/lib
+ install -t "$pkgdir/usr/lib" lib{freebl,gtest,nss,nssdbm,nsssysinit,nssutil,smime,softokn,ssl}.a
+ # list of static libraries are build:
+ # certdb certhi crmf cryptohi dbm freebl gtest jar nss nssb nssckfw nssdbm nssdev nsspki nsssysinit nssutil
+ # pk11wrap pkcs12 pkcs7 pkixcertsel pkixchecker pkixcrlsel pkixmodule pkixparams pkixpki pkixresults
+ # pkixstore pkixsystem pkixtop pkixutil sectool smime softokn ssl
+}