homebrew-core/Formula/flashrom.rb

45 lines
1.4 KiB
Ruby

class Flashrom < Formula
desc "Identify, read, write, verify, and erase flash chips"
homepage "https://flashrom.org/"
url "https://download.flashrom.org/releases/flashrom-v1.2.tar.bz2"
sha256 "e1f8d95881f5a4365dfe58776ce821dfcee0f138f75d0f44f8a3cd032d9ea42b"
head "https://review.coreboot.org/flashrom.git"
bottle do
cellar :any
sha256 "5770ff2e0ed9a94ee73da1ddd682405a557acc7d62dc204b6df9f996baea99dc" => :catalina
sha256 "50874146b4fb2d1acd735eb3cd0fdf2cfcb5ce900b6870aa4ff3d1414c53812f" => :mojave
sha256 "8db77cb559d51f3fae3c2cd75ecd64b51bb2d70a7d268676a5b6ad21b8b839f9" => :high_sierra
end
depends_on "pkg-config" => :build
depends_on "libftdi0"
depends_on "libusb-compat"
def install
ENV["CONFIG_GFXNVIDIA"] = "0"
ENV["CONFIG_NIC3COM"] = "0"
ENV["CONFIG_NICREALTEK"] = "0"
ENV["CONFIG_NICNATSEMI"] = "0"
ENV["CONFIG_NICINTEL"] = "0"
ENV["CONFIG_NICINTEL_SPI"] = "0"
ENV["CONFIG_NICINTEL_EEPROM"] = "0"
ENV["CONFIG_OGP_SPI"] = "0"
ENV["CONFIG_SATAMV"] = "0"
ENV["CONFIG_SATASII"] = "0"
ENV["CONFIG_DRKAISER"] = "0"
ENV["CONFIG_RAYER_SPI"] = "0"
ENV["CONFIG_INTERNAL"] = "0"
ENV["CONFIG_IT8212"] = "0"
ENV["CONFIG_ATAHPT"] = "0"
ENV["CONFIG_ATAVIA"] = "0"
system "make", "DESTDIR=#{prefix}", "PREFIX=/", "install"
mv sbin, bin
end
test do
system "#{bin}/flashrom" " --version"
end
end