-
Notifications
You must be signed in to change notification settings - Fork 12
/
mix.exs
52 lines (45 loc) · 1.33 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
defmodule PortMidi.Mixfile do
use Mix.Project
@version "5.1.2"
def project do
[app: :portmidi,
version: @version,
elixir: "~> 1.2",
description: "Elixir bindings to the portmidi C library",
package: package(),
compilers: [:port_midi, :elixir, :app],
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
# Docs
name: "PortMidi",
docs: [source_ref: "v#{@version}", main: "PortMidi",
source_url: "https://github.com/lucidstack/ex-portmidi"]
]
end
def application do
[applications: [:logger],
mod: {PortMidi, []}]
end
defp deps do
[{:credo, "~> 0.5.3", only: [:dev, :test]},
{:mock, "~> 0.1.1", only: :test},
{:ex_doc, github: "elixir-lang/ex_doc", only: :dev},
{:earmark, ">= 0.0.0", only: :dev}]
end
defp package do
[maintainers: ["Andrea Rossi"],
files: ["priv", "lib", "src", "Makefile", "mix.exs", "README.md", "LICENSE"],
licenses: ["MIT"],
links: %{"Github" => "https://github.com/lucidstack/ex-portmidi"}]
end
end
defmodule Mix.Tasks.Compile.PortMidi do
@moduledoc "Compiles portmidi bindings"
def run(_) do
if Mix.shell.cmd("make") != 0 do
raise Mix.Error, message: "could not run `make`. Do you have make, gcc and libportmidi installed?"
end
:ok
end
end