Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 10 additions & 24 deletions Formula/s/softhsm.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
class Softhsm < Formula
desc "Cryptographic store accessible through a PKCS#11 interface"
homepage "https://www.opendnssec.org/en/latest/softhsm/"
url "https://github.com/opendnssec/opendnssec/releases/download/2.1.14/softhsm-2.6.1.tar.gz"
sha256 "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614df475f2"
homepage "https://www.softhsm.org/"
url "https://github.com/softhsm/SoftHSMv2/archive/refs/tags/2.7.0.tar.gz"
sha256 "be14a5820ec457eac5154462ffae51ba5d8a643f6760514d4b4b83a77be91573"
license "BSD-2-Clause"

# We check the GitHub repo tags instead of https://dist.opendnssec.org/source/
# since the aforementioned first-party URL has a tendency to lead to an
# `execution expired` error.
livecheck do
url :head
regex(/^v?(\d+(?:\.\d+)+)$/i)
end

no_autobump! because: :requires_manual_review
head "https://github.com/opendnssec/SoftHSMv2.git", branch: "main"

bottle do
rebuild 3
Expand All @@ -25,19 +16,14 @@ class Softhsm < Formula
sha256 x86_64_linux: "264fceddb0f4bce4bee697b2868f2d352768f4384088574b2f711b7af6894dd6"
end

head do
url "https://github.com/opendnssec/SoftHSMv2.git", branch: "develop"

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkgconf" => :build
end

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkgconf" => :build
depends_on "openssl@3"

def install
system "sh", "./autogen.sh" if build.head?
system "./autogen.sh"
system "./configure", "--disable-silent-rules",
"--localstatedir=#{var}",
"--sysconfdir=#{pkgetc}",
Expand All @@ -52,7 +38,7 @@ def install

test do
(testpath/"softhsm2.conf").write("directories.tokendir = #{testpath}")
ENV["SOFTHSM2_CONF"] = "#{testpath}/softhsm2.conf"
ENV["SOFTHSM2_CONF"] = testpath/"softhsm2.conf"
system bin/"softhsm2-util", "--init-token", "--slot", "0",
"--label", "testing", "--so-pin", "1234",
"--pin", "1234"
Expand Down
Loading