2016-07-31 18:32:31 +00:00
|
|
|
require File.expand_path("../Abstract/abstract-osquery-formula", __FILE__)
|
|
|
|
|
|
|
|
class AwsSdkCpp < AbstractOsqueryFormula
|
2016-06-02 21:58:43 +00:00
|
|
|
desc "AWS SDK for C++"
|
|
|
|
homepage "https://github.com/aws/aws-sdk-cpp"
|
2016-08-16 04:30:39 +00:00
|
|
|
url "https://github.com/aws/aws-sdk-cpp/archive/0.14.4.tar.gz"
|
2016-08-16 15:37:11 +00:00
|
|
|
sha256 "2e935275c6f7eb25e7d850b354344c92cacb7c193b708ec64ffce10ec6afa7f4"
|
2016-06-02 21:58:43 +00:00
|
|
|
|
2016-07-31 18:32:31 +00:00
|
|
|
bottle do
|
|
|
|
root_url "https://osquery-packages.s3.amazonaws.com/bottles"
|
|
|
|
cellar :any_skip_relocation
|
2016-10-19 22:25:31 +00:00
|
|
|
sha256 "0b9d7b11f5c6e7cf7de5b20c5cc19bb2e4f844df4afa00a535d648b99ef3a747" => :sierra
|
2016-08-16 15:37:11 +00:00
|
|
|
sha256 "4a46a467ea1a8e1bd4c10b42dfe30055f6d3eb0bddee4f64c108a7ca780915ce" => :el_capitan
|
|
|
|
sha256 "99c11985fc79446a442055eae1c1eecdf14d33434f40df91bd99f97c0b7dadce" => :x86_64_linux
|
2016-07-31 18:32:31 +00:00
|
|
|
end
|
2016-06-02 21:58:43 +00:00
|
|
|
|
|
|
|
depends_on "cmake" => :build
|
|
|
|
|
|
|
|
def install
|
2016-07-31 18:32:31 +00:00
|
|
|
ENV.cxx11
|
|
|
|
|
|
|
|
inreplace "CMakeLists.txt", "${CMAKE_CXX_FLAGS_RELEASE} -s", "${CMAKE_CXX_FLAGS_RELEASE}"
|
|
|
|
|
2016-06-02 21:58:43 +00:00
|
|
|
args = std_cmake_args
|
2016-07-31 18:32:31 +00:00
|
|
|
args << "-DSTATIC_LINKING=1"
|
|
|
|
args << "-DNO_HTTP_CLIENT=1"
|
|
|
|
args << "-DMINIMIZE_SIZE=ON"
|
|
|
|
args << "-DBUILD_SHARED_LIBS=OFF"
|
|
|
|
|
2016-08-15 22:31:33 +00:00
|
|
|
args << "-DBUILD_ONLY=firehose;kinesis;sts"
|
2016-06-02 21:58:43 +00:00
|
|
|
|
|
|
|
mkdir "build" do
|
|
|
|
system "cmake", "..", *args
|
|
|
|
system "make"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
|
|
#include <aws/core/Version.h>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
std::cout << Aws::Version::GetVersionString() << std::endl;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cxx, "test.cpp", "-o", "test", "-laws-cpp-sdk-core"
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|