git: 8f7f59bbc250 - main - sysutils/bmd-plugin-hookcmd: add new ports.

From: Vanilla I. Shu <vanilla_at_FreeBSD.org>
Date: Fri, 01 Sep 2023 02:54:24 UTC
The branch main has been updated by vanilla:

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

commit 8f7f59bbc2504672483c7840638c7fc171e1b9f5
Author:     Vanilla I. Shu <vanilla@FreeBSD.org>
AuthorDate: 2023-09-01 02:53:25 +0000
Commit:     Vanilla I. Shu <vanilla@FreeBSD.org>
CommitDate: 2023-09-01 02:54:14 +0000

    sysutils/bmd-plugin-hookcmd: add new ports.
    
    PR:             273437
    Reported by:    Yuichiro NAITO <naito.yuichiro at gmail.com>
---
 sysutils/Makefile                                |  1 +
 sysutils/bmd-plugin-hookcmd/Makefile             | 24 ++++++++++++++++++++++++
 sysutils/bmd-plugin-hookcmd/distinfo             |  3 +++
 sysutils/bmd-plugin-hookcmd/files/patch-Makefile | 12 ++++++++++++
 sysutils/bmd-plugin-hookcmd/pkg-descr            |  3 +++
 sysutils/bmd-plugin-hookcmd/pkg-plist            |  3 +++
 6 files changed, 46 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index e1e7eeccc70e..50941c47c8d2 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -138,6 +138,7 @@
     SUBDIR += blisp
     SUBDIR += bmd
     SUBDIR += bmd-plugin-avahi
+    SUBDIR += bmd-plugin-hookcmd
     SUBDIR += boot-extract
     SUBDIR += bottom
     SUBDIR += bpytop
diff --git a/sysutils/bmd-plugin-hookcmd/Makefile b/sysutils/bmd-plugin-hookcmd/Makefile
new file mode 100644
index 000000000000..5b9fa39b7d43
--- /dev/null
+++ b/sysutils/bmd-plugin-hookcmd/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	bmd-plugin-hookcmd
+DISTVERSION=	1.0
+CATEGORIES=	sysutils
+
+MAINTAINER=	naito.yuichiro@gmail.com
+COMMENT=	BMD plugin hookcmd
+WWW=		https://github.com/yuichiro-naito/bmd-plugin-hookcmd
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+# Because bhyve runs on amd64 only.
+ONLY_FOR_ARCHS=	amd64
+
+BUILD_DEPENDS=	bmd>0:sysutils/bmd
+RUN_DEPENDS=	bmd>0:sysutils/bmd
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	yuichiro-naito
+
+pre-install:
+	${MKDIR} ${STAGEDIR}/${LOCALBASE}/libexec/bmd
+
+.include <bsd.port.mk>
diff --git a/sysutils/bmd-plugin-hookcmd/distinfo b/sysutils/bmd-plugin-hookcmd/distinfo
new file mode 100644
index 000000000000..1f55b648a871
--- /dev/null
+++ b/sysutils/bmd-plugin-hookcmd/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1693228512
+SHA256 (yuichiro-naito-bmd-plugin-hookcmd-1.0_GH0.tar.gz) = 0a856474290f23fcff5ba5eeab62d356df6d864528f5c56504769ac05a94917f
+SIZE (yuichiro-naito-bmd-plugin-hookcmd-1.0_GH0.tar.gz) = 2589
diff --git a/sysutils/bmd-plugin-hookcmd/files/patch-Makefile b/sysutils/bmd-plugin-hookcmd/files/patch-Makefile
new file mode 100644
index 000000000000..fb9d88ce51dc
--- /dev/null
+++ b/sysutils/bmd-plugin-hookcmd/files/patch-Makefile
@@ -0,0 +1,12 @@
+--- Makefile.orig	2023-08-15 09:05:51 UTC
++++ Makefile
+@@ -1,5 +1,9 @@ MK_DEBUG_FILES=	no
+ LOCALBASE?= 	/usr/local
+ MK_DEBUG_FILES=	no
++BINOWN!=	id -u
++BINGRP!=	id -g
++SHAREOWN=	${BINOWN}
++SHAREGRP=	${BINGRP}
+ SHLIB=		bmdplugin_hookcmd
+ SHLIB_MAJOR=	1
+ CFLAGS+=	-I${LOCALBASE}/include -DLOCALBASE=\"${LOCALBASE}\"
diff --git a/sysutils/bmd-plugin-hookcmd/pkg-descr b/sysutils/bmd-plugin-hookcmd/pkg-descr
new file mode 100644
index 000000000000..225d92c8bedf
--- /dev/null
+++ b/sysutils/bmd-plugin-hookcmd/pkg-descr
@@ -0,0 +1,3 @@
+The bmd-plugin-hookcmd spawns the specific command when VM status is changed.
+If you write a script that mail to you, you will be notified when VM is started
+and stopped.
diff --git a/sysutils/bmd-plugin-hookcmd/pkg-plist b/sysutils/bmd-plugin-hookcmd/pkg-plist
new file mode 100644
index 000000000000..91ba9d6dabce
--- /dev/null
+++ b/sysutils/bmd-plugin-hookcmd/pkg-plist
@@ -0,0 +1,3 @@
+libexec/bmd/libbmdplugin_hookcmd.so
+libexec/bmd/libbmdplugin_hookcmd.so.1
+man/man8/bmd-plugin-hookcmd.8.gz