From 3c01d86556d62697f762e4d5d4b9f7f1dd2e60e0 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 15 Nov 2024 22:31:43 +0800 Subject: [PATCH] swanmon: add package --- utils/swanmon/Makefile | 44 ++++++++++++++++++++++++++++++++++++++++++ utils/swanmon/test.sh | 3 +++ 2 files changed, 47 insertions(+) create mode 100644 utils/swanmon/Makefile create mode 100644 utils/swanmon/test.sh diff --git a/utils/swanmon/Makefile b/utils/swanmon/Makefile new file mode 100644 index 00000000..6dd96757 --- /dev/null +++ b/utils/swanmon/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2023 TDT AG +# +# This is free software, licensed under the GNU General Public License v2. +# See https://www.gnu.org/licenses/gpl-2.0.txt for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=swanmon +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/TDT-AG/swanmon +PKG_SOURCE_VERSION:=296096e172005cae855c316f859265aba8b2e472 +PKG_MIRROR_HASH:=f69f27e976f35ad15bd95e8f06b950b48bca957f0fe3e00c2cf8c381cbf05bc3 + +PKG_MAINTAINER:=Lukas Voegl +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/swanmon + SECTION:=utils + CATEGORY:=Utilities + TITLE:=strongSwan monitoring tool + DEPENDS:=+davici +glib2 +libjson-c +endef + +define Package/swanmon/description + A command-line utility for serializing the strongSwan VICI output to JSON. +endef + +define Package/swanmon/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swanmon $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,swanmon)) diff --git a/utils/swanmon/test.sh b/utils/swanmon/test.sh new file mode 100644 index 00000000..e2f737ff --- /dev/null +++ b/utils/swanmon/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swanmon help