diff --git a/Makefile b/Makefile index 9f76dcc..d0d6e02 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,9 @@ CONTROLFILES=$(foreach p,$(PLUGINS),$(p)/control.zaf) ZAF_EXPORT_OPTS=$(foreach o,$(ZAF_OPTIONS),$(shell echo $(o)|cut -d '=' -f 1)) DEBIAN_DIR=tmp/deb DEBIAN_CTRL=$(DEBIAN_DIR)/DEBIAN -DEBIAN_PKG=$(shell . lib/zaf.lib.sh; echo out/zaf-$$ZAF_VERSION.deb) +ifeq ($(DEBIAN_PKG),) + DEBIAN_PKG=$(shell . lib/zaf.lib.sh; echo out/zaf-$$ZAF_VERSION.deb) +endif ifeq ($(ZAF_DEBUG),) ZAF_DEBUG=0 endif diff --git a/contrib/zafdeb.sh b/contrib/zafdeb.sh new file mode 100755 index 0000000..059f32a --- /dev/null +++ b/contrib/zafdeb.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +. lib/zaf.lib.sh + +! [ -d plugins ] && git clone https://github.com/limosek/zaf-plugins.git plugins + +make deb DEBIAN_PKG="out/zaf-$ZAF_VERSION-git.deb" \ + ZAF_OPTIONS="ZAF_GIT=1 ZAF_REPO_GITURL='https://github.com/limosek/zaf-plugins.git'" + +make deb DEBIAN_PKG="out/zaf-$ZAF_VERSION.deb" \ + ZAF_OPTIONS="ZAF_GIT=0" + +make deb DEBIAN_PKG="out/zaf-$ZAF_VERSION-all.deb" ZAF_OPTIONS="ZAF_GIT=0" \ + PLUGINS="./plugins/fsx ./plugins/openssh ./plugins/psx ./plugins/tcqos ./plugins/zaf ./plugins/fail2ban" + diff --git a/files/postinst.template b/files/postinst.template index 6e2f66b..07301f7 100644 --- a/files/postinst.template +++ b/files/postinst.template @@ -9,7 +9,7 @@ configure) . /usr/lib/zaf/ctrl.lib.sh cd /usr/lib/zaf && /usr/lib/zaf/install.sh reconf [ -n "{PLUGINS}" ] && for p in {PLUGINS}; do - if ! is_plugin $p;then + if ! zaf_is_plugin $p;then zaf install $ZAF_PREPACKAGED_DIR/$p; fi done