pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/mozilla-rootcerts Regularize path subsitution...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/88c87fa177d1
branches:  trunk
changeset: 364847:88c87fa177d1
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Thu Jul 06 00:58:35 2017 +0000

description:
Regularize path subsitution and use PREFIX

Use PREFIX rather than LOCALBASE.  What matters is where this packages
prefix is, not anything else.

Substitute all paths the same way, assigning to sh variables in one
place, alphabetically, and then using them.  Sort list of substituted
variables alphabetically also, so it's easier to review the code.

No functional change for any reasonable configuration.

Based on a suggestion by J. Lewis Muir on pkgsrc-users.

diffstat:

 security/mozilla-rootcerts/Makefile                   |  6 +++---
 security/mozilla-rootcerts/files/mozilla-rootcerts.sh |  8 +++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r 6197b8722a0c -r 88c87fa177d1 security/mozilla-rootcerts/Makefile
--- a/security/mozilla-rootcerts/Makefile       Wed Jul 05 23:55:54 2017 +0000
+++ b/security/mozilla-rootcerts/Makefile       Thu Jul 06 00:58:35 2017 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.30 2017/06/22 00:30:10 gdt Exp $
+# $NetBSD: Makefile,v 1.31 2017/07/06 00:58:35 gdt Exp $
 
 DISTNAME=      mozilla-rootcerts-1.0.${CERTDATA_DATE}
-PKGREVISION=   5
+PKGREVISION=   6
 CATEGORIES=    security
 MASTER_SITES=  -https://hg.mozilla.org/mozilla-central/raw-file/052b90b5414f/security/nss/lib/ckfw/builtins/certdata.txt
 DISTFILES=     ${CERTDATA}
@@ -40,7 +40,7 @@
 SUBST_MESSAGE.paths=   Replacing hard-coded paths.
 SUBST_STAGE.paths=     post-configure
 SUBST_FILES.paths=     ${CERT_SCRIPT}
-SUBST_VARS.paths=      AWK ECHO EXPR LN LOCALBASE LS RM DATADIR MKDIR SSLDIR
+SUBST_VARS.paths=      AWK DATADIR ECHO EXPR LN LS MKDIR PREFIX SSLDIR RM
 SUBST_SED.paths=       -e 's,@OPENSSL@,${TOOLS_PATH.openssl},g'
 
 INSTALLATION_DIRS=     sbin ${DATADIR}
diff -r 6197b8722a0c -r 88c87fa177d1 security/mozilla-rootcerts/files/mozilla-rootcerts.sh
--- a/security/mozilla-rootcerts/files/mozilla-rootcerts.sh     Wed Jul 05 23:55:54 2017 +0000
+++ b/security/mozilla-rootcerts/files/mozilla-rootcerts.sh     Thu Jul 06 00:58:35 2017 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: mozilla-rootcerts.sh,v 1.18 2017/06/19 00:39:53 gdt Exp $
+# $NetBSD: mozilla-rootcerts.sh,v 1.19 2017/07/06 00:58:35 gdt Exp $
 #
 # This script is meant to be used as follows:
 #
@@ -10,17 +10,19 @@
 #
 
 : ${AWK=@AWK@}
+: ${DATADIR=@DATADIR@}
 : ${ECHO=@ECHO@}
 : ${EXPR=@EXPR@}
 : ${LN=@LN@}
 : ${LS=@LS@}
 : ${MKDIR=@MKDIR@}
 : ${OPENSSL=@OPENSSL@}
+: ${PREFIX=@PREFIX@}
 : ${SSLDIR=@SSLDIR@}
 : ${RM=@RM@}
 
-self="@LOCALBASE@/sbin/mozilla-rootcerts"
-certfile="@DATADIR@/certdata.txt"
+self="${PREFIX}/sbin/mozilla-rootcerts"
+certfile="${DATADIR}/certdata.txt"
 certdir=${SSLDIR}/certs
 destdir=
 



Home | Main Index | Thread Index | Old Index