summaryrefslogtreecommitdiff
path: root/libre/nss/PKGBUILD
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-04-13 04:48:47 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-04-13 04:48:47 -0300
commit92510ab9648b34a0fceaa6b65ef36df5056a661c (patch)
treec1073282c045a7969d056bc5808197500b94b6b6 /libre/nss/PKGBUILD
parent94ad0c6adbe3e23c9d9855817f658ed15096e927 (diff)
downloadabslibre-92510ab9648b34a0fceaa6b65ef36df5056a661c.tar.gz
abslibre-92510ab9648b34a0fceaa6b65ef36df5056a661c.tar.bz2
abslibre-92510ab9648b34a0fceaa6b65ef36df5056a661c.zip
nss: add new package to [libre] to add CAcert CA certificates support
Diffstat (limited to 'libre/nss/PKGBUILD')
-rw-r--r--libre/nss/PKGBUILD99
1 files changed, 99 insertions, 0 deletions
diff --git a/libre/nss/PKGBUILD b/libre/nss/PKGBUILD
new file mode 100644
index 000000000..218c331b2
--- /dev/null
+++ b/libre/nss/PKGBUILD
@@ -0,0 +1,99 @@
+# $Id: PKGBUILD 209930 2014-04-09 10:55:26Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Maintainer (Parabola): André Silva <emulatorman@parabola.nu>
+# Contributor (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=nss
+pkgver=3.16
+pkgrel=1.1
+pkgdesc="Mozilla Network Security Services, with CAcert CA certificates support"
+arch=(i686 x86_64)
+url="http://www.mozilla.org/projects/security/pki/nss/"
+license=('MPL' 'GPL')
+_nsprver=4.10.4
+depends=("nspr>=${_nsprver}" 'sqlite' 'zlib' 'sh')
+makedepends=('perl')
+options=('!strip' '!makeflags' 'staticlibs')
+source=(ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/${pkgname}-${pkgver}.tar.gz
+ nss.pc.in
+ nss-config.in
+ ssl-renegotiate-transitional.patch
+ add_cacert_ca_certs.patch)
+sha1sums=('981dc6ef2f1e69ec7e2b277ce27c7005e9837f95'
+ 'aa5b2c0aa38d3c1066d511336cf28d1333e3aebd'
+ 'cb744cc3e56b604e4754bc3c7d9f25bb9a0a136c'
+ '8a964a744ba098711b80c0d279a2993524e8eb92'
+ '6c5bad81358b2fd3bce8cc322bc761d5fdc4a341')
+
+prepare() {
+ cd $pkgname-$pkgver
+
+ # Add CAcert CA certificates.
+ # See http://wiki.cacert.org/NSSLib for how to generate
+ patch -Np1 -i ../add_cacert_ca_certs.patch
+
+ # Adds transitional SSL renegotiate support - patch from Debian
+ patch -Np3 -i ../ssl-renegotiate-transitional.patch
+
+ # Respect LDFLAGS
+ sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/' \
+ -i nss/coreconf/rules.mk
+}
+
+
+build() {
+ cd $pkgname-$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 $pkgname-$pkgver
+ install -d "$pkgdir"/usr/{bin,include/nss,lib/pkgconfig}
+
+ NSS_VMAJOR=$(grep '#define.*NSS_VMAJOR' nss/lib/nss/nss.h | awk '{print $3}')
+ NSS_VMINOR=$(grep '#define.*NSS_VMINOR' nss/lib/nss/nss.h | awk '{print $3}')
+ NSS_VPATCH=$(grep '#define.*NSS_VPATCH' nss/lib/nss/nss.h | awk '{print $3}')
+
+ sed ../nss.pc.in \
+ -e "s,%libdir%,/usr/lib,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" \
+ > "$pkgdir/usr/lib/pkgconfig/nss.pc"
+ ln -s nss.pc "$pkgdir/usr/lib/pkgconfig/mozilla-nss.pc"
+
+ sed ../nss-config.in \
+ -e "s,@libdir@,/usr/lib,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@,${NSS_VMAJOR},g" \
+ -e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \
+ -e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \
+ > "$pkgdir/usr/bin/nss-config"
+ chmod 755 "$pkgdir/usr/bin/nss-config"
+
+ cd dist/*.OBJ/bin
+ install -t "$pkgdir/usr/bin" *util shlibsign signtool signver ssltap
+
+ cd ../lib
+ install -t "$pkgdir/usr/lib" *.so
+ install -t "$pkgdir/usr/lib" -m644 libcrmf.a *.chk
+
+ cd ../../public/nss
+ install -t "$pkgdir/usr/include/nss" -m644 *.h
+}