diff options
author | Franziskus Kiefer | 2016-06-02 21:35:57 +0100 |
---|---|---|
committer | Franziskus Kiefer | 2016-06-02 21:59:23 +0100 |
commit | 09e02126055d6a224be2c1ef7a3644d92505773a (patch) | |
tree | f9b647c8065d8f9ae1cdfbff6ad8de5490c9c2f6 | |
download | aur-09e02126055d6a224be2c1ef7a3644d92505773a.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 86 | ||||
-rw-r--r-- | nss-config.in | 145 | ||||
-rw-r--r-- | nss.pc.in | 11 |
4 files changed, 270 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0403b4c9b944 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = nss-hg + pkgdesc = Mozilla Network Security Services + pkgver = trunk + pkgrel = 1 + url = http://www.mozilla.org/projects/security/pki/nss/ + arch = i686 + arch = x86_64 + license = MPL + license = GPL + makedepends = perl + makedepends = python2 + depends = nspr>=4.12 + depends = sqlite + depends = zlib + depends = sh + depends = p11-kit + options = !strip + options = !makeflags + options = staticlibs + source = hg+https://hg.mozilla.org/projects/nss + source = nss.pc.in + source = nss-config.in + sha256sums = SKIP + sha256sums = b9f1428ca2305bf30b109507ff335fa00bce5a7ce0434b50acd26ad7c47dd5bd + sha256sums = e44ac5095b4d88f24ec7b2e6a9f1581560bd3ad41a3d198596d67ef22f67adb9 + +pkgname = nss-hg + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b0a45759a1aa --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,86 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgbase=nss-hg +pkgname=nss-hg +pkgver=trunk +pkgrel=1 +pkgdesc="Mozilla Network Security Services" +arch=(i686 x86_64) +url="http://www.mozilla.org/projects/security/pki/nss/" +license=('MPL' 'GPL') +_nsprver=4.12 +depends=("nspr>=${_nsprver}" 'sqlite' 'zlib' 'sh' 'p11-kit') +makedepends=('perl' 'python2') +options=('!strip' '!makeflags' 'staticlibs') +source=("hg+https://hg.mozilla.org/projects/nss" + nss.pc.in nss-config.in) +sha256sums=('SKIP' + 'b9f1428ca2305bf30b109507ff335fa00bce5a7ce0434b50acd26ad7c47dd5bd' + 'e44ac5095b4d88f24ec7b2e6a9f1581560bd3ad41a3d198596d67ef22f67adb9') + +prepare() { + # Respect LDFLAGS + sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/' \ + -i nss/coreconf/rules.mk +} + + +build() { + cd 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 NSS_ENABLE_TLS_1_3=1 + export XCFLAGS="${CFLAGS}" + + [ "$CARCH" = "x86_64" ] && export USE_64=1 + + make -C coreconf + make -C lib/dbm + make +} + +package() { + 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 + + rm "$pkgdir/usr/lib/libnssckbi.so" + ln -s libnssckbi-p11-kit.so "$pkgdir/usr/lib/libnssckbi.so" +} diff --git a/nss-config.in b/nss-config.in new file mode 100644 index 000000000000..f8f893e71a70 --- /dev/null +++ b/nss-config.in @@ -0,0 +1,145 @@ +#!/bin/sh + +prefix=@prefix@ + +major_version=@MOD_MAJOR_VERSION@ +minor_version=@MOD_MINOR_VERSION@ +patch_version=@MOD_PATCH_VERSION@ + +usage() +{ + cat <<EOF +Usage: nss-config [OPTIONS] [LIBRARIES] +Options: + [--prefix[=DIR]] + [--exec-prefix[=DIR]] + [--includedir[=DIR]] + [--libdir[=DIR]] + [--version] + [--libs] + [--cflags] +Dynamic Libraries: + nss + nssutil + ssl + smime +EOF + exit $1 +} + +if test $# -eq 0; then + usage 1 1>&2 +fi + +lib_ssl=yes +lib_smime=yes +lib_nss=yes +lib_nssutil=yes + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --includedir=*) + includedir=$optarg + ;; + --includedir) + echo_includedir=yes + ;; + --libdir=*) + libdir=$optarg + ;; + --libdir) + echo_libdir=yes + ;; + --version) + echo ${major_version}.${minor_version}.${patch_version} + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + ssl) + lib_ssl=yes + ;; + smime) + lib_smime=yes + ;; + nss) + lib_nss=yes + ;; + nssutil) + lib_nssutil=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +# Set variables that may be dependent upon other variables +if test -z "$exec_prefix"; then + exec_prefix=`pkg-config --variable=exec_prefix nss` +fi +if test -z "$includedir"; then + includedir=`pkg-config --variable=includedir nss` +fi +if test -z "$libdir"; then + libdir=`pkg-config --variable=libdir nss` +fi + +if test "$echo_prefix" = "yes"; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes"; then + echo $exec_prefix +fi + +if test "$echo_includedir" = "yes"; then + echo $includedir +fi + +if test "$echo_libdir" = "yes"; then + echo $libdir +fi + +if test "$echo_cflags" = "yes"; then + echo -I$includedir +fi + +if test "$echo_libs" = "yes"; then + libdirs="-Wl,-rpath-link,$libdir -L$libdir" + if test -n "$lib_ssl"; then + libdirs="$libdirs -lssl${major_version}" + fi + if test -n "$lib_smime"; then + libdirs="$libdirs -lsmime${major_version}" + fi + if test -n "$lib_nss"; then + libdirs="$libdirs -lnss${major_version}" + fi + if test -n "$lib_nssutil"; then + libdirs="$libdirs -lnssutil${major_version}" + fi + echo $libdirs +fi + diff --git a/nss.pc.in b/nss.pc.in new file mode 100644 index 000000000000..d47b9e14699f --- /dev/null +++ b/nss.pc.in @@ -0,0 +1,11 @@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir% + +Name: NSS +Description: Network Security Services +Version: %NSS_VERSION% +Requires: nspr >= %NSPR_VERSION% +Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3 +Cflags: -I${includedir} |