From 72a454a998129d6a0c22ddbca199f88aec6119e6 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Sun, 29 Dec 2024 14:15:34 +0100 Subject: [PATCH] netatalk 4.0.8 --- Formula/n/netatalk.rb | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Formula/n/netatalk.rb diff --git a/Formula/n/netatalk.rb b/Formula/n/netatalk.rb new file mode 100644 index 00000000000000..0275bfd30f4ec5 --- /dev/null +++ b/Formula/n/netatalk.rb @@ -0,0 +1,59 @@ +class Netatalk < Formula + desc "File server for Macs, compliant with Apple Filing Protocol (AFP)" + homepage "https://netatalk.io" + url "https://github.com/Netatalk/netatalk/releases/download/netatalk-4-0-8/netatalk-4.0.8.tar.xz" + sha256 "d09d591521b27b91b1c2a6255a2e059af8c9fda43570f983f0a145706e5f7628" + license all_of: [ + "GPL-2.0-only", + "GPL-2.0-or-later", + "LGPL-2.0-only", + "LGPL-2.1-or-later", + "BSD-2-Clause", + "BSD-3-Clause", + "MIT", + ] + head "https://github.com/Netatalk/netatalk.git", branch: "main" + + depends_on "docbook-xsl" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "berkeley-db@5" # macOS bdb library lacks DBC type etc. + depends_on "libevent" + depends_on "libgcrypt" + depends_on "mysql" + depends_on "openldap" # LDAP.Framework is not fork safe + + uses_from_macos "libxslt" => :build + uses_from_macos "perl" + + if OS.linux? + depends_on "avahi" + depends_on "dbus" + end + + def install + args = [ + "-Dwith-afpstats=false", + "-Dwith-appletalk=#{OS.linux?}", + "-Dwith-bdb-path=#{Formula["berkeley-db@5"].opt_prefix}", + "-Dwith-docbook-path=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl", + "-Dwith-init-style=none", + "-Dwith-install-hooks=false", + "-Dwith-pam-config-path=#{etc}/pam.d", + "-Dwith-rpath=false", + "-Dwith-spotlight=false", + ] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system sbin/"netatalk", "-V" + system sbin/"afpd", "-V" + assert_empty shell_output(sbin/"netatalk") + end +end