89 lines
2.3 KiB
Ruby
89 lines
2.3 KiB
Ruby
class Strongswan < Formula
|
|
desc "VPN based on IPsec"
|
|
homepage "https://www.strongswan.org"
|
|
url "https://download.strongswan.org/strongswan-5.9.3.tar.bz2"
|
|
sha256 "9325ab56a0a4e97e379401e1d942ce3e0d8b6372291350ab2caae0755862c6f7"
|
|
license "GPL-2.0-or-later"
|
|
|
|
livecheck do
|
|
url "https://download.strongswan.org/"
|
|
regex(/href=.*?strongswan[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 arm64_big_sur: "0f1e4ce71721da3159ae758863a23e94daf4830d3c84eb431d8edfb673b1a51c"
|
|
sha256 big_sur: "210a8f1fe7469c4f660259de33605226f5fa6c02436888754a581e0f35c8f607"
|
|
sha256 catalina: "bec3e5c02784130c788a861c3ac78e88b8080f825e9ac3ec9a575891a341de6d"
|
|
sha256 mojave: "307035e5a5807685ba2c960a4ec68d533039d3a3157adf351108e63b7db551c2"
|
|
end
|
|
|
|
head do
|
|
url "https://git.strongswan.org/strongswan.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "bison" => :build
|
|
depends_on "gettext" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "pkg-config" => :build
|
|
end
|
|
|
|
depends_on "openssl@1.1"
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--sbindir=#{bin}
|
|
--sysconfdir=#{etc}
|
|
--disable-defaults
|
|
--enable-charon
|
|
--enable-cmd
|
|
--enable-constraints
|
|
--enable-curve25519
|
|
--enable-eap-gtc
|
|
--enable-eap-identity
|
|
--enable-eap-md5
|
|
--enable-eap-mschapv2
|
|
--enable-ikev1
|
|
--enable-ikev2
|
|
--enable-kernel-pfkey
|
|
--enable-kernel-pfroute
|
|
--enable-nonce
|
|
--enable-openssl
|
|
--enable-osx-attr
|
|
--enable-pem
|
|
--enable-pgp
|
|
--enable-pkcs1
|
|
--enable-pkcs8
|
|
--enable-pki
|
|
--enable-pubkey
|
|
--enable-revocation
|
|
--enable-scepclient
|
|
--enable-socket-default
|
|
--enable-sshkey
|
|
--enable-stroke
|
|
--enable-swanctl
|
|
--enable-unity
|
|
--enable-updown
|
|
--enable-x509
|
|
--enable-xauth-generic
|
|
]
|
|
|
|
system "./autogen.sh" if build.head?
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
You will have to run both "ipsec" and "charon-cmd" with "sudo".
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/ipsec", "--version"
|
|
system "#{bin}/charon-cmd", "--version"
|
|
end
|
|
end
|