diff options
| author | Dominyk Tiller | 2015-01-05 00:39:01 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-06 08:19:50 +0000 |
| commit | 6e826e5d9628f730c8e154da6056e3dce18abdbc (patch) | |
| tree | 8b7bf78079bb35f8c52a457d4b8e2d5dbde10c3a /Library | |
| parent | 0321e4bebcc7e0794ceebb7d2d53299f07be2004 (diff) | |
| download | homebrew-6e826e5d9628f730c8e154da6056e3dce18abdbc.tar.bz2 | |
redshift 1.10 (new formula)
New formula for Redshift.
Closes #35348
Closes https://github.com/Homebrew/homebrew-head-only/pull/81
Closes #35552.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/redshift.rb | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/Library/Formula/redshift.rb b/Library/Formula/redshift.rb new file mode 100644 index 000000000..c21a81b55 --- /dev/null +++ b/Library/Formula/redshift.rb @@ -0,0 +1,73 @@ +class Redshift < Formula + homepage "http://jonls.dk/redshift/" + url "https://github.com/jonls/redshift/releases/download/v1.10/redshift-1.10.tar.xz" + sha1 "7b06376ad96305252b93fa2ef14af47b521c82ab" + + 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" + end + + plist_options :manual => "redshift" + + def plist; <<-EOS.undent + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + <plist version="1.0"> + <dict> + <key>Label</key> + <string>#{plist_name}</string> + <key>ProgramArguments</key> + <array> + <string>#{bin}/redshift</string> + </array> + <key>KeepAlive</key> + <true/> + <key>RunAtLoad</key> + <true/> + <key>StandardErrorPath</key> + <string>/dev/null</string> + <key>StandardOutPath</key> + <string>/dev/null</string> + </dict> + </plist> + EOS + end + + def caveats; <<-EOS.undent + A .conf file has not been provided. If you want one, see: + http://jonls.dk/redshift/ + And place it in $HOME/.config + EOS + end + + test do + system "#{bin}/redshift", "-V" + end +end |
