Skip to content

Commit

Permalink
netatalk 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EricFromCanada authored and daeho-ro committed Jan 12, 2025
1 parent eadbee5 commit 8cc163e
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions Formula/n/netatalk.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Netatalk < Formula

Check warning on line 1 in Formula/n/netatalk.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew linkage --cached --test --strict netatalk` failed on Linux!

linux-pam
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"
url "https://github.com/Netatalk/netatalk/releases/download/netatalk-4-1-0/netatalk-4.1.0.tar.xz"
sha256 "96f70e0e67af6159b1465388a48d30df207f465377205ee932a1ef22617e0331"
license all_of: [
"GPL-2.0-only",
"GPL-2.0-or-later",
Expand Down Expand Up @@ -32,7 +32,7 @@ class Netatalk < Formula
depends_on "cracklib"
depends_on "libevent"
depends_on "libgcrypt"
depends_on "mysql"
depends_on "mariadb"
depends_on "openldap" # macOS LDAP.Framework is not fork safe

uses_from_macos "libxslt" => :build
Expand All @@ -47,11 +47,6 @@ class Netatalk < Formula
depends_on "libtirpc" # on macOS we use native RPC instead
end

patch do
url "https://github.com/Netatalk/netatalk/commit/206fb7771862b9b98452c934dac884aaa397c8ca.patch?full_index=1"
sha256 "fd448734556daf0344be4fa0bb09e4704c4123078ad804069d288aa0e3e104d6"
end

def install
inreplace "distrib/initscripts/macos.netatalk.in", "@sbindir@", opt_sbin
inreplace "distrib/initscripts/macos.netatalk.plist.in", "@bindir@", opt_bin
Expand All @@ -67,6 +62,7 @@ def install
"-Dwith-init-dir=#{prefix}",
"-Dwith-init-hooks=false",
"-Dwith-install-hooks=false",
"-Dwith-lockfile-path=#{var}/run",
"-Dwith-statedir-path=#{var}",
"-Dwith-pam-config-path=#{etc}/pam.d",
"-Dwith-rpath=false",
Expand All @@ -83,6 +79,23 @@ def install
require_root true
end

def caveats
on_macos do
on_arm do
<<~EOS
Authenticating as a system user requires manually installing the
PAM configuration file to a predetermined location by running:
sudo install -d -o $USER -g admin /usr/local/etc
mkdir -p /usr/local/etc/pam.d
cp $(brew --prefix)/etc/pam.d/netatalk /usr/local/etc/pam.d
See `man pam.conf` for more information.
EOS
end
end
end

test do
system sbin/"netatalk", "-V"
system sbin/"afpd", "-V"
Expand Down

0 comments on commit 8cc163e

Please sign in to comment.