Date: Friday, April 13, 2018 @ 17:50:49 Author: heftig Revision: 321680
FS#58206 use shipped templates; simplify Modified: nss/trunk/PKGBUILD Deleted: nss/trunk/nss-config.in nss/trunk/nss-config.xml nss/trunk/nss.pc.in ----------------+ PKGBUILD | 33 +++++------- nss-config.in | 145 ------------------------------------------------------- nss-config.xml | 132 -------------------------------------------------- nss.pc.in | 11 ---- 4 files changed, 14 insertions(+), 307 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-04-13 17:43:59 UTC (rev 321679) +++ PKGBUILD 2018-04-13 17:50:49 UTC (rev 321680) @@ -9,18 +9,15 @@ url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS" arch=(x86_64) license=(MPL GPL) -_nsprver=4.15 +_nsprver=4.19 depends=("nspr>=${_nsprver}" sqlite zlib sh p11-kit) -makedepends=(perl python2 xmlto docbook-xsl gyp) +makedepends=(perl python2 gyp) options=(!strip !makeflags staticlibs) source=("https://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/nss-${pkgver}.tar.gz" - certdata2pem.py bundle.sh nss.pc.in nss-config.in nss-config.xml enable-libpkix.patch) + certdata2pem.py bundle.sh enable-libpkix.patch) sha256sums=('6025441d528ff6a7f1a4b673b6ee7d3540731ada3f78d5acd5c3b3736b222bff' '512b12a2f13129be62c008b4df0153f527dd7d71c2c5183de99dfa2a1c49dd8a' '3bfadf722da6773bdabdd25bdf78158648043d1b7e57615574f189a88ca865dd' - 'f2208c4f70373ff9b60f53d733f8071d4e390c384b776dfc04bf26c306882faf' - 'e44ac5095b4d88f24ec7b2e6a9f1581560bd3ad41a3d198596d67ef22f67adb9' - '98ace873c63e8e870286bce3ed53249aa2655cc1f53e7049061476e650ab06f1' '0b68c5ffbfeec090e950e5703e6b0519eafcb7eaf4fe2f64c355d0ddf17eed30') prepare() { @@ -28,10 +25,6 @@ ln -s /usr/bin/python2 path/python - echo -n "$(date +"%e %B %Y")" >date.xml - echo -n "$pkgver" >version.xml - xmlto man nss-config.xml - cd nss-$pkgver patch -Np1 -i ../enable-libpkix.patch @@ -53,31 +46,32 @@ } package_nss() { + local vmajor vminor vpatch cd nss-$pkgver - { read _vmajor; read _vminor; read _vpatch; } \ + { read vmajor; read vminor; read vpatch; } \ < <(awk '/#define.*NSS_V(MAJOR|MINOR|PATCH)/ {print $3}' nss/lib/nss/nss.h) - sed ../nss.pc.in \ + sed nss/pkg/pkg-config/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" | + -e "s,%NSPR_VERSION%,$_nsprver,g" \ + -e "s,%NSS_VERSION%,$pkgver,g" | install -Dm644 /dev/stdin "$pkgdir/usr/lib/pkgconfig/nss.pc" + ln -s nss.pc "$pkgdir/usr/lib/pkgconfig/mozilla-nss.pc" - sed ../nss-config.in \ + sed nss/pkg/pkg-config/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@,${_vmajor},g" \ - -e "s,@MOD_MINOR_VERSION@,${_vminor},g" \ - -e "s,@MOD_PATCH_VERSION@,${_vpatch},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/share/man/man1" -m644 ../nss-config.1 cd nss/doc/nroff install -Dt "$pkgdir/usr/share/man/man1" -m644 *util.1 signtool.1 signver.1 ssltap.1 @@ -92,6 +86,7 @@ install -Dt "$pkgdir/usr/lib" *.so install -Dt "$pkgdir/usr/lib" -m644 *.chk + # Replace built-in trust with p11-kit connection ln -sf libnssckbi-p11-kit.so "$pkgdir/usr/lib/libnssckbi.so" } Deleted: nss-config.in =================================================================== --- nss-config.in 2018-04-13 17:43:59 UTC (rev 321679) +++ nss-config.in 2018-04-13 17:50:49 UTC (rev 321680) @@ -1,145 +0,0 @@ -#!/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 - Deleted: nss-config.xml =================================================================== --- nss-config.xml 2018-04-13 17:43:59 UTC (rev 321679) +++ nss-config.xml 2018-04-13 17:50:49 UTC (rev 321680) @@ -1,132 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" - "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ -<!ENTITY date SYSTEM "date.xml"> -<!ENTITY version SYSTEM "version.xml"> -]> - -<refentry id="nss-config"> - - <refentryinfo> - <date>&date;</date> - <title>Network Security Services</title> - <productname>nss</productname> - <productnumber>&version;</productnumber> - </refentryinfo> - - <refmeta> - <refentrytitle>nss-config</refentrytitle> - <manvolnum>1</manvolnum> - </refmeta> - - <refnamediv> - <refname>nss-config</refname> - <refpurpose>Return meta information about nss libraries</refpurpose> - </refnamediv> - - <refsynopsisdiv> - <cmdsynopsis> - <command>nss-config</command> - <arg><option>--prefix</option></arg> - <arg><option>--exec-prefix</option></arg> - <arg><option>--includedir</option></arg> - <arg><option>--libs</option></arg> - <arg><option>--cflags</option></arg> - <arg><option>--libdir</option></arg> - <arg><option>--version</option></arg> - </cmdsynopsis> - </refsynopsisdiv> - -<refsection id="description"> - <title>Description</title> - - <para><command>nss-config</command> is a shell scrip - tool which can be used to obtain gcc options for building client pacakges of nspt. </para> - - </refsection> - - <refsection> - <title>Options</title> - - <variablelist> - <varlistentry> - <term><option>--prefix</option></term> - <listitem><simpara>Returns the top level system directory under which the nss libraries are installed.</simpara></listitem> - </varlistentry> - - <varlistentry> - <term><option>--exec-prefix</option></term> - <listitem><simpara>returns the top level system directory under which any nss binaries would be installed.</simpara></listitem> - </varlistentry> - - <varlistentry> - <term><option>--includedir</option> <replaceable>count</replaceable></term> - <listitem><simpara>returns the path to the directory were the nss libraries are installed.</simpara></listitem> - </varlistentry> - - <varlistentry> - <term><option>--version</option></term> - <listitem><simpara>returns the upstream version of nss in the form major_version-minor_version-patch_version.</simpara></listitem> - </varlistentry> - - <varlistentry> - <term><option>--libs</option></term> - <listitem><simpara>returns the compiler linking flags.</simpara></listitem> - </varlistentry> - - <varlistentry> - <term><option>--cflags</option></term> - <listitem><simpara>returns the compiler include flags.</simpara></listitem> - </varlistentry> - - <varlistentry> - <term><option>--libdir</option></term> - <listitem><simpara>returns the path to the directory were the nss libraries are installed.</simpara></listitem> - </varlistentry> - - </variablelist> - </refsection> - - <refsection> - <title>Examples</title> - - <para>The following example will query for both include path and linkage flags: - - <programlisting> - /usr/bin/nss-config --cflags --libs - </programlisting> - - </para> - - - </refsection> - - <refsection> - <title>Files</title> - - <para><filename>/usr/bin/nss-config</filename></para> - - </refsection> - - <refsection> - <title>See also</title> - <para>pkg-config(1)</para> - </refsection> - - <refsection id="authors"> - <title>Authors</title> - <para>The nss liraries were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</para> - <para> - Authors: Elio Maldonado <emald...@redhat.com>. - </para> - </refsection> - -<!-- don't change --> - <refsection id="license"> - <title>LICENSE</title> - <para>Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - </para> - </refsection> - -</refentry> - Deleted: nss.pc.in =================================================================== --- nss.pc.in 2018-04-13 17:43:59 UTC (rev 321679) +++ nss.pc.in 2018-04-13 17:50:49 UTC (rev 321680) @@ -1,11 +0,0 @@ -prefix=%prefix% -exec_prefix=%exec_prefix% -libdir=%libdir% -includedir=%includedir% - -Name: NSS -Description: Network Security Services -Version: %NSS_VERSION% -Requires: nspr >= %NSPR_VERSION% -Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3 -Cflags: -I${includedir}