aboutsummaryrefslogtreecommitdiff
path: root/extra/Makefile
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2022-02-15 09:52:43 -0500
committerB Stack <bgstack15@gmail.com>2022-02-15 09:59:19 -0500
commit171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5 (patch)
tree44db45d1f1878738b89a3a20b670072a740937af /extra/Makefile
parentr-proxy support with /set endpoint, and extra dir (diff)
downloadstackbin-171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5.tar.gz
stackbin-171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5.tar.bz2
stackbin-171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5.zip
add initial system-ready values and install steps
Diffstat (limited to 'extra/Makefile')
-rw-r--r--extra/Makefile14
1 files changed, 10 insertions, 4 deletions
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 || :
bgstack15