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.12.zip" version "2017-09-12" sha256 "31091e62e21b57fefa111a5e239aff46a3e52adf5ceeec1182b4824761271401" bottle do cellar :any_skip_relocation sha256 "e9798b8dfe169ed616176b5c1516ea8df6d1835e7d73d7d8d169712e56a8e0b7" => :sierra sha256 "7ed456cd28e7383cedeee7821ed781a0f9458af7dacd55f667dd483fa2269bbf" => :el_capitan 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