Addport: emulators/vtoolbox Provides effective control of virtual machines of VirtualBox

icon-external-link.png (virtualization solution) on a FreeBSD
headless server, published as free and open source software.

WWW: http://vboxtool.sourceforge.net

PR:		ports/169211
Submitted by:	pjm
This commit is contained in:
Michael Scheidell 2012-07-13 09:17:01 +00:00
parent db5c3459b9
commit fd7ef396cd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300839
9 changed files with 148 additions and 0 deletions

View file

@ -166,6 +166,7 @@
SUBDIR += uae
SUBDIR += vMac
SUBDIR += vba
SUBDIR += vboxtool
SUBDIR += vgb-bin
SUBDIR += vgba-bin
SUBDIR += vice

View file

@ -0,0 +1,45 @@
# New ports collection makefile for: oneko
# Date created: 14 December 2012
# Whom: pjm
#
# $FreeBSD$
#
PORTNAME= vboxtool
PORTVERSION= 0.5
CATEGORIES= emulators
MASTER_SITES= SF
MAINTAINER= pierrejacques.mimifir@gmail.com
COMMENT= Provides effective control of VirtualBox machines
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING.txt
RUN_DEPENDS= VBoxManage:${PORTSDIR}/emulators/virtualbox-ose\
bash:${PORTSDIR}/shells/bash
NO_WRKSUBDIR= yes
NO_BUILD= yes
GROUPS= vboxusers
USE_ZIP= yes
SAMPLESDIR= ${PREFIX}/share/${PORTNAME}
do-install:
@if [ ! -f ${PREFIX}/etc/${PORTNAME} ]; then \
${MKDIR} ${PREFIX}/etc/${PORTNAME};\
fi
${MKDIR} ${EXAMPLESDIR}
@if [ ! -f ${PREFIX}/etc/${PORTNAME}/vboxtool.conf ]; then \
${INSTALL_DATA} ${FILESDIR}/vboxtool.conf ${PREFIX}/etc/${PORTNAME}/vboxtool.conf;\
fi
@if [ ! -f ${PREFIX}/etc/${PORTNAME}/machines.conf ]; then \
${INSTALL_DATA} ${FILESDIR}/machines.conf ${PREFIX}/etc/${PORTNAME}/machines.conf;\
fi
${INSTALL_SCRIPT} -m 0750 ${WRKSRC}/script/vboxtool ${PREFIX}/bin/vboxtool
${INSTALL_SCRIPT} -m 0750 ${WRKSRC}/script/vboxtoolinit ${PREFIX}/etc/rc.d/vboxtoolinit
${INSTALL_DATA} ${FILESDIR}/machines.conf ${EXAMPLESDIR}/machines.conf
${INSTALL_DATA} ${FILESDIR}/vboxtool.conf ${EXAMPLESDIR}/vboxtool.conf
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (vboxtool-0.5.zip) = 8c5f006bbb08142d9babfce47db4ba5ba641cfe3aa88b1489e67c219460ace93
SIZE (vboxtool-0.5.zip) = 26829

View file

@ -0,0 +1,9 @@
##each line in this file is a separate machine
##structure of each line: <session name>,<vrde-port>,<host port>-<guest port>|...
##the delimiter ',' between name and VRDE-port only required when configuring
##portforwarding
##do not use spaces before and after the first ',' delimiter
##lines can be commented out by '#'#Ubuntu Desktop #1
#Ubuntu Desktop #2,3391
#Ubuntu JeOS #1,3392,2022-22|80-80
#Ubuntu JeOS #2,,2022-22|80-80

View file

