Working on install (#595)

This commit is contained in:
Xavier Guimard 2017-02-23 12:58:52 +00:00
parent 32616a08b4
commit 18c9215724

View File

@ -53,7 +53,7 @@ PORTALDIR=$(DOCUMENTROOT)/portal
PORTALSITEDIR=$(PORTALDIR) PORTALSITEDIR=$(PORTALDIR)
PORTALSTATICDIR=$(PORTALSITEDIR)/static PORTALSTATICDIR=$(PORTALSITEDIR)/static
PORTALRELATIVESTATICDIR=/static PORTALRELATIVESTATICDIR=/static
PORTALTEMPLATESDIR=$(MANAGERSITEDIR)/templates PORTALTEMPLATESDIR=$(PORTALSITEDIR)/templates
MANAGERDIR=$(DOCUMENTROOT)/manager MANAGERDIR=$(DOCUMENTROOT)/manager
MANAGERSITEDIR=$(MANAGERDIR) MANAGERSITEDIR=$(MANAGERDIR)
@ -610,6 +610,7 @@ install_manager_site: install_conf_dir
# Manager install # Manager install
@install -v -d $(RMANAGERDIR) $(RMANAGERSTATICDIR) \ @install -v -d $(RMANAGERDIR) $(RMANAGERSTATICDIR) \
$(RMANAGERTEMPLATESDIR) $(RMANAGERTEMPLATESDIR)
@cp -pR -f $(SRCMANAGERDIR)/site/htdocs/manager.* $(RMANAGERDIR)
@cp -pR $(SRCMANAGERDIR)/site/htdocs/static/* $(RMANAGERSTATICDIR) @cp -pR $(SRCMANAGERDIR)/site/htdocs/static/* $(RMANAGERSTATICDIR)
@for f in $(SRCMANAGERDIR)/site/templates/*.tpl; do \ @for f in $(SRCMANAGERDIR)/site/templates/*.tpl; do \
./scripts/transform-templates \ ./scripts/transform-templates \
@ -633,19 +634,26 @@ install_manager_site: install_conf_dir
install_portal_site: install_conf_dir install_portal_site: install_conf_dir
# Portal install # Portal install
@install -v -d $(RPORTALDIR) $(RPORTALSTATICDIR) \ @install -v -d $(RPORTALDIR) $(RPORTALSTATICDIR) \
$(RPORTALDIR)/skins/ \ $(RPORTALTEMPLATESDIR) \
$(RCRONDIR) $(RCONFDIR) $(RCRONDIR) $(RCONFDIR)
@cp -pR -f $(SRCPORTALDIR)/site/htdocs/index.* $(RPORTALDIR) @cp -pR -f $(SRCPORTALDIR)/site/htdocs/index.* $(RPORTALDIR)
@cp -pR -f $(SRCPORTALDIR)/site/htdocs/static/* $(RPORTALSTATICDIR) @cp -pR -f $(SRCPORTALDIR)/site/htdocs/static/* $(RPORTALSTATICDIR)
@tar -cf - -C ${SRCPORTALDIR}/site/templates/ $$(ls ${SRCPORTALDIR}/site/templates/) |tar -xf - -C $(RPORTALTEMPLATESDIR) cd $(SRCPORTALDIR)/site/templates; for f in `find * -type f -name '*.tpl'`; do \
@for f in `find $(RPORTALTEMPLATEDIR) -type f -name '*.tpl'`; do \ echo "$$f => $(RPORTALTEMPLATESDIR)/$$f"; \
./scripts/transform-templates \ mkdir -p $(RPORTALTEMPLATESDIR)/`dirname $$f`; \
echo ../../../scripts/transform-templates \
usedebianlibs $(USEDEBIANLIBS) \ usedebianlibs $(USEDEBIANLIBS) \
useexternallibs $(USEEXTERNALLIBS) \ useexternallibs $(USEEXTERNALLIBS) \
jsminified $(JSCOMPRESS) \ jsminified $(JSCOMPRESS) \
cssminified $(CSSCOMPRESS) <$$f \ cssminified $(CSSCOMPRESS) <$$f \
>$$f.tmp; \ >$(RPORTALTEMPLATESDIR)/$$f; \
mv -f $$f.tmp $$f; \ done; cd -
cd $(SRCPORTALDIR)/site/templates; for l in `find * -type l`; do \
echo lien à faire $$l `readlink $$l`; \
target=`readlink $$l`; \
cd $(RPORTALTEMPLATESDIR); \
ln -s $$target $$l; \
cd -; \
done done
@if test "$(USEEXTERNALLIBS)" = "yes"; then \ @if test "$(USEEXTERNALLIBS)" = "yes"; then \
rm -rvf $(PORTALEXTERNALLIBS); \ rm -rvf $(PORTALEXTERNALLIBS); \