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

Prepare Debian libs usage for Debian official release

parent 2849b4b6
......@@ -4,7 +4,8 @@
DESTDIR=
# Flag for optimizations
PROD=no
USEDEBIANLIBS=no
PROD=$(USEDEBIANLIBS)
# Compression
JSCOMPRESS=$(PROD)
......@@ -434,7 +435,7 @@ install_manager_site: install_conf_dir
$(RMANAGERTEMPLATESDIR)
@cp -pR $(SRCMANAGERDIR)/site/static/* $(RMANAGERSTATICDIR)
@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`; \
done
@cp -pR $(SRCMANAGERDIR)/eg/* $(RMANAGERPSGIDIR)
......@@ -461,7 +462,7 @@ install_portal_site: install_conf_dir
@cp -pR -f ${SRCPORTALDIR}/example/register.pl ${RPORTALDIR}
@tar -cf - -C ${SRCPORTALDIR}/example/skins/ $$(ls ${SRCPORTALDIR}/example/skins/) |tar -xf - -C $(RPORTALSKINSDIR)
@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; \
done
@if [ "$(PORTALDIR)/skins/" != "$(PORTALSKINSDIR)/" ]; then \
......
......@@ -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="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" />
<!-- //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-theme.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">css/manager.min.css" />
......
......@@ -29,7 +29,16 @@
var menulinks=<TMPL_VAR NAME="MENULINKS">;
</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/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>
......
......@@ -9,7 +9,11 @@
<TMPL_IF NAME="browserIdEnabled">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
</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-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" />
......@@ -32,7 +36,11 @@
<link rel="openid2.provider" href="<TMPL_VAR NAME="PROVIDERURI">" />
</TMPL_IF>
<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 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>
......
<!-- 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-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>
......@@ -11,9 +16,6 @@
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery.cookie.js"></script>
<!-- //endif -->
<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>
<!-- //endif -->
</TMPL_IF>
......
......@@ -2,7 +2,8 @@
use strict;
our $cond = 1;
our $cond = 1;
our $condDone = 0;
our %args;
for ( my $i = 0 ; $i < @ARGV ; $i += 2 ) {
$args{ $ARGV[$i] } =
......@@ -11,13 +12,20 @@ for ( my $i = 0 ; $i < @ARGV ; $i += 2 ) {
while (<STDIN>) {
if (m#//if:(\w+)#) {
$cond = $args{$1};
$cond = $args{$1};
$condDone = $cond;
}
elsif (m#//elsif:(\w+)# and not $cond) {
$cond = $args{$1};
elsif (m#//elsif:(\w+)#) {
if ($condDone) {
$cond = 0;
}
else {
$cond = $args{$1};
$condDone ||= $cond;
}
}
elsif (m#//else#) {
$cond = !$cond;
$cond = !$condDone;
}
elsif (m#//endif#) {
$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