git: e8dfd717d86d - main - sysutils/bhyvemgr: New port: Bhyve management GUI written in Freepascal/Lazarus

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Sun, 08 Sep 2024 02:51:43 UTC
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e8dfd717d86de3fb97978631073621bcb0da5663

commit e8dfd717d86de3fb97978631073621bcb0da5663
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2024-09-08 02:50:17 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2024-09-08 02:50:17 +0000

    sysutils/bhyvemgr: New port: Bhyve management GUI written in Freepascal/Lazarus
    
    Bhyvemgr is a bhyve management GUI written in Freepascal/Lazarus ofor FreeBSD.
    It needs a bunch of tools mostly installed on base system and some installed
    from ports/packages. Currently it supports only amd64. The main goal is to be a
    desktop user application to easily and quickly setup and run virtual machines
    on the FreeBSD host.
---
 sysutils/Makefile           |  1 +
 sysutils/bhyvemgr/Makefile  | 48 ++++++++++++++++++++++++++++++++++++++++++
 sysutils/bhyvemgr/distinfo  |  3 +++
 sysutils/bhyvemgr/pkg-descr |  5 +++++
 sysutils/bhyvemgr/pkg-plist | 51 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 108 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index d19bcb5bc674..a845cb8200b5 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -135,6 +135,7 @@
     SUBDIR += bhyve+
     SUBDIR += bhyve-firmware
     SUBDIR += bhyve-rc
+    SUBDIR += bhyvemgr
     SUBDIR += biosfont
     SUBDIR += bkpupsd
     SUBDIR += bksh
