pkgsrc/security/mozilla-rootcerts/Makefile
gdt 2d84716b8c Revert touching of openssl config file
Earlier, code was added to "touch $conffile" to work around openssl
issuing a warning if openssl.conf was not present.  This is
problematic because if the warning is appropriate, 1) we have no way
of knowing that an empty config file is correct and 2) we should not
silence it.  If the warning is buggy, then openssl and/or the base
system should be fixed.  Further, this code changes the modification
date of the config file on every run, even when there is a valid
config file.

(There was no discussion prior, three objections and no concurrences,
and no response, so reverting seems ok.)
2017-06-19 00:37:48 +00:00

61 lines
1.9 KiB
Makefile

# $NetBSD: Makefile,v 1.29 2017/06/19 00:37:48 gdt Exp $
DISTNAME= mozilla-rootcerts-1.0.${CERTDATA_DATE}
PKGREVISION= 5
CATEGORIES= security
MASTER_SITES= -https://hg.mozilla.org/mozilla-central/raw-file/052b90b5414f/security/nss/lib/ckfw/builtins/certdata.txt
DISTFILES= ${CERTDATA}
EXTRACT_SUFX= # empty
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://hg.mozilla.org/mozilla-central/log/tip/security/nss/lib/ckfw/builtins/certdata.txt
COMMENT= Root CA certificates from the Mozilla Project
LICENSE= mpl-2.0
USE_TOOLS= awk:run echo:run expr:run ln:run ls:run openssl:run rm:run mkdir:run
# This must be kept in sync with security/mozilla-rootcerts-openssl
CERTDATA_DATE= 20170121
CERTDATA= certdata-${CERTDATA_DATE}.txt
WRKSRC= ${WRKDIR}
DATADIR= ${PREFIX}/share/${PKGBASE}
# Set paths depending on whether we depend on builtin or pkgsrc openssl.
CHECK_BUILTIN.openssl= yes
.include "../../security/openssl/builtin.mk"
CHECK_BUILTIN.openssl= no
.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS])
SSLDIR= /etc/openssl
.else
SSLDIR= ${PKG_SYSCONFDIR}/openssl
.endif
CERT_SCRIPT= mozilla-rootcerts.sh
SUBST_CLASSES= paths
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_SED.paths= -e 's,@OPENSSL@,${TOOLS_PATH.openssl},g'
INSTALLATION_DIRS= sbin ${DATADIR}
do-extract:
${CP} ${FILESDIR}/${CERT_SCRIPT} ${WRKSRC}
${CP} ${DISTDIR}/${CERTDATA} ${WRKSRC}
do-build:
${MKDIR} ${WRKSRC}/certs
cd ${WRKSRC}/certs && \
${SH} ${WRKSRC}/${CERT_SCRIPT} -f ${WRKSRC}/${CERTDATA} extract
${LS} -rt ${WRKSRC}/certs/*.pem | ${XARGS} ${CAT} >${WRKSRC}/cacert.pem
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/${CERT_SCRIPT} \
${DESTDIR}${PREFIX}/sbin/mozilla-rootcerts
${INSTALL_DATA} ${WRKSRC}/${CERTDATA} ${DESTDIR}${DATADIR}/certdata.txt
${INSTALL_DATA} ${WRKSRC}/cacert.pem ${DESTDIR}${DATADIR}/cacert.pem
.include "../../mk/bsd.pkg.mk"