├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ ├── publish.yml │ └── tests.yml ├── README.md └── Formula └── deluge-meta.rb /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **Screenshots** 14 | If applicable, add screenshots to help explain your problem. 15 | 16 | **Desktop (please complete the following information):** 17 | - macOS Version: [e.g. Big Sur, 11.6 - check with Apple (top left) > About This Mac] 18 | 19 | **Additional context** 20 | Add any other context about the problem here. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # deluge-meta 2 | 3 | This initially started as a "meta-package" for Deluge 2.0 dependencies on MacOS, but turned into a full installation of the `deluge` pip module, including the GUI `deluge`/`deluge-gtk`. 4 | 5 | Currently, Deluge 2.0 is in beta, but the newest release of the client available for MacOS is 1.x, which is incompatible with 2.0 servers. This tap provides a working (for now?) build for Deluge 2.0 to reduce the troubles with building and linking Deluge's pip module on Mac. 6 | 7 | See the official doc page on installation [here](https://deluge.readthedocs.io/en/latest/intro/01-install.html). 8 | 9 | I used [this thread](https://forum.deluge-torrent.org/viewtopic.php?t=55393&start=10) on the deluge forums as a reference while working on this. 10 | 11 | ## How do I install these formulae? 12 | `brew install amar1729/deluge-meta/deluge-meta` 13 | 14 | Or `brew tap amar1729/deluge-meta` and then `brew install deluge-meta`. 15 | 16 | ## Documentation 17 | `brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh). 18 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: brew pr-pull 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - labeled 7 | 8 | jobs: 9 | pr-pull: 10 | if: contains(github.event.pull_request.labels.*.name, 'pr-pull') 11 | runs-on: ubuntu-22.04 12 | permissions: 13 | contents: write 14 | pull-requests: write 15 | steps: 16 | - name: Set up Homebrew 17 | uses: Homebrew/actions/setup-homebrew@master 18 | 19 | - name: Set up git 20 | uses: Homebrew/actions/git-user-config@master 21 | 22 | - name: Pull bottles 23 | env: 24 | HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} 25 | PULL_REQUEST: ${{ github.event.pull_request.number }} 26 | run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" 27 | 28 | - name: Push commits 29 | uses: Homebrew/actions/git-try-push@master 30 | with: 31 | token: ${{ github.token }} 32 | branch: main 33 | 34 | - name: Delete branch 35 | if: github.event.pull_request.head.repo.fork == false 36 | env: 37 | BRANCH: ${{ github.event.pull_request.head.ref }} 38 | run: git push --delete origin "$BRANCH" 39 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: brew test-bot 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | 9 | jobs: 10 | test-bot: 11 | strategy: 12 | matrix: 13 | os: [ubuntu-22.04, macos-13, macos-14] 14 | runs-on: ${{ matrix.os }} 15 | steps: 16 | - name: Set up Homebrew 17 | id: set-up-homebrew 18 | uses: Homebrew/actions/setup-homebrew@master 19 | 20 | - name: Cache Homebrew Bundler RubyGems 21 | uses: actions/cache@v4 22 | with: 23 | path: ${{ steps.set-up-homebrew.outputs.gems-path }} 24 | key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} 25 | restore-keys: ${{ matrix.os }}-rubygems- 26 | 27 | - run: brew test-bot --only-cleanup-before 28 | 29 | - run: brew test-bot --only-setup 30 | 31 | - run: brew test-bot --only-tap-syntax 32 | 33 | - run: brew test-bot --only-formulae 34 | if: github.event_name == 'pull_request' 35 | 36 | - name: Upload bottles as artifact 37 | if: always() && github.event_name == 'pull_request' 38 | uses: actions/upload-artifact@v4 39 | with: 40 | name: bottles_${{ matrix.os }} 41 | path: '*.bottle.*' 42 | -------------------------------------------------------------------------------- /Formula/deluge-meta.rb: -------------------------------------------------------------------------------- 1 | class DelugeMeta < Formula 2 | include Language::Python::Virtualenv 3 | 4 | desc "Meta package for Deluge 2.0 dependencies" 5 | homepage "https://deluge-torrent.org/" 6 | url "https://files.pythonhosted.org/packages/d5/d7/b655ee66d208002564c35179b49b0cc9f22916a309785dec2676c85d7c05/deluge-2.2.0.tar.gz" 7 | sha256 "f0fc64e052334ef294ca3951975dd926f129d62813f6c909bb523d914abe6537" 8 | license "GPL-3.0-only" 9 | 10 | bottle do 11 | root_url "https://github.com/Amar1729/homebrew-deluge-meta/releases/download/deluge-meta-2.2.0" 12 | sha256 cellar: :any, arm64_sonoma: "be3b50b75769327522a5447235543e01771e7a5c88c944e4ee5738050a4193d6" 13 | sha256 cellar: :any, ventura: "f98f4b839652317ee8735c6dfc531ed1f5b1052302318e1d6ccc3e16503eac1b" 14 | sha256 cellar: :any_skip_relocation, x86_64_linux: "d0904d7b39d91f5a9e88ae375abce802400753a8ecbe75e39aa0706e26a268e6" 15 | end 16 | 17 | depends_on "rust" => :build 18 | depends_on "adwaita-icon-theme" 19 | depends_on "cffi" 20 | depends_on "cryptography" 21 | depends_on "gettext" 22 | depends_on "gtk+3" 23 | depends_on "libtorrent-rasterbar" 24 | depends_on "libxcb" 25 | depends_on "little-cms2" 26 | depends_on "openjpeg" 27 | depends_on "pycparser" 28 | depends_on "pygobject3" 29 | depends_on "python-setuptools" 30 | depends_on "python@3.13" 31 | depends_on "six" 32 | 33 | uses_from_macos "libffi" 34 | uses_from_macos "zlib" 35 | 36 | # manually added since Automat requires wheel (cmd bdist_wheel) to build 37 | resource "wheel" do 38 | url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" 39 | sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" 40 | end 41 | 42 | resource "attrs" do 43 | url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" 44 | sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" 45 | end 46 | 47 | resource "Automat" do 48 | url "https://files.pythonhosted.org/packages/e3/0f/d40bbe294bbf004d436a8bcbcfaadca8b5140d39ad0ad3d73d1a8ba15f14/automat-25.4.16.tar.gz" 49 | sha256 "0017591a5477066e90d26b0e696ddc143baafd87b588cfac8100bc6be9634de0" 50 | end 51 | 52 | resource "cffi" do 53 | url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" 54 | sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" 55 | end 56 | 57 | resource "constantly" do 58 | url "https://files.pythonhosted.org/packages/4d/6f/cb2a94494ff74aa9528a36c5b1422756330a75a8367bf20bd63171fc324d/constantly-23.10.4.tar.gz" 59 | sha256 "aa92b70a33e2ac0bb33cd745eb61776594dc48764b06c35e0efd050b7f1c7cbd" 60 | end 61 | 62 | resource "cryptography" do 63 | url "https://files.pythonhosted.org/packages/53/d6/1411ab4d6108ab167d06254c5be517681f1e331f90edf1379895bcb87020/cryptography-44.0.3.tar.gz" 64 | sha256 "fe19d8bc5536a91a24a8133328880a41831b6c5df54599a8417b62fe015d3053" 65 | end 66 | 67 | resource "deluge" do 68 | url "https://files.pythonhosted.org/packages/d5/d7/b655ee66d208002564c35179b49b0cc9f22916a309785dec2676c85d7c05/deluge-2.2.0.tar.gz" 69 | sha256 "f0fc64e052334ef294ca3951975dd926f129d62813f6c909bb523d914abe6537" 70 | end 71 | 72 | resource "hyperlink" do 73 | url "https://files.pythonhosted.org/packages/3a/51/1947bd81d75af87e3bb9e34593a4cf118115a8feb451ce7a69044ef1412e/hyperlink-21.0.0.tar.gz" 74 | sha256 "427af957daa58bc909471c6c40f74c5450fa123dd093fc53efd2e91d2705a56b" 75 | end 76 | 77 | resource "idna" do 78 | url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" 79 | sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" 80 | end 81 | 82 | resource "incremental" do 83 | url "https://files.pythonhosted.org/packages/27/87/156b374ff6578062965afe30cc57627d35234369b3336cf244b240c8d8e6/incremental-24.7.2.tar.gz" 84 | sha256 "fb4f1d47ee60efe87d4f6f0ebb5f70b9760db2b2574c59c8e8912be4ebd464c9" 85 | end 86 | 87 | resource "Mako" do 88 | url "https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz" 89 | sha256 "99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28" 90 | end 91 | 92 | resource "MarkupSafe" do 93 | url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" 94 | sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" 95 | end 96 | 97 | resource "pyasn1" do 98 | url "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz" 99 | sha256 "6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034" 100 | end 101 | 102 | resource "pyasn1-modules" do 103 | url "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz" 104 | sha256 "677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" 105 | end 106 | 107 | resource "pycparser" do 108 | url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" 109 | sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" 110 | end 111 | 112 | resource "pyOpenSSL" do 113 | url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" 114 | sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" 115 | end 116 | 117 | resource "pyxdg" do 118 | url "https://files.pythonhosted.org/packages/b0/25/7998cd2dec731acbd438fbf91bc619603fc5188de0a9a17699a781840452/pyxdg-0.28.tar.gz" 119 | sha256 "3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4" 120 | end 121 | 122 | resource "rencode" do 123 | url "https://files.pythonhosted.org/packages/3a/fb/3c03dbe4438dd596e1378b5299990b81041739658a76e0f4a301eded67f4/rencode-1.0.6.tar.gz" 124 | sha256 "2586435c4ea7d45f74e26765ad33d75309de7cf47c4d762e8efabd39905c0718" 125 | end 126 | 127 | resource "service-identity" do 128 | url "https://files.pythonhosted.org/packages/07/a5/dfc752b979067947261dbbf2543470c58efe735c3c1301dd870ef27830ee/service_identity-24.2.0.tar.gz" 129 | sha256 "b8683ba13f0d39c6cd5d625d2c5f65421d6d707b013b375c355751557cbe8e09" 130 | end 131 | 132 | resource "Twisted" do 133 | url "https://files.pythonhosted.org/packages/77/1c/e07af0df31229250ab58a943077e4adbd5e227d9f2ac826920416b3e5fa2/twisted-24.11.0.tar.gz" 134 | sha256 "695d0556d5ec579dcc464d2856b634880ed1319f45b10d19043f2b57eb0115b5" 135 | end 136 | 137 | resource "typing-extensions" do 138 | url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" 139 | sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" 140 | end 141 | 142 | resource "zope-interface" do 143 | url "https://files.pythonhosted.org/packages/30/93/9210e7606be57a2dfc6277ac97dcc864fd8d39f142ca194fdc186d596fda/zope.interface-7.2.tar.gz" 144 | sha256 "8b49f1a3d1ee4cdaf5b32d2e738362c7f5e40ac8b46dd7d1a65e82a4872728fe" 145 | end 146 | 147 | def install 148 | virtualenv_install_with_resources using: "python@3.13" 149 | 150 | %w[deluge deluge-console deluge-gtk deluge-web deluged].each do |cmd| 151 | (bin/cmd).write_env_script(libexec/"bin/#{cmd}", PYTHONPATH: ENV["PYTHONPATH"]) 152 | end 153 | 154 | man1.install Dir["docs/man/*.1"] 155 | 156 | (var/"log/deluge-meta").mkpath 157 | end 158 | 159 | service do 160 | run [opt_bin/"deluged", "--do-not-daemonize", "--loglevel", "info", "--logfile", 161 | var/"log/deluge-meta/deluged.log"] 162 | keep_alive true 163 | end 164 | 165 | test do 166 | assert_match "deluged #{version}", shell_output("#{bin}/deluged --version") 167 | 168 | # ensure proper libraries are installed for deluge's python 169 | system "#{libexec}/bin/python", "-c", "import deluge" 170 | system "#{libexec}/bin/python", "-c", "import libtorrent" 171 | 172 | # still not really a functional test, but check that the daemon/console at least can run. 173 | pid = fork do 174 | system bin/"deluged", "-d" 175 | end 176 | sleep 1 177 | begin 178 | # 2.2.0: this will output "Could not connect to daemon:" and err traceback if can't connect. 179 | assert_match("", shell_output("#{bin}/deluge-console info")) 180 | assert_match("Daemon was shutdown", shell_output("#{bin}/deluge-console halt")) 181 | rescue 182 | # if halting doesn't work, make sure to kill daemon before failing. 183 | Process.kill "TERM", pid 184 | system "false" 185 | end 186 | end 187 | end 188 | --------------------------------------------------------------------------------