[Help] Package a formula with a single executable Perl script? #2021
Answered
by
SMillerDev
tddschn
asked this question in
Writing Formulae/Casks
-
I want to package a formula that contains a single executable Perl script, h2c. It doesn't need to be configured or compiled, and the tarball doesn't contain a I'm not familiar with ruby or perl, can anyone help me write the TIA. The code for the formulaclass H2c < Formula
desc "headers 2 curl. Provided a set of HTTP request headers, output the curl command line for generating that set. Try the converter online at"
homepage "https://curl.se/h2c/"
url "https://github.com/curl/h2c/archive/fee2a0361b4124dbd5565cee2a90ffb0c80ab7b0.zip"
sha256 "a8748da23ea6ed79870c0bf5990b35d082593c26e598b16bc8b6e8f5ccf4f5f7"
license "MIT"
def install
# ENV.deparallelize # if your formula fails when building in parallel
# Remove unrecognized options if warned by configure
# https://rubydoc.brew.sh/Formula.html#std_configure_args-instance_method
system "./configure", *std_configure_args, "--disable-silent-rules"
# system "cmake", "-S", ".", "-B", "build", *std_cmake_args
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core
# this will need to be a test that verifies the functionality of the
# software. Run the test with `brew test h2c`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "false"
end
end |
Beta Was this translation helpful? Give feedback.
Answered by
SMillerDev
Aug 22, 2021
Replies: 1 comment
-
You'd need to rewrite the shebang to use You can check other formulae that use perl for inspiration. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tddschn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'd need to rewrite the shebang to use
#!/bin/env
and usebin.install
to install the file.You can check other formulae that use perl for inspiration.