class Redshift < Formula desc "Adjust color temperature of your screen according to your surroundings" homepage "http://jonls.dk/redshift/" url "https://github.com/jonls/redshift/releases/download/v1.12/redshift-1.12.tar.xz" sha256 "d2f8c5300e3ce2a84fe6584d2f1483aa9eadc668ab1951b2c2b8a03ece3a22ba" bottle do sha256 "d1f71d1f7dc5d5f22c220087a9fde5d159928540b54c02803e37cbc3bfc37e5d" => :mojave sha256 "39794fc0af4bae10ccfa98921acb933c414dbb858e25515dfbff38659d7b8b77" => :high_sierra sha256 "30ff6fd3a0bb4d73bd9c3855467fe9b0cf78c8f084083e103ef702587fba98cc" => :sierra sha256 "365aba46b3ea942d56749f405633093fc7e774bc4b27acefdc5ed0a87bdd4d67" => :el_capitan end head do url "https://github.com/jonls/redshift.git" depends_on "automake" => :build depends_on "autoconf" => :build depends_on "libtool" => :build end depends_on "pkg-config" => :build depends_on "intltool" => :build depends_on "gettext" depends_on "glib" def install args = %W[ --prefix=#{prefix} --enable-corelocation --disable-silent-rules --disable-dependency-tracking --disable-geoclue --disable-geoclue2 --enable-quartz --with-systemduserunitdir=no --disable-gui ] system "./bootstrap" if build.head? system "./configure", *args system "make", "install" pkgshare.install "redshift.conf.sample" end def caveats; <<~EOS A sample .conf file has been installed to #{opt_pkgshare}. Please note redshift expects to read its configuration file from #{ENV["HOME"]}/.config/redshift/redshift.conf EOS end plist_options :manual => "redshift" def plist; <<~EOS Label #{plist_name} ProgramArguments #{opt_bin}/redshift KeepAlive RunAtLoad StandardErrorPath /dev/null StandardOutPath /dev/null EOS end test do system "#{bin}/redshift", "-V" end end