-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
opentofu: add package #27825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
opentofu: add package #27825
Conversation
Initial packaging for OpenTofu v1.11.2.
|
I am curious about something, could you provide an example of what you are going to use |
| TERMUX_PKG_SRCURL=https://github.com/opentofu/opentofu/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz | ||
| TERMUX_PKG_SHA256=ff95091fef8d413938025f7605311cf9b1ef2d1a1a19ee575dafa4ecf5774e0c | ||
| TERMUX_PKG_AUTO_UPDATE=true | ||
| TERMUX_PKG_DEPENDS="git" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| termux_step_make_install() { | ||
| install -Dm700 -t "${TERMUX_PREFIX}"/bin \ | ||
| "${GOPATH}"/src/github.com/opentofu/opentofu/tofu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If TERMUX_PKG_BUILD_IN_SRC=true is specified this just becomes directly relative to the build directory.
| "${GOPATH}"/src/github.com/opentofu/opentofu/tofu | |
| src/github.com/opentofu/opentofu/tofu |
| # Use the local Go toolchain (downloading alternate toolchains is not supported here). | ||
| export GOTOOLCHAIN=local | ||
|
|
||
| export GOPATH="${TERMUX_PKG_BUILDDIR}" | ||
|
|
||
| mkdir -p "${GOPATH}"/src/github.com/opentofu | ||
| cp -a "${TERMUX_PKG_SRCDIR}" "${GOPATH}"/src/github.com/opentofu/opentofu | ||
|
|
||
| cd "${GOPATH}"/src/github.com/opentofu/opentofu | ||
|
|
||
| local _goversion | ||
| _goversion="$(go env GOVERSION | sed 's/^go//')" | ||
| sed -i "s/^go [0-9.]*$/go ${_goversion}/" go.mod | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can skip all of this by just specifying TERMUX_PKG_BUILD_IN_SRC=true above.
| # Use the local Go toolchain (downloading alternate toolchains is not supported here). | |
| export GOTOOLCHAIN=local | |
| export GOPATH="${TERMUX_PKG_BUILDDIR}" | |
| mkdir -p "${GOPATH}"/src/github.com/opentofu | |
| cp -a "${TERMUX_PKG_SRCDIR}" "${GOPATH}"/src/github.com/opentofu/opentofu | |
| cd "${GOPATH}"/src/github.com/opentofu/opentofu | |
| local _goversion | |
| _goversion="$(go env GOVERSION | sed 's/^go//')" | |
| sed -i "s/^go [0-9.]*$/go ${_goversion}/" go.mod |
Build/test: