Commit 2b2d133e authored by Xavier Guimard's avatar Xavier Guimard

Prepare Debian libs usage for Debian official release

parent 2849b4b6
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
DESTDIR= DESTDIR=
# Flag for optimizations # Flag for optimizations
PROD=no USEDEBIANLIBS=no
PROD=$(USEDEBIANLIBS)
# Compression # Compression
JSCOMPRESS=$(PROD) JSCOMPRESS=$(PROD)
...@@ -434,7 +435,7 @@ install_manager_site: install_conf_dir ...@@ -434,7 +435,7 @@ install_manager_site: install_conf_dir
$(RMANAGERTEMPLATESDIR) $(RMANAGERTEMPLATESDIR)
@cp -pR $(SRCMANAGERDIR)/site/static/* $(RMANAGERSTATICDIR) @cp -pR $(SRCMANAGERDIR)/site/static/* $(RMANAGERSTATICDIR)
@for f in $(SRCMANAGERDIR)/site/templates/*.tpl; do \ @for f in $(SRCMANAGERDIR)/site/templates/*.tpl; do \
./scripts/transform-templates jsminified $(JSCOMPRESS) cssminified $(CSSCOMPRESS) <$$f \ ./scripts/transform-templates usedebianlibs $(USEDEBIANLIBS) jsminified $(JSCOMPRESS) cssminified $(CSSCOMPRESS) <$$f \
> $(RMANAGERTEMPLATESDIR)/`basename $$f`; \ > $(RMANAGERTEMPLATESDIR)/`basename $$f`; \
done done
@cp -pR $(SRCMANAGERDIR)/eg/* $(RMANAGERPSGIDIR) @cp -pR $(SRCMANAGERDIR)/eg/* $(RMANAGERPSGIDIR)
...@@ -461,7 +462,7 @@ install_portal_site: install_conf_dir ...@@ -461,7 +462,7 @@ install_portal_site: install_conf_dir
@cp -pR -f ${SRCPORTALDIR}/example/register.pl ${RPORTALDIR} @cp -pR -f ${SRCPORTALDIR}/example/register.pl ${RPORTALDIR}
@tar -cf - -C ${SRCPORTALDIR}/example/skins/ $$(ls ${SRCPORTALDIR}/example/skins/) |tar -xf - -C $(RPORTALSKINSDIR) @tar -cf - -C ${SRCPORTALDIR}/example/skins/ $$(ls ${SRCPORTALDIR}/example/skins/) |tar -xf - -C $(RPORTALSKINSDIR)
@for f in `find $(RPORTALSKINSDIR) -type f -name '*.tpl'`; do \ @for f in `find $(RPORTALSKINSDIR) -type f -name '*.tpl'`; do \
./scripts/transform-templates jsminified $(JSCOMPRESS) cssminified $(CSSCOMPRESS) <$$f >$$f.tmp; \ ./scripts/transform-templates usedebianlibs $(USEDEBIANLIBS) jsminified $(JSCOMPRESS) cssminified $(CSSCOMPRESS) <$$f >$$f.tmp; \
mv -f $$f.tmp $$f; \ mv -f $$f.tmp $$f; \
done done
@if [ "$(PORTALDIR)/skins/" != "$(PORTALSKINSDIR)/" ]; then \ @if [ "$(PORTALDIR)/skins/" != "$(PORTALSKINSDIR)/" ]; then \
......
...@@ -7,7 +7,11 @@ ...@@ -7,7 +7,11 @@
<link rel="shortcut icon" type="image/vnd.microsoft.icon" sizes="16x16 32x32 48x48 64x64 128x128" href="<TMPL_VAR NAME="STATIC_PREFIX">logos/favicon.ico" /> <link rel="shortcut icon" type="image/vnd.microsoft.icon" sizes="16x16 32x32 48x48 64x64 128x128" href="<TMPL_VAR NAME="STATIC_PREFIX">logos/favicon.ico" />
<link rel="icon" type="image/vnd.microsoft.icon" sizes="16x16 32x32 48x48 64x64 128x128" href="<TMPL_VAR NAME="STATIC_PREFIX">logos/favicon.ico" /> <link rel="icon" type="image/vnd.microsoft.icon" sizes="16x16 32x32 48x48 64x64 128x128" href="<TMPL_VAR NAME="STATIC_PREFIX">logos/favicon.ico" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular-ui-tree/dist/angular-ui-tree.min.css" /> <link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular-ui-tree/dist/angular-ui-tree.min.css" />
<!-- //if:cssminified <!-- //if:usedebianlibs
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="css/manager.min.css" />
//elsif:cssminified
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap-theme.min.css" /> <link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">css/manager.min.css" /> <link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">css/manager.min.css" />
......
...@@ -29,7 +29,16 @@ ...@@ -29,7 +29,16 @@
var menulinks=<TMPL_VAR NAME="MENULINKS">; var menulinks=<TMPL_VAR NAME="MENULINKS">;
</script> </script>
<!-- //if:jsminified <!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/javascript/es5-shim/es5-shim.min.js"></script>
<script type="text/javascript" src="/javascript/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/javascript/angular.js/angular.min.js"></script>
<script type="text/javascript" src="/javascript/angular.js/angular-cookies.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular-ui-tree/dist/angular-ui-tree.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/ui-bootstrap-tpls-0.12.1.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/llApp.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/jquery/dist/jquery.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/es5-shim/es5-shim.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/es5-shim/es5-shim.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/js/bootstrap.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/js/bootstrap.min.js"></script>
......
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
<TMPL_IF NAME="browserIdEnabled"> <TMPL_IF NAME="browserIdEnabled">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta http-equiv="X-UA-Compatible" content="IE=Edge">
</TMPL_IF> </TMPL_IF>
<!-- //if:cssminified <!-- //if:usedebianlibs
<link href="/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/javascript/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/styles.min.css" />
//elsif:cssminified
<link href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap.min.css" rel="stylesheet"> <link href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap.min.css" rel="stylesheet">
<link href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap-theme.min.css" rel="stylesheet"> <link href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap-theme.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/styles.min.css" /> <link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/styles.min.css" />
...@@ -32,7 +36,11 @@ ...@@ -32,7 +36,11 @@
<link rel="openid2.provider" href="<TMPL_VAR NAME="PROVIDERURI">" /> <link rel="openid2.provider" href="<TMPL_VAR NAME="PROVIDERURI">" />
</TMPL_IF> </TMPL_IF>
<TMPL_INCLUDE NAME="../common/script.tpl"> <TMPL_INCLUDE NAME="../common/script.tpl">
<!-- //if:jsminified <!-- //if:usedebianlibs
<script src="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/js/skin.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/portal.min.js"></script>
<script type="text/javascript" src="/javascript/bootstrap/js/bootstrap.min.js"></script>
//elsif:jsminified
<script src="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/js/skin.min.js"></script> <script src="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/js/skin.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/portal.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/portal.min.js"></script>
<script src="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/js/bootstrap.min.js"></script> <script src="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/js/bootstrap.min.js"></script>
......
<!-- Load javascript common to all skins --> <!-- Load javascript common to all skins -->
<!-- //if:jsminified <!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery.base64.min.js"></script>
<script type="text/javascript" src="/javascript/jquery-cookie/jquery.cookie.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery-ui-1.10.3.custom.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery-ui-1.10.3.custom.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery.base64.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery.base64.min.js"></script>
...@@ -11,9 +16,6 @@ ...@@ -11,9 +16,6 @@
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery.cookie.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery.cookie.js"></script>
<!-- //endif --> <!-- //endif -->
<TMPL_IF NAME="browserIdEnabled"> <TMPL_IF NAME="browserIdEnabled">
<!-- //if:jsminified
<script src="https://login.persona.org/include.min.js"></script>
//else -->
<script src="https://login.persona.org/include.js"></script> <script src="https://login.persona.org/include.js"></script>
<!-- //endif --> <!-- //endif -->
</TMPL_IF> </TMPL_IF>
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
use strict; use strict;
our $cond = 1; our $cond = 1;
our $condDone = 0;
our %args; our %args;
for ( my $i = 0 ; $i < @ARGV ; $i += 2 ) { for ( my $i = 0 ; $i < @ARGV ; $i += 2 ) {
$args{ $ARGV[$i] } = $args{ $ARGV[$i] } =
...@@ -11,13 +12,20 @@ for ( my $i = 0 ; $i < @ARGV ; $i += 2 ) { ...@@ -11,13 +12,20 @@ for ( my $i = 0 ; $i < @ARGV ; $i += 2 ) {
while (<STDIN>) { while (<STDIN>) {
if (m#//if:(\w+)#) { if (m#//if:(\w+)#) {
$cond = $args{$1}; $cond = $args{$1};
$condDone = $cond;
} }
elsif (m#//elsif:(\w+)# and not $cond) { elsif (m#//elsif:(\w+)#) {
$cond = $args{$1}; if ($condDone) {
$cond = 0;
}
else {
$cond = $args{$1};
$condDone ||= $cond;
}
} }
elsif (m#//else#) { elsif (m#//else#) {
$cond = !$cond; $cond = !$condDone;
} }
elsif (m#//endif#) { elsif (m#//endif#) {
$cond = 1; $cond = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment