mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 02:18:53 +00:00
55 lines
1.5 KiB
Ruby
55 lines
1.5 KiB
Ruby
require File.expand_path("../Abstract/abstract-osquery-formula", __FILE__)
|
|
|
|
class Automake < AbstractOsqueryFormula
|
|
desc "Tool for generating GNU Standards-compliant Makefiles"
|
|
homepage "https://www.gnu.org/software/automake/"
|
|
url "https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.xz"
|
|
mirror "https://ftpmirror.gnu.org/automake/automake-1.16.1.tar.xz"
|
|
sha256 "5d05bb38a23fd3312b10aea93840feec685bdf4a41146e78882848165d3ae921"
|
|
|
|
bottle do
|
|
root_url "https://osquery-packages.s3.amazonaws.com/bottles"
|
|
cellar :any_skip_relocation
|
|
sha256 "f9d2f7f913917ce686bf8dab00fe5c5f2c971038ed91b2a6ec8cd6be9efd9b31" => :high_sierra
|
|
end
|
|
|
|
depends_on "autoconf"
|
|
|
|
def install
|
|
ENV["PERL"] = "/usr/bin/perl"
|
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
system "make", "install"
|
|
|
|
# Our aclocal must go first. See:
|
|
# https://github.com/Homebrew/homebrew/issues/10618
|
|
(share/"aclocal/dirlist").write <<~EOS
|
|
#{HOMEBREW_PREFIX}/share/aclocal
|
|
/usr/share/aclocal
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
int main() { return 0; }
|
|
EOS
|
|
(testpath/"configure.ac").write <<~EOS
|
|
AC_INIT(test, 1.0)
|
|
AM_INIT_AUTOMAKE
|
|
AC_PROG_CC
|
|
AC_CONFIG_FILES(Makefile)
|
|
AC_OUTPUT
|
|
EOS
|
|
(testpath/"Makefile.am").write <<~EOS
|
|
bin_PROGRAMS = test
|
|
test_SOURCES = test.c
|
|
EOS
|
|
system bin/"aclocal"
|
|
system bin/"automake", "--add-missing", "--foreign"
|
|
system "autoconf"
|
|
system "./configure"
|
|
system "make"
|
|
system "./test"
|
|
end
|
|
end
|