linking instead of copying for the distribution target
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env make -f
|
||||
#! /usr/bin/env make -f
|
||||
|
||||
CSSO = node_modules/csso-cli/bin/csso
|
||||
|
||||
@@ -12,12 +12,12 @@ phpLibFiles = $(wildcard phpLib/cwsvJudo/*.php) phpLib/phpcount/phpcount.php
|
||||
configFiles = $(wildcard config/*.php)
|
||||
|
||||
distDir=./build/dist/heliohost
|
||||
pandocTemplate=bulma-hello-parallax.html
|
||||
pandocTemplate=pandocTemplate/materialize.pandocTemplate
|
||||
|
||||
LN = cp -rf
|
||||
LN = ln -f
|
||||
|
||||
.PHONY: all
|
||||
all: $(phpFiles)
|
||||
all: pages
|
||||
# @todo This should only be temporary. Better outsource the graphics to it's own Makefile.
|
||||
make -j graphiken
|
||||
make build/css/cwsvJudo.css
|
||||
@@ -26,51 +26,99 @@ all: $(phpFiles)
|
||||
clean:
|
||||
$(RM) -rf build
|
||||
|
||||
# copy/link all together to get a distributable package
|
||||
.PHONY: installDependencies
|
||||
installDependencies:
|
||||
if [ ! -d "submodules" ]; then mkdir submodules; fi
|
||||
# - bulma
|
||||
# - bulma.css
|
||||
if [ ! -d "submodules/bulma" ]; then cd submodules; git clone https://github.com/jgthms/bulma; fi
|
||||
cd submodules/bulma; git fetch; git checkout 1.0.2;
|
||||
# - bulma templates
|
||||
if [ ! -d "submodules/bulma-templates" ]; then cd submodules; git clone https://github.com/BulmaTemplates/bulma-templates; fi
|
||||
cd submodules/bulma-templates; git fetch; git checkout 0.9.4.2;
|
||||
# - materialize-css
|
||||
if [ ! -d "submodules/materialize" ]; then cd submodules; git clone https://github.com/materializecss/materialize; fi
|
||||
cd submodules/materialize; git fetch; git checkout v2.2.1; npm install; npm run release;
|
||||
|
||||
# copy/link all together to get a "distributable" package
|
||||
# (distributable means: That directory can be uploaded va ftp)
|
||||
.PHONY: dist
|
||||
dist: all
|
||||
rm -rf $(distDir)
|
||||
mkdir -p $(distDir)
|
||||
|
||||
# external dependencies
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/css
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/js
|
||||
# - bulma
|
||||
$(LN) ./submodules/bulma/css/bulma.min.css $(distDir)/httpdocs/ressourcen/css/
|
||||
$(LN) ./submodules/bulma-templates/css/hello-parallax.css $(distDir)/httpdocs/ressourcen/css/
|
||||
# - materializeCss
|
||||
$(LN) ./submodules/materialize/dist/css/materialize.min.css $(distDir)/httpdocs/ressourcen/css/
|
||||
$(LN) ./submodules/materialize/dist/css/materialize.min.css.map $(distDir)/httpdocs/ressourcen/css/
|
||||
$(LN) ./submodules/materialize/dist/js/materialize.min.js $(distDir)/httpdocs/ressourcen/js/
|
||||
|
||||
# page data
|
||||
mkdir -p $(distDir)/httpdocs/pages/
|
||||
$(LN) ./build/materialize $(distDir)/httpdocs/pages/responsive
|
||||
$(LN) ./src/shared/ $(distDir)/httpdocs/pages/shared
|
||||
# php lib
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/phpLib
|
||||
$(LN) ./phpLib/cwsvJudo $(distDir)/httpdocs/ressourcen/phpLib/cwsvJudo
|
||||
$(LN) ./phpLib/phpqrcode $(distDir)/httpdocs/ressourcen/phpLib/phpqrcode
|
||||
mkdir -p $(distDir)/httpdocs/pages/responsive
|
||||
find ./build/materialize/ -type f -exec $(LN) {} $(distDir)/httpdocs/pages/responsive \;
|
||||
mkdir -p $(distDir)/httpdocs/pages/shared
|
||||
find ./src/shared/ -type f -exec $(LN) {} $(distDir)/httpdocs/pages/shared \;
|
||||
|
||||
# php libs
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/phpLib/cwsvJudo
|
||||
find ./phpLib/cwsvJudo -type f -exec $(LN) {} $(distDir)/httpdocs/ressourcen/phpLib/cwsvJudo \;
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/phpLib/phpqrcode
|
||||
find ./phpLib/phpqrcode -type f -exec $(LN) {} $(distDir)/httpdocs/ressourcen/phpLib/phpqrcode \;
|
||||
|
||||
# graphics
|
||||
# - wappen
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/graphiken/logos
|
||||
$(LN) ./build/graphiken/cwsvJudoLogoWappen/* $(distDir)/httpdocs/ressourcen/graphiken/logos
|
||||
$(LN) ./graphiken/icons $(distDir)/httpdocs/ressourcen/graphiken/
|
||||
$(LN) ./graphiken/banner $(distDir)/httpdocs/ressourcen/graphiken/banner
|
||||
find ./build/graphiken/cwsvJudoLogoWappen -type f -exec $(LN) {} $(distDir)/httpdocs/ressourcen/graphiken/logos \;
|
||||
# - icons
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/graphiken/icons
|
||||
find ./graphiken/icons -type f -exec $(LN) {} $(distDir)/httpdocs/ressourcen/graphiken/icons \;
|
||||
$(LN) ./build/graphiken/favIcons/favicon.ico $(distDir)/httpdocs/favicon.ico
|
||||
$(LN) ./res/videos.d $(distDir)/httpdocs/videos.d
|
||||
# - banner graphics
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/graphiken/banner
|
||||
find ./graphiken/banner -type f -exec $(LN) {} $(distDir)/httpdocs/ressourcen/graphiken/banner \;
|
||||
# - videos
|
||||
mkdir -p $(distDir)/httpdocs/videos.d
|
||||
find ./res/videos.d -type f -exec $(LN) {} $(distDir)/httpdocs/videos.d \;
|
||||
# - others
|
||||
$(LN) ./res/IntegrationDurchSport2018.250x.png $(distDir)/httpdocs/ressourcen/graphiken/logos
|
||||
|
||||
# css
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/css
|
||||
$(LN) ./build/css/cwsvJudo.css $(distDir)/httpdocs/ressourcen/css/cwsvJudo.css
|
||||
|
||||
# fonts
|
||||
$(LN) ./res/fonts $(distDir)/httpdocs/ressourcen/fonts
|
||||
mkdir -p $(distDir)/httpdocs/ressourcen/fonts
|
||||
find ./res/fonts -type f -exec $(LN) {} $(distDir)/httpdocs/ressourcen/fonts \;
|
||||
|
||||
# htaccess
|
||||
$(LN) ./src/htaccess/heliohost/.htaccess $(distDir)/httpdocs/.htaccess
|
||||
$(LN) ./src/htaccess/heliohost/pages/responsive/.htaccess $(distDir)/httpdocs/pages/responsive/.htaccess
|
||||
|
||||
# config files
|
||||
$(LN) ./configs/heliohost/pages.config.inc.php $(distDir)/httpdocs/pages/responsive/config.inc.php
|
||||
|
||||
# @todo shouldn't be used any more
|
||||
mkdir -p $(distDir)/.local
|
||||
$(LN) configs/local/db.config.php $(distDir)/.local/db.config.php
|
||||
|
||||
docker-compose restart
|
||||
|
||||
.PHONY: pages
|
||||
pages: $(pandocTemplate) $(phpFiles)
|
||||
|
||||
# build the materialize version of the page
|
||||
build/materialize/%.php: src/md/%.md build/yaml/%.yaml pandocTemplate/$(pandocTemplate)
|
||||
build/materialize/%.php: src/md/%.md build/yaml/%.yaml $(pandocTemplate)
|
||||
mkdir -p build/materialize
|
||||
# create html/php code
|
||||
pandoc \
|
||||
--standalone \
|
||||
--css="ressourcen/css/cwsvJudo.css" \
|
||||
--template=pandocTemplate/$(pandocTemplate) \
|
||||
--template=$(pandocTemplate) \
|
||||
--to=html \
|
||||
--wrap=preserve \
|
||||
--output=$@ \
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/// - theoretisch sollte es bereits von der aufrufenden Datei
|
||||
/// eingebunden sein
|
||||
require_once("./config.inc.php");
|
||||
require_once($$basePath."/config/phpcount.config.php");
|
||||
require_once($$basePath."/config/cwsvJudo.config.php");
|
||||
// require_once($$basePath."/config/phpcount.config.php");
|
||||
// require_once($$basePath."/config/cwsvJudo.config.php");
|
||||
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
|
||||
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsLib.php");
|
||||
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/wkKalender.php");
|
||||
@@ -14,14 +14,14 @@
|
||||
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsTableHtml.php");
|
||||
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsLib.php");
|
||||
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/galleryRedirector.php");
|
||||
require_once($$basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
||||
// require_once($$basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
||||
|
||||
galleryRedirector();
|
||||
|
||||
$if(phpTitleString)$
|
||||
PHPCount::AddHit($phpTitleString$);?>
|
||||
// PHPCount::AddHit($phpTitleString$);?>
|
||||
$else$
|
||||
PHPCount::AddHit("$title$");?>
|
||||
// PHPCount::AddHit("$title$");?>
|
||||
$endif$
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -85,6 +85,7 @@ $endfor$
|
||||
$if(math)$
|
||||
$math$
|
||||
$endif$
|
||||
|
||||
<script type='application/ld+json'>
|
||||
{
|
||||
"@context": "http://www.schema.org",
|
||||
@@ -94,15 +95,19 @@ $if(phpTitleString)$
|
||||
$else$
|
||||
"name": "$title$",
|
||||
$endif$
|
||||
|
||||
"alternateName": "$description$",
|
||||
|
||||
$if(canonicalPath)$
|
||||
"url": "<?php echo($$canonicalBaseUrl);?>/$canonicalPath$",
|
||||
$else$
|
||||
"url": "<?php echo($$canonicalBaseUrl);?>$",
|
||||
"url": "<?php echo($$canonicalBaseUrl);?>",
|
||||
$endif$
|
||||
|
||||
"image": "<?php echo($$canonicalBaseUrl);?>/ressourcen/graphiken/logos/cwsvJudoLogoWappen.256w.png"
|
||||
}
|
||||
</script>
|
||||
|
||||
$if(jsonSdFiles)$
|
||||
$for(jsonSdFiles)$
|
||||
<script type='application/ld+json'>
|
||||
|
||||
Reference in New Issue
Block a user