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,60 @@ +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= pkg-message simplomon +SUB_LIST= ETCDIR=${ETCDIR} + +PLIST_FILES= bin/simplomon +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +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 + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} \ + ${STAGEDIR}${DOCSDIR} + +.include 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/pkg-message.in =================================================================== --- /dev/null +++ net-mgmt/simplomon/files/pkg-message.in @@ -0,0 +1,16 @@ +[ +{ type: install + message: <