Page MenuHomeFreeBSD

D49277.1796599803.diff
No OneTemporary

Authored By
Unknown
Size
6 KB
Referenced Files
None
Subscribers
None

D49277.1796599803.diff

Index: net-mgmt/Makefile
===================================================================
--- net-mgmt/Makefile
+++ net-mgmt/Makefile
@@ -383,6 +383,7 @@
SUBDIR += seafile-server
SUBDIR += semaphore
SUBDIR += sendip
+ SUBDIR += simplomon
SUBDIR += sipcalc
SUBDIR += sjitter
SUBDIR += smartctl_exporter
Index: net-mgmt/simplomon/Makefile
===================================================================
--- /dev/null
+++ net-mgmt/simplomon/Makefile
@@ -0,0 +1,51 @@
+PORTNAME= simplomon
+DISTVERSION= g20250224
+CATEGORIES= net-mgmt dns net
+MAINTAINER= dch@FreeBSD.org
+COMMENT= Simple network status and uptime monitoring tool
+WWW= https://github.com/berthubert/simplomon
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} \
+ nlohmann-json>0:devel/nlohmann-json \
+ xxd>0:sysutils/xxd
+
+LIB_DEPENDS= libcurl.so:ftp/curl \
+ libfmt.so:devel/libfmt \
+ libnghttp2.so:www/libnghttp2
+USES= cmake:indirect compiler:c++17-lang llvm:18,build lua:53,build meson ninja \
+ pkgconfig python:build sqlite ssl
+
+USE_GITHUB= yes
+GH_ACCOUNT= berthubert
+GH_TAGNAME= b4fea5b # https://github.com/berthubert/simplomon/pull/58
+GH_TUPLE= berthubert:sqlitewrite:a2c2ee:sqlitewrite \
+ ahuPowerDNS:simplesocket:3af5e1d:simplesocket \
+ yhirose:cpp-httplib:v0.13.1:httplib
+
+USE_RC_SUBR= simplomon
+
+MESON_ARGS+= --default-library=static \
+ --prefer-static \
+ --strip \
+ --wrap-mode=nodownload
+
+SUB_FILES= simplomon
+
+PLIST_FILES= bin/simplomon
+
+post-extract:
+ ${RLN} ${WRKDIR}/sqlitewrite-* ${WRKSRC}/subprojects/sqlitewriter
+ ${RLN} ${WRKDIR}/simplesocket-* ${WRKSRC}/subprojects/simplesockets
+ ${RLN} ${WRKDIR}/cpp-httplib-* ${WRKSRC}/subprojects/
+
+post-build:
+ ${RM} -rf ${WRKDIR}/_build/meson-private ${WRKSRC}/subprojects
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/_build/simplomon \
+ ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
Index: net-mgmt/simplomon/distinfo
===================================================================
--- /dev/null
+++ net-mgmt/simplomon/distinfo
@@ -0,0 +1,9 @@
+TIMESTAMP = 1741342561
+SHA256 (berthubert-simplomon-g20250224-b4fea5b_GH0.tar.gz) = 834aa0f83167feb1b9eeb36602bb933cb71884dcf558fea8e69cce73a2556c4f
+SIZE (berthubert-simplomon-g20250224-b4fea5b_GH0.tar.gz) = 260634
+SHA256 (berthubert-sqlitewrite-a2c2ee_GH0.tar.gz) = 5a0d40c1e1e28a673fbc9b2f311bc97a629470a8388c0aa297720a7a83d4d8d8
+SIZE (berthubert-sqlitewrite-a2c2ee_GH0.tar.gz) = 78179
+SHA256 (ahuPowerDNS-simplesocket-3af5e1d_GH0.tar.gz) = 5a5ee9856f0ec44ddbb956c6f35408f2f90e37c2fc66269603aae7b190051c76
+SIZE (ahuPowerDNS-simplesocket-3af5e1d_GH0.tar.gz) = 84280
+SHA256 (yhirose-cpp-httplib-v0.13.1_GH0.tar.gz) = 9b837d290b61e3f0c4239da0b23bbf14c382922e2bf2a9bac21c1e3feabe1ff9
+SIZE (yhirose-cpp-httplib-v0.13.1_GH0.tar.gz) = 644015
Index: net-mgmt/simplomon/files/patch-meson.build
===================================================================
--- /dev/null
+++ net-mgmt/simplomon/files/patch-meson.build
@@ -0,0 +1,22 @@
+--- meson.build.orig 2025-02-19 22:01:58 UTC
++++ meson.build
+@@ -66,7 +66,6 @@ sqlitewriter_dep = dependency('sqlitewriter', static:
+
+ cpphttplib = dependency('cpp-httplib')
+ sqlitewriter_dep = dependency('sqlitewriter', static: true)
+-doctest_dep=dependency('doctest')
+ simplesockets_dep = dependency('simplesockets', static: true)
+ # argparse_dep = dependency('argparse', version: '>=3')
+
+@@ -104,11 +103,3 @@ webpages,
+ webpages,
+ dependencies: [json_dep, fmt_dep, cpphttplib,
+ simplesockets_dep, lua_dep, curl_dep, sqlite_dep, sqlitewriter_dep])
+-
+-executable('testrunner', 'testrunner.cc', 'notifiers.cc', 'minicurl.cc', 'dnsmon.cc', 'record-types.cc', 'dnsmessages.cc', 'dns-storage.cc', 'netmon.cc', 'luabridge.cc', 'webservice.cc', 'support.cc', 'promon.cc', 'mailmon.cc', 'nonblocker.cc',
+- dependencies: [doctest_dep, curl_dep, json_dep, fmt_dep, cpphttplib, sqlite_dep,
+- simplesockets_dep, lua_dep, sqlitewriter_dep])
+-
+-
+-
+-
Index: net-mgmt/simplomon/files/simplomon.in
===================================================================
--- /dev/null
+++ net-mgmt/simplomon/files/simplomon.in
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# PROVIDE: simplomon
+# REQUIRE: NETWORKING SERVERS
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# simplomon_enable (bool): Set to NO by default.
+# Set it to YES to enable simplomon.
+# simplomon_acct (user): Set user to run simplomon as.
+# Default is "www".
+# simplomon_config (path): Set to /usr/local/etc/simplomon.conf
+# by default.
+#
+
+. /etc/rc.subr
+
+name=simplomon
+rcvar=simplomon_enable
+
+load_rc_config $name
+
+: ${simplomon_enable:="NO"}
+: ${simplomon_acct:="www"}
+: ${simplomon_config:="%%PREFIX%%/etc/simplomon.conf"}
+
+pidfile="/var/run/${name}.pid"
+daemon_pidfile="/var/run/${name}-daemon.pid"
+required_files="${simplomon_config}"
+procname="%%PREFIX%%/bin/simplomon"
+
+command="/usr/sbin/daemon"
+command_args="-c -r -R 15 -f -t ${name} -T ${name} \
+ -p ${pidfile} \
+ -P ${daemon_pidfile} \
+ -u ${simplomon_acct} \
+ ${procname} ${simplomon_config}"
+
+start_precmd=simplomon_precmd
+
+simplomon_precmd()
+{
+ if [ ! -e ${pidfile} ]; then
+ install -o ${simplomon_acct} -g wheel -m 644 /dev/null ${pidfile}
+ fi
+
+ if [ ! -e ${daemon_pidfile} ]; then
+ install -o ${simplomon_acct} -g wheel -m 644 /dev/null ${daemon_pidfile}
+ fi
+}
+
+run_rc_command "$1"
Index: net-mgmt/simplomon/pkg-descr
===================================================================
--- /dev/null
+++ net-mgmt/simplomon/pkg-descr
@@ -0,0 +1,6 @@
+Simplomon is a lightweight and easy-to-setup availability monitoring
+system. It offers advanced features such as certificate expiry checking,
+IPv6 autoconfiguration, DNS synchronization, DNSSEC signature freshness
+checks, HTTP redirect checking, providing a web page, JSON status, and a
+Prometheus node exporter. It is suitable for quickly setting up monitoring
+without the need for complex configuration or maintenance.

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 6, 11:30 PM (46 m, 16 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42267666
Default Alt Text
D49277.1796599803.diff (6 KB)

Event Timeline