08c9518ac8
The logic to find a Python executable can be summarized as: - CLOUDSDK_PYTHON environment variable defined: + If it matches `*python2*', use it - Otherwise: + Try `python2' + Fallback to `python' Substitute the latter fallback to ${PYTHONBIN} in order to have a safe choice. Should fix PR pkg/52122 reported by <jklos>. This patch is based on the one proposed by <maya> (but restricted to CLOUDSDK_PYTHON lines and the fallback `python'). Bump PKGREVISION.
48 lines
1.4 KiB
Makefile
48 lines
1.4 KiB
Makefile
# $NetBSD: Makefile,v 1.4 2018/07/08 12:22:56 leot Exp $
|
|
|
|
GCLOUDVER= 96.0.0
|
|
DISTNAME= google-cloud-sdk-${GCLOUDVER}-linux-x86
|
|
PKGNAME= ${PYPKGPREFIX}-google-cloud-sdk-${GCLOUDVER}
|
|
PKGREVISION= 1
|
|
CATEGORIES= net
|
|
MASTER_SITES= https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/
|
|
|
|
MAINTAINER= ryoon@NetBSD.org
|
|
HOMEPAGE= https://cloud.google.com/sdk/
|
|
COMMENT= Google Cloud SDK (for Compute Engine etc.)
|
|
LICENSE= apache-2.0
|
|
|
|
GCSWRKSUBDIR= google-cloud-sdk
|
|
WRKSRC= ${WRKDIR}/${GCSWRKSUBDIR}
|
|
NO_BUILD= yes
|
|
|
|
USE_TOOLS+= pax
|
|
|
|
REPLACE_PYTHON+= bin/*
|
|
REPLACE_PYTHON+= bin/bootstrapping/*
|
|
|
|
PLIST_SUBST+= PYPKGPREFIX=${PYPKGPREFIX}
|
|
MESSAGE_SUBST+= PYPKGPREFIX=${PYPKGPREFIX}
|
|
|
|
SUBST_CLASSES+= python
|
|
SUBST_STAGE.python= pre-configure
|
|
SUBST_MESSAGE.python= Replacing hard coded python executable name
|
|
SUBST_FILES.python= lib/googlecloudsdk/core/*
|
|
SUBST_FILES.python+= bin/*
|
|
SUBST_SED.python= -e "/CLOUDSDK_PYTHON=/ s,python$$,${PYTHONBIN},"
|
|
|
|
INSTALLATION_DIRS= ${PKGBASE}
|
|
|
|
do-install:
|
|
cd ${WRKDIR} && \
|
|
${FIND} ${GCSWRKSUBDIR} -type d -exec chmod 755 {} \;
|
|
cd ${WRKDIR} && \
|
|
${FIND} ${GCSWRKSUBDIR} -type f -exec chmod 644 {} \;
|
|
cd ${WRKDIR} && \
|
|
${FIND} ${GCSWRKSUBDIR}/bin -type f -exec chmod 755 {} \;
|
|
cd ${WRKDIR}/${GCSWRKSUBDIR} && \
|
|
${FIND} . -type f \! -name '*.orig' -print | \
|
|
pax -rw -pmp ${DESTDIR}${PREFIX}/${PKGBASE}
|
|
|
|
.include "../../lang/python/application.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|