Framework: hooray, the `upgrade' target is here \o/

Repair a bit of my previous code splatter while here.
This commit is contained in:
Franco Fichtner
2017-08-15 18:52:11 +02:00
parent 52bd61cd79
commit 64d1af52e1
3 changed files with 16 additions and 3 deletions
+1
View File
@@ -15,6 +15,7 @@ list:
@echo ${PLUGIN_DIR} -- $$(${MAKE} -C ${PLUGIN_DIR} -V PLUGIN_COMMENT)
.endfor
# shared targets that are sane to run from the root directory
TARGETS= lint sweep style style-fix clean
.for TARGET in ${TARGETS}
+14 -3
View File
@@ -129,8 +129,8 @@ scripts-auto:
done; \
fi
@if [ -d ${.CURDIR}/src/opnsense/mvc/app/models ]; then \
for FILE in $$(cd ${.CURDIR}/src/opnsense/service/templates && \
find -s . -mindepth 2 -type d); do \
for FILE in $$(cd ${.CURDIR}/src/opnsense/mvc/app/models && \
find -s . -depth 2 -type d); do \
cat ${TEMPLATESDIR}/models | \
sed "s:%%ARG%%:$${FILE#./}:g" >> \
${DESTDIR}/+POST_INSTALL; \
@@ -138,7 +138,7 @@ scripts-auto:
fi
@if [ -d ${.CURDIR}/src/opnsense/service/templates ]; then \
for FILE in $$(cd ${.CURDIR}/src/opnsense/service/templates && \
find -s . -mindepth 2 -type d); do \
find -s . -depth 2 -type d); do \
cat ${TEMPLATESDIR}/templates | \
sed "s:%%ARG%%:$${FILE#./}:g" >> \
${DESTDIR}/+POST_INSTALL; \
@@ -216,6 +216,17 @@ package: check
@${PKG} create -v -m ${WRKSRC} -r ${WRKSRC} \
-p ${WRKSRC}/plist -o ${PKGDIR}
upgrade-check: check
@if ! ${PKG} info ${PLUGIN_PKGNAME} > /dev/null; then \
echo ">>> Cannot find package. Please run 'pkg install ${PLUGIN_PKGNAME}'" >&2; \
exit 1; \
fi
@rm -rf ${PKGDIR}
upgrade: upgrade-check package
@${PKG} delete -fy ${PLUGIN_PKGNAME}
@${PKG} add ${PKGDIR}/*.txz
mount: check
mount_unionfs ${.CURDIR}/src ${DESTDIR}${LOCALBASE}
+1
View File
@@ -92,6 +92,7 @@ The make targets for any plugin directory:
* install: install to target directory
* lint: run syntax checks
* package: creates a package
* upgrade: upgrades existing package
* remove: remove known files from target directory
* style-fix: apply style fixes
* style: run style checks