Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # $OpenBSD: Makefile,v 1.73 2017/06/15 07:24:09 ajacoutot Exp $
  2. COMMENT= manage resources on Google's Cloud Platform
  3. V= 159.0.0
  4. DISTNAME= google-cloud-sdk-${V}-linux-x86
  5. PKGNAME= google-cloud-sdk-${V}
  6. WRKDIST= ${WRKDIR}/google-cloud-sdk
  7. CATEGORIES= sysutils
  8. HOMEPAGE= https://developers.google.com/cloud/sdk
  9. MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
  10. # Apache 2.0
  11. PERMIT_PACKAGE_CDROM= Yes
  12. MASTER_SITES= https://dl.google.com/dl/cloudsdk/release/downloads/
  13. MODULES= lang/python
  14. RUN_DEPENDS= devel/git
  15. NO_TEST= Yes
  16. do-build:
  17. # cannot set NO_BUILD=Yes because it would remove the dependency on python
  18. pre-configure:
  19. # wildcard, cannot use MODPY_ADJ_FILES
  20. find ${WRKSRC}/bin{,/bootstrapping}/* -type f -exec \
  21. ${MODPY_BIN_ADJ} '{}' \+
  22. ${SUBST_CMD} ${WRKSRC}/lib/googlecloudsdk/core/config.py \
  23. ${WRKSRC}/bin/{bq,docker-credential-gcloud,gcloud,git-credential-gcloud.sh,gsutil}
  24. do-install:
  25. cp -Rp ${WRKSRC} ${PREFIX}
  26. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/google-cloud-sdk \
  27. ${PREFIX}/share/zsh/vendor-completions \
  28. ${PREFIX}/share/bash-completion/completions
  29. mv ${PREFIX}/google-cloud-sdk/help/man/man1/* ${PREFIX}/man/man1/
  30. mv ${PREFIX}/google-cloud-sdk/{LICENSE,README,RELEASE_NOTES} \
  31. ${PREFIX}/share/doc/google-cloud-sdk
  32. mv ${PREFIX}/google-cloud-sdk/completion.bash.inc \
  33. ${PREFIX}/share/bash-completion/completions/google-cloud-sdk
  34. mv ${PREFIX}/google-cloud-sdk/completion.zsh.inc \
  35. ${PREFIX}/share/zsh/vendor-completions/_google-cloud-sdk
  36. rm -rf ${PREFIX}/google-cloud-sdk/{.install,install.{sh,bat},help}
  37. rm -rf ${PREFIX}/google-cloud-sdk/path.{bash,zsh}.inc
  38. find ${PREFIX} -type f \( -name '*.beforesubst' -or -name '*.orig' \) \
  39. -exec rm '{}' \+
  40. find ${PREFIX} -type d -name python3 -exec rm -rf '{}' \+
  41. # XXX ||true: ignore python >=3.5 syntax in unused examples
  42. ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
  43. ${PREFIX}/google-cloud-sdk/{lib,platform} || true
  44. chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/google-cloud-sdk
  45. chown -R ${BINOWN}:${BINGRP} ${PREFIX}/google-cloud-sdk/bin
  46. chown -R ${MANOWN}:${MANGRP} ${PREFIX}/man1
  47. .include <bsd.port.mk>