pkgsrc-WIP-changes archive

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

terraform: Add a terraform meta package



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Sat Mar 27 15:22:11 2021 +0100
Changeset:	6717ee49e19af520c27141bcb9270a3fbd3e10b5

Modified Files:
	Makefile
Added Files:
	terraform/DESCR
	terraform/Makefile
	terraform/version.mk

Log Message:
terraform: Add a terraform meta package

Mostly inspired and several parts completely (and shamelessy!)
copypasted from lang/go.

This is intended to be reused by other wip/terraform{013,014} (and
hopefully a wip/terraform012 soon too!) packages and to store possible
glue for providers and probably to make several version of terraform
cohexist so they can be gradually migrated/updated.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6717ee49e19af520c27141bcb9270a3fbd3e10b5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile             |  1 +
 terraform/DESCR      |  3 +++
 terraform/Makefile   | 18 ++++++++++++++++++
 terraform/version.mk | 20 ++++++++++++++++++++
 4 files changed, 42 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index a1f7d5a213..b175b855ee 100644
--- a/Makefile
+++ b/Makefile
@@ -5383,6 +5383,7 @@ SUBDIR+=	termbox
 SUBDIR+=	terminology
 SUBDIR+=	termit
 SUBDIR+=	termshark
+SUBDIR+=	terraform
 SUBDIR+=	terraform-provider-archive
 SUBDIR+=	terraform-provider-template
 SUBDIR+=	terraform013
diff --git a/terraform/DESCR b/terraform/DESCR
new file mode 100644
index 0000000000..72b77a5c62
--- /dev/null
+++ b/terraform/DESCR
@@ -0,0 +1,3 @@
+This is a meta package providing the preferred version of Terraform.
+
+No package should depend on this package directly.
diff --git a/terraform/Makefile b/terraform/Makefile
new file mode 100644
index 0000000000..64f99ab946
--- /dev/null
+++ b/terraform/Makefile
@@ -0,0 +1,18 @@
+# $NetBSD$
+
+DISTNAME=	# empty
+PKGNAME=	terraform-${TERRAFORM${TERRAFORMVERSSUFFIX}_VERSION}
+CATEGORIES=	net
+MASTER_SITES=	# empty
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.terraform.io/
+COMMENT=	Meta package providing preferred version of Terraform
+LICENSE=	mpl-2.0
+
+META_PACKAGE=	yes
+
+DEPENDS+=	${TERRAFORM_PACKAGE_DEP}
+
+.include "../../wip/terraform/version.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/terraform/version.mk b/terraform/version.mk
new file mode 100644
index 0000000000..b289787773
--- /dev/null
+++ b/terraform/version.mk
@@ -0,0 +1,20 @@
+# $NetBSD$
+
+TERRAFORM014_VERSION=	0.14.9
+#TERRAFORM013_VERSION=	TODO
+#TERRAFORM012_VERSION=	TODO
+
+.include "../../mk/bsd.prefs.mk"
+
+TERRAFORM_VERSION_DEFAULT?=	014
+
+.if !empty(TERRAFORM_VERSION_DEFAULT)
+TERRAFORMVERSSUFFIX=		${TERRAFORM_VERSION_DEFAULT}
+.endif
+
+# Preferred version dependency for Terraform
+TERRAFORM_PACKAGE_DEP=		terraform${TERRAFORMVERSSUFFIX}-${TERRAFORM${TERRAFORMVERSSUFFIX}_VERSION}*:../../wip/terraform${TERRAFORMVERSSUFFIX}
+
+PLIST_SUBST+=	TERRAFORMVERSSUFFIX=${TERRAFORMVERSSUFFIX:Q}
+
+PRINT_PLIST_AWK+=	{ sub("${TERRAFORMVERSSUFFIX}", "$${TERRAFORMVERSSUFFIX}") }


Home | Main Index | Thread Index | Old Index