Add brew formula

This commit is contained in:
Magnus Hoff 2017-11-29 15:45:03 +01:00
parent b8be70ad27
commit 861765c85a
2 changed files with 23 additions and 1 deletions

View file

@ -39,7 +39,13 @@ single independent executable for Linux.
For a more permanent installation, you could [install Sausagewiki as a systemd For a more permanent installation, you could [install Sausagewiki as a systemd
service](https://github.com/maghoff/sausagewiki/wiki/System-wide-installation-with-systemd). service](https://github.com/maghoff/sausagewiki/wiki/System-wide-installation-with-systemd).
Alternatively, you could build it from source code with `cargo build`. Alternative installation methods include the following:
**Build from source** with `cargo build`. This requires you to have a working
installation of [rust](https://www.rust-lang.org/en-US/).
**Install with [Homebrew](https://brew.sh/)** on OS X/macOS:
`brew install --HEAD https://raw.githubusercontent.com/maghoff/sausagewiki/master/deploy/sausagewiki.rb`
Command line arguments Command line arguments
---------------------- ----------------------

16
deploy/sausagewiki.rb Normal file
View file

@ -0,0 +1,16 @@
class Sausagewiki < Formula
desc "A simple, self-contained Wiki engine"
homepage "https://github.com/maghoff/sausagewiki/"
head "https://github.com/maghoff/sausagewiki.git"
depends_on "rust" => :build
def install
system "cargo", "build", "--release"
bin.install "target/release/sausagewiki"
end
test do
system "#{bin}/sausagewiki", "--version"
end
end