@ -0,0 +1,37 @@
--- script/vboxtool.org 2012-04-29 21:59:59.000000000 +0200
+++ script/vboxtool 2012-06-16 01:26:32.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
#
# vboxtool: Utility to retrieve status and control VirtualBox sessions
#
@@ -55,7 +55,7 @@
echo " --version|version Version info."
echo " --help|help This help."
echo ""
- echo "*Configuration. vboxtool depends on two config files, located in /etc/vboxtool."
+ echo "*Configuration. vboxtool depends on two config files, located in /usr/local/etc/vboxtool."
echo ""
echo "Configuration file $machines_conf:"
echo "- each line in this file is a separate machine"
@@ -84,7 +84,7 @@
echo ""
echo "*Start at boot, save on halt. VBoxTool is capable for autostart sessions at"
echo "boot time and autosave sessions when host is stopped. This depends on "
- echo "/etc/vboxtool/vboxtool.conf. In here, the variable vbox_user must be filled:"
+ echo "/usr/local/etc/vboxtool/vboxtool.conf. In here, the variable vbox_user must be filled:"
echo "vbox_user='<user name>'"
echo "Note the quotes. Fill for <user name> the name of the user under which"
echo "sessions are installed/running."
@@ -545,8 +545,8 @@
# Some constants
version='0.5'
-machines_conf='/etc/vboxtool/machines.conf'
-vboxtool_conf='/etc/vboxtool/vboxtool.conf'
+machines_conf='/usr/local/etc/vboxtool/machines.conf'
+vboxtool_conf='/usr/local/etc/vboxtool/vboxtool.conf'
vbox_folder="$HOME/.VirtualBox"
log_file="$vbox_folder/vboxtool.log"

View file

@ -0,0 +1,39 @@
--- script/vboxtoolinit.org 2012-04-29 21:59:59.000000000 +0200
+++ script/vboxtoolinit 2012-06-16 01:26:32.000000000 +0200
@@ -1,14 +1,14 @@
-#!/bin/bash
+#!/usr/local/bin/bash
#
# vboxtoolinit: Frontend for vboxtool for auto start sessions when booting and save
# sessions when host is stopped
#
-# This is a wrapper for vboxtool. It is to be placed in /etc/init.d to provide auto
+# This is a wrapper for vboxtool. It is to be placed in /usr/loca/etc/rc.d to provide auto
# start at boot time and stop when the host is halted. Because it's a wrapper, the
# original functions of vboxtool can be executed as usual, without cd'ing to
-# /etc/init.d.
+# /usr/local/etc/rc.d.
#
-# Usage: Should be placed in /etc/init.d
+# Usage: Should be placed in /usr/local/etc/rc.d
#
# Copyright (C) 2008 Mark Baaijens <mark.baaijens@gmail.com>
#
@@ -44,7 +44,7 @@
start()
{
# 'vboxtoolinit start' maps to 'vboxtool autostart'; when the host boots, all sessions in
- # the config file /etc/vboxtool/machines.conf are started
+ # the config file /usr/local/etc/vboxtool/machines.conf are started
nohup $su_command "vboxtool autostart" > /dev/null
}
@@ -62,7 +62,7 @@
}
# Some constants
-config_file='/etc/vboxtool/vboxtool.conf'
+config_file='/usr/local/etc/vboxtool/vboxtool.conf'
# Retrieve settings from config file, just by executing the config file.
# Config file $config_file should look like this:

View file

@ -0,0 +1,2 @@
vbox_user='vboxusers'
backup_folder=/home/vboxusers/vboxbackup

View file

@ -0,0 +1,5 @@
Provides effective control of virtual machines of VirtualBox
icon-external-link.png (virtualization solution) on a FreeBSD
headless server, published as free and open source software.
WWW: http://vboxtool.sourceforge.net

View file

@ -0,0 +1,8 @@
@unexec if cmp -s %%PREFIX%%/%%EXAMPLESDIR%%/machines.conf %D/etc/vboxtool/machines.conf; then rm -f %D/etc/vboxtool/machines.conf; fi
@unexec if cmp -s %%PREFIX%%/%%EXAMPLESDIR%%/vboxtool.conf %D/etc/vboxtool/vboxtool.conf; then rm -f %D/etc/vboxtool/vboxtool.conf; fi
bin/vboxtool
etc/rc.d/vboxtoolinit
%%EXAMPLESDIR%%/machines.conf
%%EXAMPLESDIR%%/vboxtool.conf
@dirrmtry etc/vboxtool
@dirrmtry %%EXAMPLESDIR%%