diff --git a/Makefile b/Makefile index cc07079af..f2b257bf2 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PAGER?= less all: @cat ${.CURDIR}/README.md | ${PAGER} -CATEGORIES= devel sysutils +CATEGORIES= devel net sysutils .for CATEGORY in ${CATEGORIES} _${CATEGORY}!= ls -1d ${CATEGORY}/* diff --git a/Mk/plugins.mk b/Mk/plugins.mk index 3b1b8730f..2e50c59c7 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -42,6 +42,7 @@ PLUGIN_PREFIX= ospriv- .endif PLUGIN_WWW?= https://opnsense.org/ +PLUGIN_REVISION?= 0 PLUGIN_REQUIRES= PLUGIN_NAME PLUGIN_VERSION PLUGIN_COMMENT \ PLUGIN_MAINTAINER @@ -53,6 +54,12 @@ check: . endif .endfor +.if "${PLUGIN_REVISION}" != "" && "${PLUGIN_REVISION}" != "0" +PLUGIN_PKGVERSION= ${PLUGIN_VERSION}_${PLUGIN_REVISION} +.else +PLUGIN_PKGVERSION= ${PLUGIN_VERSION} +.endif + name: check @echo ${PLUGIN_PREFIX}${PLUGIN_NAME} @@ -61,7 +68,7 @@ depends: check manifest: check @echo "name: ${PLUGIN_PREFIX}${PLUGIN_NAME}" - @echo "version: \"${PLUGIN_VERSION}\"" + @echo "version: \"${PLUGIN_PKGVERSION}\"" @echo "origin: opnsense/${PLUGIN_PREFIX}${PLUGIN_NAME}" @echo "comment: \"${PLUGIN_COMMENT}\"" @echo "desc: \"${PLUGIN_DESC}\"" @@ -71,6 +78,7 @@ manifest: check @echo "prefix: \"${LOCALBASE}\"" @echo "licenselogic: \"single\"" @echo "licenses: [ \"BSD2CLAUSE\" ]" +.if defined(PLUGIN_DEPENDS) @echo "deps: {" @for PLUGIN_DEPEND in ${PLUGIN_DEPENDS}; do \ if ! ${PKG} query ' %n: { version: "%v", origin: "%o" }' \ @@ -80,6 +88,7 @@ manifest: check fi; \ done @echo "}" +.endif scripts: check @mkdir -p ${DESTDIR} diff --git a/README.md b/README.md index 942febf10..dae6934fb 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The make targets for the root directory: The make targets for any plugin directory: -* manifest: generate +MANIFEST file +* package: creates a package from directory * install: install to target directory * remove: remove from target directory * collect: gather updates from target directory diff --git a/devel/helloworld/Makefile b/devel/helloworld/Makefile index 8ef7af076..a7bbab857 100644 --- a/devel/helloworld/Makefile +++ b/devel/helloworld/Makefile @@ -1,7 +1,6 @@ PLUGIN_NAME= helloworld PLUGIN_VERSION= 1.1 PLUGIN_COMMENT= A sample framework application -#PLUGIN_DEPENDS= PLUGIN_MAINTAINER= ad@opnsense.org .include "../../Mk/plugins.mk"