-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathmsgpack-tools-dev.rb
More file actions
29 lines (26 loc) · 979 Bytes
/
Copy pathmsgpack-tools-dev.rb
File metadata and controls
29 lines (26 loc) · 979 Bytes
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
# Homebrew formula for msgpack-tools develop branch. This builds and installs
# the latest development code rather than the latest stable release.
#
# The msgpack-tools latest stable release formula lives at:
#
# https://ludocode.github.io/msgpack-tools.rb
#
# Maintainer: Nicholas Fraser <[email protected]>
class MsgpackToolsDev < Formula
desc "Command-line tools for converting between MessagePack and JSON"
homepage "https://github.com/ludocode/msgpack-tools"
url "https://github.com/ludocode/msgpack-tools/archive/develop.tar.gz"
version "develop"
depends_on "cmake" => :build
def install
system "./configure", "--prefix=#{prefix}"
system "make"
system "env", "CTEST_OUTPUT_ON_FAILURE=1", "make", "test"
system "make", "install"
end
test do
system "json2msgpack", "-v"
system "msgpack2json", "-v"
system "bash", "-o", "pipefail", "-c", 'echo "{\"Hello\": \"world!\"}" | json2msgpack | msgpack2json -d'
end
end