2011-08-14 13:16:42 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class ScmManagerCliClient < Formula
|
|
|
|
homepage 'http://www.scm-manager.org'
|
2012-11-02 09:02:17 +00:00
|
|
|
url 'http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.22/scm-cli-client-1.22-jar-with-dependencies.jar'
|
|
|
|
version '1.22'
|
|
|
|
sha1 '04fdd29dc42411da690e7c7157679a1679ba0818'
|
2011-08-14 13:16:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class ScmManager < Formula
|
|
|
|
homepage 'http://www.scm-manager.org'
|
2012-11-02 09:02:17 +00:00
|
|
|
url 'http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.22/scm-server-1.22-app.tar.gz'
|
|
|
|
version '1.22'
|
|
|
|
sha1 'c8ce68bf1664308d5931202ec3db9334a4d0112b'
|
2011-08-14 13:16:42 +00:00
|
|
|
|
2012-10-17 14:50:14 +00:00
|
|
|
skip_clean 'libexec/var/log'
|
2011-08-14 13:16:42 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
rm_rf Dir['bin/*.bat']
|
|
|
|
|
|
|
|
libexec.install Dir['*']
|
|
|
|
|
|
|
|
(bin/'scm-server').write <<-EOS.undent
|
|
|
|
#!/bin/bash
|
|
|
|
BASEDIR="#{libexec}"
|
|
|
|
REPO="#{libexec}/lib"
|
|
|
|
"#{libexec}/bin/scm-server" "$@"
|
|
|
|
EOS
|
|
|
|
chmod 0755, bin/'scm-server'
|
|
|
|
|
|
|
|
tools = libexec/'tools'
|
|
|
|
ScmManagerCliClient.new.brew { tools.install Dir['*'] }
|
|
|
|
|
|
|
|
scmCliClient = bin+'scm-cli-client'
|
|
|
|
scmCliClient.write <<-EOS.undent
|
|
|
|
#!/bin/bash
|
2012-06-03 11:30:21 +00:00
|
|
|
java -jar "#{tools}/scm-cli-client-#{version}-jar-with-dependencies.jar" "$@"
|
2011-08-14 13:16:42 +00:00
|
|
|
EOS
|
|
|
|
chmod 0755, scmCliClient
|
|
|
|
end
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
plist_options :manual => 'scm-server start'
|
|
|
|
|
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//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>#{opt_prefix}/bin/scm-server</string>
|
|
|
|
<string>start</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
2011-08-14 13:16:42 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|