-
Notifications
You must be signed in to change notification settings - Fork 0
/
cgss.rb
67 lines (63 loc) · 2.06 KB
/
cgss.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# cgss.rb
#
# Copyright (c) 2017 Junpei Kawamoto
#
# This file is part of cgss.
#
# cgss is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cgss is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cgss. If not, see <http://www.gnu.org/licenses/>.
#
require 'rbconfig'
class Cgss < Formula
desc "Cross-Group Secret Sharing"
homepage "https://github.com/jkawamoto/cgss"
version "0.2.0"
if Hardware::CPU.is_64_bit?
case RbConfig::CONFIG['host_os']
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
:windows
when /darwin|mac os/
url "https://github.com/jkawamoto/cgss/releases/download/v0.2.0/cgss_0.2.0_darwin_amd64.zip"
sha256 "d41b30f648eca977f38e4ee88b6cf1b84d653242ff6d00f57c3d5bd31686c7e6"
when /linux/
url "https://github.com/jkawamoto/cgss/releases/download/v0.2.0/cgss_0.2.0_linux_amd64.tar.gz"
sha256 "b5c063960d5c9ae39783dc51a5c122ed98a049895124f148daaeac37df05dc27"
when /solaris|bsd/
:unix
else
:unknown
end
else
case RbConfig::CONFIG['host_os']
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
:windows
when /darwin|mac os/
url "https://github.com/jkawamoto/cgss/releases/download/v0.2.0/cgss_0.2.0_darwin_386.zip"
sha256 "952c84a86df65801540993c7d83d4fbdde51dbaf7278790db8dc74b2eb0c6d66"
when /linux/
url "https://github.com/jkawamoto/cgss/releases/download/v0.2.0/cgss_0.2.0_linux_386.tar.gz"
sha256 "80e1b63576194dd024dad41df5bc351cb8a43f0c6d683846fbb224fc8205e8e4"
when /solaris|bsd/
:unix
else
:unknown
end
end
def install
bin.install "cgss"
end
test do
system "cgss"
end
end