87 lines
2.1 KiB
Ruby
87 lines
2.1 KiB
Ruby
class Strongswan < Formula
|
|
desc "VPN based on IPsec"
|
|
homepage "https://www.strongswan.org"
|
|
url "https://download.strongswan.org/strongswan-5.9.0.tar.bz2"
|
|
sha256 "72b47a385da5d1532b816d9fe04c50d074c29ed42ea3f0878fbd66335917bb66"
|
|
|
|
livecheck do
|
|
url "https://download.strongswan.org/"
|
|
regex(/href=.*?strongswan[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 "99c553658a5410e74a836b248b6a4fecadc08c40faef552f4bca7eed4d7ad60c" => :catalina
|
|
sha256 "3d1b72f69ac954e32acd44720259dcea17fafd64003bb6482aeb6b8713fe6d52" => :mojave
|
|
sha256 "00948b264bddee07a9dc275534e6316af318c5c1fe8196117fc2adb628352f33" => :high_sierra
|
|
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
|