-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New Formula: websockify 0.6.0 #36643
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
class Websockify < Formula | ||
desc "Websockify allows the tunnelling of TCP traffic over WebSockets" | ||
homepage "https://github.com/kanaka/websockify" | ||
url "https://github.com/kanaka/websockify/archive/v0.6.0.tar.gz" | ||
sha256 "aeb1bb0079696611045d2f188f38b68c8a4cc50e3c229db9156806c0078d608e" | ||
|
||
if MacOS.version <= :snow_leopard | ||
depends_on :python | ||
depends_on "numpy" => :python | ||
end | ||
depends_on "openssl" | ||
|
||
def install | ||
system "make" | ||
system "make", "-C", "other" | ||
|
||
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" | ||
system "python", *Language::Python.setup_install_args(libexec) | ||
bin.install Dir["#{libexec}/bin/*"] | ||
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) | ||
|
||
# Install C version of websockify | ||
bin.install "other/websockify" => "websockify-c" | ||
|
||
man1.install "docs/websockify.1" => "websockify.1" | ||
|
||
(doc+"websockify").install "docs" | ||
|
||
# Upstream Bug: Not named ".dylib" | ||
# Issue: https://github.com/kanaka/websockify/issues/156 | ||
lib.install "rebind.so" => "rebind.dylib" | ||
|
||
# rmdir, not rm_r, as this is genuinely empty and we want to fail if the tarball | ||
# ever changes in a new release | ||
rmdir "include/web-socket-js-project" | ||
|
||
(share+"websockify"+"client").install "wsirc.html", "wstelnet.html", "include" | ||
|
||
(share+"websockify").install "other/js" => "node-js" | ||
|
||
(share+"websockify"+"ruby").install "other/websocket.rb", "other/websockify.rb" | ||
|
||
(share+"websockify"+"clojure").install "other/project.clj", "other/websockify.clj" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the spacing between all the |
||
|
||
# Binaries not installed in bin (as bin.install ):- | ||
# - rebind: coding of discovery of rebind.so needs re-writing | ||
# - other/wswrap: dependency wswrapper.so seems to be missing | ||
# - other/launch.sh: coding of path discovery of dependencies is just too weird to work | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If these are useless/unfixable/etc you can just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copied into share for now as rebind is used occasionally. However, it would need a complete re-write to actually be FHS friendly... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you elaborate there a bit? Sounds like a good reason to remove them. |
||
(share+"websockify"+"scripts").install "rebind", "other/wswrap" => "wswrap", "other/launch.sh" => "launch.sh" | ||
end | ||
|
||
# This test will fail if either of the ports 50000 or 500001 are in use | ||
test do | ||
system "websockify", "--timeout=1", "127.0.0.1:50000", "127.0.0.1:50001" | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No Python resources required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently not, but I'm not a Python brew expert...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the upstream Git for either a
requirements.txt
file or if that doesn't exist open thesetup.py
file and see if any other Python modules are listed as required. I'd be surprised if there was nothing as a resource needed here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tdsmith may be able to help with anything Python-esque if you have any questions on the way Brew handles Python formulae. He's the Python expert around Brew :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will explore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no
requirements.txt
but there does seem to be ainstall_requires=['numpy']
insetup.py
. However, that seems to already be part of Mavericks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it part of the other OS X versions as well? If it isn't you may need to create a conditional resource, along the lines of:
and then:
Or similar. Tim will probably be able to tell you how widely available
numpy
is on the OS X versions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will investigate. Ta for the code snippet.
On 8 Feb 2015 12:12, "Dominyk Tiller" notifications@github.com wrote: