Skip to content

Commit

Permalink
Update doas.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Neved4 committed Oct 25, 2024
1 parent f494fad commit e2e9e97
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Formula/doas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ class Doas < Formula
license "BSD-2-Clause"
head "https://github.com/slicer69/doas.git", branch: "master"

bottle do
root_url "https://github.com/Neved4/homebrew-tap/releases/download/doas-6.3p12"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "3973d3f674d9de9fe6402e108064524105f82af8cf464ba97f22cb1a73742a03"
sha256 cellar: :any_skip_relocation, ventura: "2addf400597918085b22645fb17d45c9cd420298a9cdb60a41540d7d6c4c6eb8"
sha256 cellar: :any_skip_relocation, monterey: "a922ab3545bb5714dc994b77a4e81e6653422f34de7072cce2d78203cbd99c34"
end

depends_on :macos
depends_on "bison" => :build
depends_on :macos # Linux: doas.c:49:10: fatal error: security/pam_appl.h

def install
system "YACC=bison -y", "make", "PREFIX=#{prefix}", "SYSCONFDIR=#{etc}", "install"
ENV["YACC"] = "#{Formula["bison"].opt_bin}/bison -y" if OS.mac?
system "make", "PREFIX=#{prefix}", "SYSCONFDIR=#{etc}", "install"
end

def post_install
chmod 4755, bin/"doas"
ohai "Please copy the PAM configuration file manually:"
ohai "sudo cp /etc/pam.d/sudo /etc/pam.d/doas"
end
end

0 comments on commit e2e9e97

Please sign in to comment.