diff --git a/sysutils/bhyvemgr/Makefile b/sysutils/bhyvemgr/Makefile
new file mode 100644
index 000000000000..07506c81d967
--- /dev/null
+++ b/sysutils/bhyvemgr/Makefile
@@ -0,0 +1,48 @@
+PORTNAME=	bhyvemgr
+DISTVERSIONPREFIX=	v
+PORTVERSION=	1.0.0
+CATEGORIES=	editors
+PKGNAMESUFFIX=	${LAZARUS_PKGNAMESUFFIX}
+
+MAINTAINER=	acm@FreeBSD.org
+COMMENT=	bhyve manager GUI written in Lazarus/Freepascal
+WWW=		https://github.com/alonsobsd/bhyvemgr
+
+LICENSE=	BSD3CLAUSE
+
+RUN_DEPENDS=	bhyve-firmware>0:sysutils/bhyve-firmware \
+		virt-viewer>0:net-mgmt/virt-viewer \
+		freerdp3>0:net/freerdp3 \
+		sudo>0:security/sudo
+
+ONLY_FOR_ARCHS=	amd64
+
+USES=		desktop-file-utils fpc lazarus:flavors xorg
+USE_XORG=	x11
+USE_GITHUB=	yes
+GH_ACCOUNT=	alonsobsd
+
+LAZARUS_PROJECT_FILES=	bhyvemgr.lpi
+
+LAZBUILD_ARGS=		-d
+
+gtk2_CONFLICTS_INSTALL=	${PORTNAME}-qt5 ${PORTNAME}-qt6
+qt5_CONFLICTS_INSTALL=	${PORTNAME}-gtk2 ${PORTNAME}-qt6
+qt6_CONFLICTS_INSTALL=	${PORTNAME}-gtk2 ${PORTNAME}-qt5
+
+USE_FPC_gtk2=	cairo
+USE_GNOME_gtk2=	cairo
+USE_FPC+=	${USE_FPC_${FLAVOR}}
+USE_GNOME+=	${USE_GNOME_${FLAVOR}}
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_DATA} ${WRKSRC}/setup/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/512x512/apps
+	${INSTALL_DATA} ${WRKSRC}/setup/${PORTNAME}.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/512x512/apps/${PORTNAME}.png
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
+	${INSTALL_DATA} ${WRKSRC}/setup/${PORTNAME}.svg ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svg
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	cd ${WRKSRC} && ${COPYTREE_SHARE} "images" ${STAGEDIR}${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/sysutils/bhyvemgr/distinfo b/sysutils/bhyvemgr/distinfo
new file mode 100644
index 000000000000..a426552958de
--- /dev/null
+++ b/sysutils/bhyvemgr/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1725763145
+SHA256 (alonsobsd-bhyvemgr-v1.0.0_GH0.tar.gz) = 27246df9506d58b172cd6f2d3e2bd4ee719f4998734c0493e6605099da43d859
+SIZE (alonsobsd-bhyvemgr-v1.0.0_GH0.tar.gz) = 239802
diff --git a/sysutils/bhyvemgr/pkg-descr b/sysutils/bhyvemgr/pkg-descr
new file mode 100644
index 000000000000..bd97a011fe3b
--- /dev/null
+++ b/sysutils/bhyvemgr/pkg-descr
@@ -0,0 +1,5 @@
+Bhyvemgr is a bhyve management GUI written in Freepascal/Lazarus for FreeBSD.
+It needs a bunch of tools mostly installed on base system and some installed
+from ports/packages. Currently it supports only amd64. The main goal is to be a
+desktop user application to easily and quickly setup and run virtual machines
+on the FreeBSD host.
diff --git a/sysutils/bhyvemgr/pkg-plist b/sysutils/bhyvemgr/pkg-plist
new file mode 100644
index 000000000000..6ad70a52df3a
--- /dev/null
+++ b/sysutils/bhyvemgr/pkg-plist
@@ -0,0 +1,51 @@
+bin/bhyvemgr
+share/applications/bhyvemgr.desktop
+%%DATADIR%%/images/additional/reload.ico
+%%DATADIR%%/images/additional/save.ico
+%%DATADIR%%/images/additional/search.ico
+%%DATADIR%%/images/additional/start.ico
+%%DATADIR%%/images/additional/stop.ico
+%%DATADIR%%/images/additional/vnc.ico
+%%DATADIR%%/images/devices/audio.png
+%%DATADIR%%/images/devices/category.png
+%%DATADIR%%/images/devices/cd.png
+%%DATADIR%%/images/devices/console.png
+%%DATADIR%%/images/devices/display.png
+%%DATADIR%%/images/devices/hd.png
+%%DATADIR%%/images/devices/hostbridge.png
+%%DATADIR%%/images/devices/input.png
+%%DATADIR%%/images/devices/lpc.png
+%%DATADIR%%/images/devices/network.png
+%%DATADIR%%/images/devices/nvme.png
+%%DATADIR%%/images/devices/passthru.png
+%%DATADIR%%/images/devices/rnd.png
+%%DATADIR%%/images/devices/sharefolder.png
+%%DATADIR%%/images/devices/usb.png
+%%DATADIR%%/images/menu/add.png
+%%DATADIR%%/images/menu/edit.png
+%%DATADIR%%/images/menu/rdp.png
+%%DATADIR%%/images/menu/remove.png
+%%DATADIR%%/images/systems/almalinux.png
+%%DATADIR%%/images/systems/alpinelinux.png
+%%DATADIR%%/images/systems/archlinux.png
+%%DATADIR%%/images/systems/category.png
+%%DATADIR%%/images/systems/debian.png
+%%DATADIR%%/images/systems/dragonflybsd.png
+%%DATADIR%%/images/systems/endeavouros.png
+%%DATADIR%%/images/systems/fedora.png
+%%DATADIR%%/images/systems/freebsd.png
+%%DATADIR%%/images/systems/ghostbsd.png
+%%DATADIR%%/images/systems/kalilinux.png
+%%DATADIR%%/images/systems/linux.png
+%%DATADIR%%/images/systems/manjaro.png
+%%DATADIR%%/images/systems/netbsd.png
+%%DATADIR%%/images/systems/nomadbsd.png
+%%DATADIR%%/images/systems/openbsd.png
+%%DATADIR%%/images/systems/other.png
+%%DATADIR%%/images/systems/parrot.png
+%%DATADIR%%/images/systems/popos.png
+%%DATADIR%%/images/systems/rockylinux.png
+%%DATADIR%%/images/systems/ubuntu.png
+%%DATADIR%%/images/systems/windows.png
+share/icons/hicolor/512x512/apps/bhyvemgr.png
+share/icons/hicolor/scalable/apps/bhyvemgr.svg