ra3xdh / qucs_s

Qucs-S is a circuit simulation program with Qt-based GUI
https://ra3xdh.github.io/
GNU General Public License v2.0
797 stars 101 forks source link

[MacOS] add Qucs-S to homebrew package manager #804

Closed dsm closed 1 week ago

dsm commented 3 weeks ago

Hi,

It would be good to add qucs-s to homebrew.

https://docs.brew.sh/Adding-Software-to-Homebrew#casks

dsm commented 2 weeks ago

@ra3xdh can you look at the ngspice homebrew build configuration for macos is OK for qucs-s.

ngspice.rb

ra3xdh commented 2 weeks ago

Yes, the ngspice build configuration contains all necessary options set.

dsm commented 2 weeks ago

I'll add qucs-s continuous to homebrew below is the draft.

cask "qucs-s@nightly" do
  version "24.2.1"
  arch arm: "arm64", intel: "x86_64"

  url "https://github.com/ra3xdh/qucs_s/releases/download/continuous_build/Qucs-S-#{version}-macOS-#{arch}.dmg",
      verified: "github.com/ra3xdh/qucs_s/"

  name "Qucs-S"
  desc "Quite Universal Circuit Simulator with SPICE"
  homepage "https://ra3xdh.github.io/"

  depends_on formula: "ngspice"

  livecheck do
    url :url
    regex(%r{href=.*?/Qucs-S[._-]v?(\d+(?:\.\d+)+)-macOS-(arm64|x86_64)\.dmg}i)
  end

  app "qucs-s.app", target: "Qucs-S.app"

  zap trash: [
    "~/Library/Application Support/qucs-s",
    "~/Library/Preferences/com.example.qucs-s.plist",
    "~/Library/Saved Application State/com.example.qucs-s.savedState",
  ]
end
dsm commented 1 week ago

I created this PR to solve this issue, https://github.com/Homebrew/homebrew-cask/pull/179918

dsm commented 1 week ago

this is the final code for to add cask to brew but macos on arm binaries must be sign and notarize and my PR discarded so we need apple developer account but no one can afford this $99 fee so issue should be close.

cask "qucs-s@nightly" do
  arch arm: "arm64", intel: "x86_64"

  version "24.2.1"
  sha256 :no_check

  url "https://github.com/ra3xdh/qucs_s/releases/download/continuous_build/Qucs-S-#{version}-macOS-#{arch}.dmg",
      verified: "github.com/ra3xdh/qucs_s/"
  name "Qucs-S"
  desc "Quite Universal Circuit Simulator with SPICE"
  homepage "https://ra3xdh.github.io/"

  livecheck do
    url :url
    strategy :github_latest
  end

  depends_on formula: "ngspice"

  app "qucs-s.app", target: "Qucs-S.app"

  zap trash: [
    "$HOME/Library/Application Support/qucs-s",
    "$HOME/Library/Preferences/com.example.qucs-s.plist",
    "$HOME/Library/Saved Application State/com.example.qucs-s.savedState",
  ]
ra3xdh commented 1 week ago

@dsm Thanks for effort. I don't consider buying Apple developer certificate to sign the binaries. We can try the approach using own tap. I can create an empty repository for example qucs_s_tap at my ra3xdh account. Then you will create a PR to upload a necessary files. After the tap setup has finished I will update the installation instructions at the Qucs-S website.

dsm commented 1 week ago

in repo name should has homebrew- prefix ex. homebrew-qucs-s and then below commands works.

brew tap ra3xdh/qucs-s && brew install qucs-s

repository-naming-conventions-and-assumptions

ra3xdh commented 1 week ago

@dsm I have just created https://github.com/ra3xdh/homebrew-qucs-s and invited you as collaborator. You may send PR or use direct push to populate this repository. Then please send me an instruction about MacOS installation for placing on Qucs-S website. You may also make a PR to https://github.com/ra3xdh/ra3xdh.github.io/ with MacOS install instruction.

dsm commented 1 week ago

I accepted your invitation thanks, I'll test and push the necessary things.

dsm commented 1 week ago

I updated homebrew-qucs-s repo so macos brew installation is succesfull

ra3xdh commented 1 week ago

I have updated the installation instructions on the website. Closing this as completed.