From 171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 15 Feb 2022 09:52:43 -0500 Subject: add initial system-ready values and install steps --- extra/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'extra/Makefile') diff --git a/extra/Makefile b/extra/Makefile index f707480..785d2df 100644 --- a/extra/Makefile +++ b/extra/Makefile @@ -7,7 +7,7 @@ # History: # Usage: # Reference: -# hex-zero Makefile +# fuss Makefile # Improve: # add man page? # Document: @@ -30,6 +30,7 @@ SYSVDIR = $(SYSCONFDIR)/init.d SYSDDIR = $(DESTDIR)$(prefix)/lib/systemd/system LOGDIR = $(DESTDIR)/var/log/stackbin APACHEDIR = $(SYSCONFDIR)/httpd/conf.d# for debian use '$(SYSCONFDIR)/apache2/sites-available' +NGINXDIR = $(SYSCONFDIR)/nginx/default.d CRONDIR = $(SYSCONFDIR)/cron.d SBINDIR = $(DESTDIR)$(prefix)/sbin @@ -54,7 +55,8 @@ truebin :=$(shell which true) uniqbin :=$(shell which uniq) xargsbin :=$(shell which xargs) -with_apache ?= YES +with_apache ?= NO +with_nginx ?= YES with_init ?= YES with_systemd ?= NO with_pip_helper ?= NO @@ -81,7 +83,7 @@ deplist_opts: @${grepbin} -h -o -riIE '\<(dep|rec|sug)-[^\ :]+:' ${SRCDIR} | ${sedbin} -r -e 's/(dep|rec|sug)-//;' -e 's/:$$//;' | ${sortbin} | ${uniqbin} 1>&2 install_files: - ${installbin} -m0755 -d ${LOGDIR} ${APPVARDIR}/upload ${APPDIR}/static ${APPDIR}/templates \ + ${installbin} -m0755 -d ${LOGDIR} ${APPVARDIR} ${APPDIR}/static ${APPDIR}/templates \ ${DOCDIR} ${SBINDIR} ${SYSCONFDIR} ${LIBEXECDIR}/${APPNAME} ${installbin} -m0755 -t ${SBINDIR} ${SRCDIR}/${APPNAME}.bin ${installbin} -m0644 -t ${LIBEXECDIR}/${APPNAME} ${SRCDIR}/${APPNAME}.py @@ -94,6 +96,10 @@ ifeq ($(with_apache),YES) ${installbin} -m0755 -d ${APACHEDIR} ${installbin} -m0644 ${SRCDIR}/extra/${APPNAME}.conf.apache ${APACHEDIR}/${APPNAME}.conf endif +ifeq ($(with_nginx),YES) + ${installbin} -m0755 -d ${NGINXDIR} + ${installbin} -m0644 ${SRCDIR}/extra/${APPNAME}.conf.nginx ${NGINXDIR}/${APPNAME}.conf +endif ifeq ($(with_init),YES) ${installbin} -m0755 -d ${SYSVDIR} ${installbin} -m0755 ${SRCDIR}/extra/${APPNAME}.init ${SYSVDIR}/${APPNAME} @@ -119,7 +125,7 @@ uninstall: ${rmbin} -f ${SYSVDIR}/${APPNAME} || : # remove all installed directories that are now blank. - ${rmdirbin} ${APPVARDIR}/upload ${APPDIR}/static \ + ${rmdirbin} ${APPVARDIR} ${APPDIR}/static \ ${SYSVDIR} ${APACHEDIR} ${DOCDIR} \ ${LIBEXECDIR}/${APPNAME} ${LOGDIR} 2>/dev/null || : ${rmdirbin} ${APPDIR} 2>/dev/null || : -- cgit