diff --git a/Formula/osmium-tool.rb b/Formula/osmium-tool.rb new file mode 100644 index 0000000000..8aaf2973f3 --- /dev/null +++ b/Formula/osmium-tool.rb @@ -0,0 +1,37 @@ +class OsmiumTool < Formula + desc "Libosmium-based command-line tool for processing OpenStreetMap data" + homepage "http://osmcode.org/osmium-tool/" + url "https://github.com/osmcode/osmium-tool/archive/v1.6.1.tar.gz" + sha256 "75523396b3fe51ff585a59251144bd61c93609df0703b7119fe6e16fd4ddb0fa" + + depends_on "cmake" => :build + depends_on "libosmium" => :build + depends_on "boost" + + def install + system "cmake", ".", *std_cmake_args + system "make", "install" + end + + test do + (testpath/"test.osm").write <<-EOS.undent + + + + + + + + + + + + + + + EOS + output = shell_output("#{bin}/osmium fileinfo test.osm") + assert_match /Compression.+generator=handwritten/m, output + system bin/"osmium", "tags-filter", "test.osm", "w/name=line", "-f", "osm" + end +end