From 22ed3972d2e94df58cf088198e2a51581e23087d Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 26 Apr 2023 08:57:29 +0200 Subject: [PATCH] Framework: add metadata to annotations PR: https://github.com/opnsense/core/issues/6374 --- Makefile | 2 +- Mk/plugins.mk | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d01440b96..865656059 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2015-2020 Franco Fichtner +# Copyright (c) 2015-2023 Franco Fichtner # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/Mk/plugins.mk b/Mk/plugins.mk index ca9a51fc6..16b71c55e 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -132,6 +132,9 @@ manifest: check done @echo "}" .endif + @if [ -f ${WRKSRC}/usr/local/opnsense/version/${PLUGIN_NAME} ]; then \ + echo "annotations $$(cat ${WRKSRC}/usr/local/opnsense/version/${PLUGIN_NAME})"; \ + fi scripts: check scripts-pre scripts-auto scripts-manual scripts-post @@ -256,14 +259,14 @@ package: check .for DEP in ${PLUGIN_DEPENDS} @if ! ${PKG} info ${DEP} > /dev/null; then ${PKG} install -yA ${DEP}; fi .endfor - @echo -n ">>> Generating metadata for ${PLUGIN_PKGNAME}-${PLUGIN_PKGVERSION}..." - @${MAKE} DESTDIR=${WRKSRC} metadata - @echo " done" @echo -n ">>> Staging files for ${PLUGIN_PKGNAME}-${PLUGIN_PKGVERSION}..." @${MAKE} DESTDIR=${WRKSRC} install @echo " done" @echo ">>> Generated version info for ${PLUGIN_PKGNAME}-${PLUGIN_PKGVERSION}:" @cat ${WRKSRC}/usr/local/opnsense/version/${PLUGIN_NAME} + @echo -n ">>> Generating metadata for ${PLUGIN_PKGNAME}-${PLUGIN_PKGVERSION}..." + @${MAKE} DESTDIR=${WRKSRC} metadata + @echo " done" @echo ">>> Packaging files for ${PLUGIN_PKGNAME}-${PLUGIN_PKGVERSION}:" @${PKG} create -v -m ${WRKSRC} -r ${WRKSRC} \ -p ${WRKSRC}/plist -o ${PKGDIR}