Skip to content

Instantly share code, notes, and snippets.

@casouri
Created December 23, 2017 03:01
Show Gist options
  • Save casouri/9eaf98c77d11b7c8d7df83e9b919ef91 to your computer and use it in GitHub Desktop.
Save casouri/9eaf98c77d11b7c8d7df83e9b919ef91 to your computer and use it in GitHub Desktop.
homebrew libpcp formula
# Documentation: https://docs.brew.sh/Formula-Cookbook.html
# http://www.rubydoc.info/github/Homebrew/brew/master/Formula
class Libpcp < Formula
desc "PCP client library"
homepage "https://github.com/libpcp/pcp"
url "https://github.com/libpcp/pcp/archive/master.zip"
version "0.0.1"
sha256 "5057f6cdc596c49f06d6f77ada82429452b0294d03f53ab32e8d3e3fbf201b37"
depends_on "autoconf" => :build # for autoconf
depends_on "automake" => :build # for autolocal
depends_on "libtool" => :build # for libtoolize & glibtoolize
# depends_on "cmake" => :build
def install
system "./autogen.sh"
system "./configure", "--disable-server",
"--disable-app"
system "make"
system "make install"
end
test do
# `test do` will create, run in and delete a temporary directory.
# if #include can compile, then the library is installed successfully
system "echo \"#include <pcp-client/pcp.h>\nint main()\n{\nreturn 0;\n}\" > test.c"
system "clang test.c"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment