Skip to content

Commit eb50df3

Browse files
committed
feat(v0.3.0): added homebrew formula
Added rough formula for homebrew; 1st time doing this so im working out kinks
1 parent 6fa5145 commit eb50df3

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

Formula/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# ctf-rs Homebrew
2+
3+
- [Formula Cookbook](https://docs.brew.sh/Formula-Cookbook)
4+
- [Adding to Homebrew](https://docs.brew.sh/Adding-Software-to-Homebrew)
5+
- [Example Blog](https://mvogelgesang.com/blog/20240419/creating-a-simple-homebrew-formula/)
6+
7+
## Homebrew terminology
8+
9+
| term | description | example |
10+
|------------------|------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
11+
| formula | Homebrew package definition that builds from upstream sources | /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/f/foo.rb |
12+
| cask | Homebrew package definition that installs macOS native applications | /opt/homebrew/Library/Taps/homebrew/homebrew-cask/Casks/b/bar.rb |
13+
| prefix | path in which Homebrew is installed | /opt/homebrew |
14+
| keg | installation destination directory of a given formula version | /opt/homebrew/Cellar/foo/0.1 |
15+
| rack | directory containing one or more versioned kegs | /opt/homebrew/Cellar/foo |
16+
| keg-only | a formula is keg-only if it is not symlinked into Homebrew’s prefix | the openjdk formula |
17+
| opt prefix | a symlink to the active version of a keg | /opt/homebrew/opt/foo |
18+
| Cellar | directory containing one or more named racks | /opt/homebrew/Cellar |
19+
| Caskroom | directory containing one or more named casks | /opt/homebrew/Caskroom |
20+
| external command | brew subcommand defined outside of the Homebrew/brew GitHub repository | brew alias |
21+
| tap | directory (and usually Git repository) of formulae, casks and/or external commands | /opt/homebrew/Library/Taps/homebrew/homebrew-core |
22+
| bottle | pre-built keg poured into a rack of the Cellar instead of building from upstream sources | qt--6.5.1.ventura.bottle.tar.gz |
23+
| tab | information about a keg, e.g. whether it was poured from a bottle or built from source | /opt/homebrew/Cellar/foo/0.1/INSTALL_RECEIPT.json |
24+
| Brew Bundle | a declarative interface to Homebrew | brew 'myservice', restart_service: true |
25+
| Brew Services | the Homebrew command to manage background services | brew services start myservice |

Formula/formula.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
cask "ctf-rs" do
2+
version "0.1.0"
3+
sha256 "{{ sha256sum }}"
4+
5+
url "https://github.com/libctf/desktop-app/releases/download/v#{version}/ctf-rs-#{version}.dmg",
6+
verified: "https://github.com/libctf/desktop-app"
7+
name "ctf-rs"
8+
desc "Cloud-Native CTF Platform"
9+
homepage "https://ctf.rs/"
10+
11+
livecheck do
12+
url :url
13+
strategy :github_latest
14+
end
15+
16+
app "ctf-rs.app"
17+
18+
zap trash: [
19+
"~/Library/Application Support/ctf-rs",
20+
"~/Library/Logs/ctf-rs",
21+
"~/Library/Preferences/ctf-rs.plist",
22+
"~/Library/Saved Application State/ctf-rs.savedState",
23+
]
24+
end

0 commit comments

Comments
 (0)