Skip to content

Instantly share code, notes, and snippets.

@rakkesh
Last active February 22, 2017 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rakkesh/d560b98661873affe4ce0fb35dd52ac9 to your computer and use it in GitHub Desktop.
Save rakkesh/d560b98661873affe4ce0fb35dd52ac9 to your computer and use it in GitHub Desktop.
[WIP] Homebrew formula for tageditor
class Tageditor < Formula
desc "Tag editor supporting MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska"
homepage "https://github.com/Martchus/tageditor"
url "https://github.com/Martchus/tageditor/archive/v2.2.0.tar.gz"
sha256 "4c0d260260b7c957dced77af66aea949842f927201ca2487bc8689fa36ec7dd9"
depends_on "cmake" => :build
depends_on "cppunit" => :build
resource "cpp-utilities" do
url "https://github.com/Martchus/cpp-utilities/archive/v4.5.0.tar.gz"
sha256 "fc9d99a13db8584f25787e3f531fc4b2e71a2febc2fce5f78e04be0698d1b0db"
end
resource "tagparser" do
url "https://github.com/Martchus/tagparser/archive/v6.2.0.tar.gz"
sha256 "f3885858e3d874a8211e095423f4cac36cf5a9cc743723d6906a17c85533d41e"
end
def install
ENV.cxx11
resource("cpp-utilities").stage do
mkdir "build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=\"#{libexec}/vendor\"",
"-DCMAKE_LIBRARY_PATH=\"/usr/lib\"",
"-DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=\"/usr/include\"", ".."
system "make", "DESTDIR=#{libexec}/vendor", "install" #, "VERBOSE=1"
end
end
resource("tagparser").stage do
mkdir "build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=\"#{libexec}/vendor\"", ".."
system "make", "DESTDIR=#{libexec}/vendor", "install"
end
end
mkdir "build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=\"#{prefix}\"", ".."
system "make", "DESTDIR=#{prefix}", "install" # if this fails, try separate make/make install steps
end
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! It's enough to just replace
# "false" with the main program this formula installs, but it'd be nice if you
# were more thorough. Run the test with `brew test TagEditor`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "false"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment