2014-12-23 03:33:45 +00:00
|
|
|
class VirtManager < Formula
|
2018-02-24 19:56:01 +00:00
|
|
|
include Language::Python::Virtualenv
|
|
|
|
|
2015-11-25 18:32:56 +00:00
|
|
|
desc "App for managing virtual machines"
|
2015-04-03 01:26:05 +00:00
|
|
|
homepage "https://virt-manager.org/"
|
2019-07-13 14:25:12 +00:00
|
|
|
url "https://virt-manager.org/download/sources/virt-manager/virt-manager-2.2.1.tar.gz"
|
|
|
|
sha256 "cfd88d66e834513e067b4d3501217e21352fadb673103bacb9e646da9f029a1b"
|
2019-09-07 00:26:33 +00:00
|
|
|
revision 2
|
2014-12-23 03:33:45 +00:00
|
|
|
|
|
|
|
depends_on "intltool" => :build
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "pkg-config" => :build
|
2015-04-03 00:40:06 +00:00
|
|
|
|
2018-02-24 19:56:01 +00:00
|
|
|
depends_on "adwaita-icon-theme"
|
2014-12-23 03:33:45 +00:00
|
|
|
depends_on "gtk+3"
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "gtk-vnc"
|
2019-06-23 13:47:28 +00:00
|
|
|
depends_on "gtksourceview4"
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "hicolor-icon-theme"
|
|
|
|
depends_on "libosinfo"
|
|
|
|
depends_on "libvirt"
|
2014-12-23 03:33:45 +00:00
|
|
|
depends_on "libvirt-glib"
|
2019-01-06 20:52:14 +00:00
|
|
|
depends_on "libxml2" # need python3 bindings
|
2018-08-08 00:04:59 +00:00
|
|
|
depends_on "osinfo-db"
|
2019-01-05 22:51:11 +00:00
|
|
|
depends_on "py3cairo"
|
|
|
|
depends_on "pygobject3"
|
|
|
|
depends_on "python"
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "spice-gtk"
|
2014-12-23 03:33:45 +00:00
|
|
|
depends_on "vte3"
|
|
|
|
|
|
|
|
resource "libvirt-python" do
|
2019-10-07 10:39:36 +00:00
|
|
|
url "https://libvirt.org/sources/python/libvirt-python-5.8.0.tar.gz"
|
|
|
|
sha256 "4617fa535364a155425dc99f639b3a0fe9f703eb36feb56b3917b5443a1ddf4f"
|
2017-09-06 17:12:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "idna" do
|
2019-01-05 22:51:11 +00:00
|
|
|
url "https://pypi.io/packages/source/i/idna/idna-2.8.tar.gz"
|
|
|
|
sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"
|
2017-09-06 17:12:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "certifi" do
|
2019-06-23 13:47:28 +00:00
|
|
|
url "https://pypi.io/packages/source/c/certifi/certifi-2019.6.16.tar.gz"
|
|
|
|
sha256 "945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695"
|
2017-09-06 17:12:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "chardet" do
|
|
|
|
url "https://pypi.io/packages/source/c/chardet/chardet-3.0.4.tar.gz"
|
|
|
|
sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "urllib3" do
|
2019-06-23 13:47:28 +00:00
|
|
|
url "https://pypi.io/packages/source/u/urllib3/urllib3-1.25.3.tar.gz"
|
|
|
|
sha256 "dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232"
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
|
2015-11-25 23:24:56 +00:00
|
|
|
resource "requests" do
|
2019-06-23 13:47:28 +00:00
|
|
|
url "https://pypi.io/packages/source/r/requests/requests-2.22.0.tar.gz"
|
|
|
|
sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4"
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
|
2019-01-05 22:51:11 +00:00
|
|
|
# virt-manager doesn't prompt for password on macOS unless --no-fork flag is provided
|
2017-09-06 17:12:44 +00:00
|
|
|
patch :DATA
|
2014-12-23 03:33:45 +00:00
|
|
|
|
|
|
|
def install
|
2019-01-05 22:51:11 +00:00
|
|
|
venv = virtualenv_create(libexec, "python3")
|
2018-02-24 19:56:01 +00:00
|
|
|
venv.pip_install resources
|
2014-12-23 03:33:45 +00:00
|
|
|
|
2019-01-05 22:51:11 +00:00
|
|
|
# virt-manager uses distutils, doesn't like --single-version-externally-managed
|
2018-02-24 19:56:01 +00:00
|
|
|
system "#{libexec}/bin/python", "setup.py",
|
2014-12-23 03:33:45 +00:00
|
|
|
"configure",
|
|
|
|
"--prefix=#{libexec}"
|
2018-02-24 19:56:01 +00:00
|
|
|
system "#{libexec}/bin/python", "setup.py",
|
2015-11-25 23:24:56 +00:00
|
|
|
"--no-user-cfg",
|
|
|
|
"--no-update-icon-cache",
|
|
|
|
"--no-compile-schemas",
|
2019-01-05 22:51:11 +00:00
|
|
|
"install"
|
2014-12-23 03:33:45 +00:00
|
|
|
|
2018-02-24 19:56:01 +00:00
|
|
|
# install virt-manager commands with PATH set to Python virtualenv environment
|
|
|
|
bin.install Dir[libexec/"bin/virt-*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PATH => "#{libexec}/bin:$PATH")
|
2015-01-05 14:37:10 +00:00
|
|
|
|
2019-01-05 22:51:11 +00:00
|
|
|
share.install Dir[libexec/"share/man"]
|
2015-01-05 14:37:10 +00:00
|
|
|
share.install Dir[libexec/"share/glib-2.0"]
|
|
|
|
share.install Dir[libexec/"share/icons"]
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def post_install
|
|
|
|
# manual schema compile step
|
|
|
|
system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
|
|
|
|
# manual icon cache update step
|
2015-09-07 02:19:05 +00:00
|
|
|
system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "#{HOMEBREW_PREFIX}/share/icons/hicolor"
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
2018-02-24 19:56:01 +00:00
|
|
|
|
|
|
|
test do
|
2018-02-25 02:00:27 +00:00
|
|
|
system "#{bin}/virt-manager", "--version"
|
2018-02-24 19:56:01 +00:00
|
|
|
end
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
__END__
|
2019-01-05 22:51:11 +00:00
|
|
|
diff --git a/virt-manager b/virt-manager
|
|
|
|
index 15d5109..8ee305a 100755
|
2017-09-06 17:12:44 +00:00
|
|
|
--- a/virt-manager
|
|
|
|
+++ b/virt-manager
|
2019-01-05 22:51:11 +00:00
|
|
|
@@ -151,7 +151,8 @@ def parse_commandline():
|
2017-09-06 17:12:44 +00:00
|
|
|
help="Print debug output to stdout (implies --no-fork)",
|
|
|
|
default=False)
|
|
|
|
parser.add_argument("--no-fork", action="store_true",
|
|
|
|
- help="Don't fork into background on startup")
|
|
|
|
+ help="Don't fork into background on startup",
|
|
|
|
+ default=True)
|
2019-01-05 22:51:11 +00:00
|
|
|
|
|
|
|
parser.add_argument("--show-domain-creator", action="store_true",
|
|
|
|
help="Show 'New VM' wizard")
|