From 1449d22979f0d1d0832661cc1806b937bff5fd9f Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Tue, 13 Aug 2019 11:16:54 +0200 Subject: [PATCH] Fixes make files --- Makefile | 8 +++---- apps.mk | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 apps.mk diff --git a/Makefile b/Makefile index e3e5dd2..5f1aa68 100755 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ # Makefile pour eole-glpi ################################ -SOURCE=eole-glpi -SOURCEDB=glpi -VERSION=2.7.1 +SOURCE=eole-syspass +SOURCEDB=syspass +VERSION=2.7.0 EOLE_VERSION=2.7 -EOLE_RELEASE=2.7.1 +EOLE_RELEASE=2.7.0 PKGAPPS=non #FLASK_MODULE= diff --git a/apps.mk b/apps.mk new file mode 100644 index 0000000..1efe7df --- /dev/null +++ b/apps.mk @@ -0,0 +1,64 @@ +# +# NE PAS EDITER CE FICHIER +# +# Voir Makefile + + +########################## +# Application web envole # +########################## +ifneq (, $(filter oui web, $(PKGAPPS))) +# +# Sanity check +# +ifeq (, $(filter-out X.X, $(strip $(VERSION)))) +$(error $$(VERSION) variable has incorrect value '$(VERSION)') +endif + +# Where to store web application files +WEB_PATH := $(DESTDIR)/var/www/html + +# Envole +sharenvole_PROG_DIR := $(DESTDIR)/usr/share/envole/$(SOURCE) + +src_$(SOURCE)-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE) +src_plugins-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/plugin +src_lang-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/lang + +endif + +########################## +# Application EOLE flask # +########################## +ifneq (, $(filter flask, $(PKGAPPS))) +# +# Sanity check +# +ifeq (, $(filter-out XXX, $(strip $(FLASK_MODULE)))) +$(error $$(FLASK_MODULE) variable has incorrect value '$(FLASK_MODULE)') +endif + +ifeq (, $(strip $(wildcard src/$(FLASK_MODULE).conf))) +$(error missing eoleflask configuration file 'src/$(FLASK_MODULE).conf') +endif + +# Everything is related to mount point +APPS_MOUNT_POINT := $(shell sed -ne 's|^"MOUNT_POINT"[[:space:]]*:[[:space:]]*"/\([^"]*\)",|\1|p' \ + src/$(FLASK_MODULE).conf) + +ifeq (, $(strip $(APPS_MOUNT_POINT))) +$(error no "MOUNT_POINT" in eoleflask configuration file 'src/$(FLASK_MODULE).conf') +endif + +# eole-flask configuration +src_DATA_DIR := $(DESTDIR)/etc/eole/flask/available + +# Where to store flask application files +FLASK_PATH := $(eole_DIR)/flask/$(APPS_MOUNT_POINT) + +# static files +src_$(FLASK_MODULE)_static_REC_DIR := $(FLASK_PATH)/static +src_$(FLASK_MODULE)_templates_REC_DIR := $(FLASK_PATH)/templates +src_$(FLASK_MODULE)_instance_REC_DIR := $(FLASK_PATH)/resources + +endif