homebrew-virt-manager/spice-protocol.rb
2019-01-06 15:48:53 -05:00

27 lines
735 B
Ruby

class SpiceProtocol < Formula
desc "Headers for SPICE protocol"
homepage "https://www.spice-space.org/"
url "https://www.spice-space.org/download/releases/spice-protocol-0.12.14.tar.bz2"
sha256 "20350bc4309039fdf0d29ee4fd0033cde27bccf33501e13b3c1befafde9d0c9c"
revision 1
def install
system "./configure", "--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.cpp").write <<~EOS
#include <spice/protocol.h>
int main() {
return (SPICE_LINK_ERR_OK == 0) ? 0 : 1;
}
EOS
system ENV.cc, "test.cpp",
"-I#{include}/spice-1",
"-o", "test"
system "./test"
end
end