66 lines
1.7 KiB
Ruby
66 lines
1.7 KiB
Ruby
class Openldap < Formula
|
|
desc "Open source suite of directory software"
|
|
homepage "https://www.openldap.org/software/"
|
|
url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.51.tgz"
|
|
sha256 "f490775ea4c6506b7210ee55a102c8f4aacfe9d1c8eaa633c7316d33a714be62"
|
|
license "OLDAP-2.8"
|
|
|
|
livecheck do
|
|
url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/"
|
|
regex(/href=.*?openldap[._-]v?(\d+(?:\.\d+)*)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 "26db6176077e01a879f2ff302ea0b48974a15a410ad03cb69b6a27275d436e86" => :catalina
|
|
sha256 "8ebb1a0d4c6d3249643aef4e47999b8d6219fa9aca5612a0b72021e824b70e3e" => :mojave
|
|
sha256 "62443a74a9ebb1598615485d934ce20f26701f3991cac2346d7f6cf1fb42dea8" => :high_sierra
|
|
end
|
|
|
|
keg_only :provided_by_macos
|
|
|
|
depends_on "openssl@1.1"
|
|
|
|
on_linux do
|
|
depends_on "util-linux"
|
|
end
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--sysconfdir=#{etc}
|
|
--localstatedir=#{var}
|
|
--enable-accesslog
|
|
--enable-auditlog
|
|
--enable-bdb=no
|
|
--enable-constraint
|
|
--enable-dds
|
|
--enable-deref
|
|
--enable-dyngroup
|
|
--enable-dynlist
|
|
--enable-hdb=no
|
|
--enable-memberof
|
|
--enable-ppolicy
|
|
--enable-proxycache
|
|
--enable-refint
|
|
--enable-retcode
|
|
--enable-seqmod
|
|
--enable-translucent
|
|
--enable-unique
|
|
--enable-valsort
|
|
]
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
(var/"run").mkpath
|
|
|
|
# https://github.com/Homebrew/homebrew-dupes/pull/452
|
|
chmod 0755, Dir[etc/"openldap/*"]
|
|
chmod 0755, Dir[etc/"openldap/schema/*"]
|
|
end
|
|
|
|
test do
|
|
system sbin/"slappasswd", "-s", "test"
|
|
end
|
|
end
|