mirror of
https://github.com/benbusby/farside.git
synced 2025-04-29 23:20:03 +00:00
Allow compiling to standalone binary via bakeware
This introduces a simple way of compiling Farside to a somewhat portable, standalone binary. The resulting binary isn't completely portable since it depends on the C runtime of the host system. As a result, it's advised to use systems with older library versions when compiling for true portability. Closes #50 Co-authored-by: Jason Clark <mithereal@gmail.com>
This commit is contained in:
parent
b75355ed75
commit
9eb11ed264
3 changed files with 76 additions and 5 deletions
50
mix.exs
50
mix.exs
|
@ -1,16 +1,31 @@
|
|||
defmodule Farside.MixProject do
|
||||
use Mix.Project
|
||||
|
||||
@source_url "https://github.com/benbusby/farside.git"
|
||||
@version "0.1.1"
|
||||
@app :farside
|
||||
|
||||
def project do
|
||||
[
|
||||
app: :farside,
|
||||
version: "0.1.0",
|
||||
app: @app,
|
||||
version: @version,
|
||||
name: "farside",
|
||||
elixir: "~> 1.8",
|
||||
start_permanent: Mix.env() == :prod,
|
||||
deps: deps()
|
||||
source_url: @source_url,
|
||||
start_permanent: Mix.env() == :prod || Mix.env() == :cli,
|
||||
deps: deps(),
|
||||
aliases: aliases(),
|
||||
description: description(),
|
||||
package: package(),
|
||||
releases: [{@app, release()}],
|
||||
preferred_cli_env: [release: :cli]
|
||||
]
|
||||
end
|
||||
|
||||
defp aliases do
|
||||
[]
|
||||
end
|
||||
|
||||
# Run "mix help compile.app" to learn about applications.
|
||||
def application do
|
||||
[
|
||||
|
@ -27,7 +42,32 @@ defmodule Farside.MixProject do
|
|||
{:plug_attack, "~> 0.4.2"},
|
||||
{:plug_cowboy, "~> 2.0"},
|
||||
{:quantum, "~> 3.0"},
|
||||
{:cubdb, "~> 2.0.1"}
|
||||
{:cubdb, "~> 2.0.1"},
|
||||
{:bakeware, "~> 0.2.4"}
|
||||
]
|
||||
end
|
||||
|
||||
defp description() do
|
||||
"A redirecting service for FOSS alternative frontends."
|
||||
end
|
||||
|
||||
defp package() do
|
||||
[
|
||||
name: "farside",
|
||||
files: ["lib", "mix.exs", "README*"],
|
||||
maintainers: ["Ben Busby"],
|
||||
licenses: ["MIT"],
|
||||
links: %{"GitHub" => "https://github.com/benbusby/farside"}
|
||||
]
|
||||
end
|
||||
|
||||
defp release() do
|
||||
[
|
||||
overwrite: true,
|
||||
cookie: "#{@app}_cookie",
|
||||
quiet: true,
|
||||
steps: [:assemble, &Bakeware.assemble/1],
|
||||
strip_beams: Mix.env() == :cli
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue