# HG changeset patch # User Louis Opter # Date 1441357440 25200 # Node ID 83d3fcaf7474dc3e137b2cad5ad531e58b8b61d0 # Parent 740c2d41525d934ae74d8f2d683a933f86a30b84 Initial package file for lightsd, a daemon to control LIFX bulbs diff -r 740c2d41525d -r 83d3fcaf7474 LICENSE --- a/LICENSE Fri Sep 04 01:02:13 2015 -0700 +++ b/LICENSE Fri Sep 04 02:04:00 2015 -0700 @@ -1,4 +1,4 @@ -Copyright (c) 2015, Louis Opter +Copyright (c) 2015, Louis Opter All rights reserved. Redistribution and use in source and binary forms, with or without diff -r 740c2d41525d -r 83d3fcaf7474 README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Fri Sep 04 02:04:00 2015 -0700 @@ -0,0 +1,31 @@ +Homebrew lightsd +================ + +This `brew`_ tap let you install `lightsd`_, a daemon written C to control your +LIFX wifi smart bulbs, on Mac OS X. + +.. _brew: http://brew.sh +.. _lightsd: https://github.com/lopter/lightsd/ + +Instructions +------------ + +Make sure you have brew installed: http://brew.sh. + +:: + + brew install lopter/lightsd/lightsd + +Or: + +:: + + brew tap lopter/lightsd + brew install lightsd + +Documentation +------------- + +Please checkout lightsd's repository: https://github.com/lopter/lightsd/. + +.. vim: set tw=80 spelllang=en spell: diff -r 740c2d41525d -r 83d3fcaf7474 lightsd.rb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lightsd.rb Fri Sep 04 02:04:00 2015 -0700 @@ -0,0 +1,39 @@ +class Etl < Formula + desc "Daemon to control your LIFX wifi smart bulbs" + homepage "https://github.com/lopter/lightsd/" + url "https://api.github.com/repos/lopter/lightsd/tarball/0.9.1" + sha256 "ef4f8056bf39c8f2c440e442f047cafce1c102e565bb007791a27f77588157c2" + + depends_on "cmake" => :build + depends_on "libbsd" => :recommended + depends_on "libevent" => :build + depends_on "python" => :optional + + def install + args = %W[ + -DCMAKE_BUILD_TYPE=RELEASE + -DCMAKE_INSTALL_PREFIX=#{prefix} + ] + + system "cmake", *args + + system "make", "install" + end + + head do + url "https://github.com/lopter/lightsd.git" + end + + test do + Dir.mktmpdir("lightsd-test") do |dir| + args = %W[ + -l ::1:0 + -l 127.0.0.1:0 + -c #{dir}/lightsd.cmd + -h + ] + + system "#{bin}/lightsd", *args + end + end +end