49 lines
1.6 KiB
Ruby
49 lines
1.6 KiB
Ruby
class Abcmidi < Formula
|
|
desc "Converts abc music notation files to MIDI files"
|
|
homepage "http://www.ifdo.ca/~seymour/runabc/top.html"
|
|
url "http://www.ifdo.ca/~seymour/runabc/abcMIDI-2017.09.01.zip"
|
|
version "2017-09-01"
|
|
sha256 "67f3bc739cb9d45fefb92cfb846922ac3fa9565f48b97e70c22ffd53c0dbecb5"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "e277de8464317ce780af2e3434b0e953f2fe660327278d8451df2c5e212d1cdc" => :sierra
|
|
sha256 "87545987692a4f40033a0462fb5b7998ed80608a4fde4ae0e63cc1727e3929b1" => :el_capitan
|
|
sha256 "4998d0e47b5984edef6018ecfba5f36926fcf06671e440efed6b1013396979f9" => :yosemite
|
|
end
|
|
|
|
def install
|
|
# configure creates a "Makefile" file. A "makefile" file already exist in
|
|
# the tarball. On case-sensitive file-systems, the "makefile" file won't
|
|
# be overridden and will be chosen over the "Makefile" file.
|
|
rm "makefile"
|
|
|
|
system "./configure", "--disable-debug",
|
|
"--prefix=#{prefix}",
|
|
"--mandir=#{man}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"balk.abc").write <<-EOF.undent
|
|
X: 1
|
|
T: Abdala
|
|
F: https://www.youtube.com/watch?v=YMf8yXaQDiQ
|
|
L: 1/8
|
|
M: 2/4
|
|
K:Cm
|
|
Q:1/4=180
|
|
%%MIDI bassprog 32 % 32 Acoustic Bass
|
|
%%MIDI program 23 % 23 Tango Accordian
|
|
%%MIDI bassvol 69
|
|
%%MIDI gchord fzfz
|
|
|:"G"FDEC|D2C=B,|C2=B,2 |C2D2 |\
|
|
FDEC |D2C=B,|C2=B,2 |A,2G,2 :|
|
|
|:=B,CDE |D2C=B,|C2=B,2 |C2D2 |\
|
|
=B,CDE |D2C=B,|C2=B,2 |A,2G,2 :|
|
|
|:C2=B,2 |A,2G,2| C2=B,2|A,2G,2 :|
|
|
EOF
|
|
|
|
system "#{bin}/abc2midi", (testpath/"balk.abc")
|
|
end
|
|
end
|