[sagenb] 01/01: Prepare to remove more embedded dependencies and build products

Ximin Luo infinity0 at debian.org
Tue Nov 29 12:55:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch _wip_repack
in repository sagenb.

commit 45c063e9be8785b040320479aaa8da4c75c8b7e2
Author: Ximin Luo <infinity0 at debian.org>
Date:   Tue Nov 29 13:48:34 2016 +0100

    Prepare to remove more embedded dependencies and build products
    
    - build sass using ruby-compass
    - build sage3d.jar using ant and libjava3d-java
    - tinymce, libjs-json, libjs-prettify, libjs-jquery-form are all in Debian
---
 debian/compat                        |  2 +-
 debian/control                       | 22 +++++++++++++---
 debian/copyright                     | 43 ++++++++++++++++++++++++++++++
 debian/patches/fix-sass-syntax.patch | 22 ++++++++++++++++
 debian/patches/series                |  2 ++
 debian/patches/use-system-jquery.js  | 51 ++++++++++++++++++++++++++++++++++++
 debian/python-sagenb.links           |  8 ++++++
 debian/rules                         | 15 +++++++++++
 8 files changed, 160 insertions(+), 5 deletions(-)

diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 4837add..6e80998 100644
--- a/debian/control
+++ b/debian/control
@@ -3,11 +3,25 @@ Section: math
 Priority: optional
 Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Felix Salfelder <felix at salfelder.org>
-Build-Depends: debhelper (>= 9), dh-python, python-dev, python-setuptools,
- python-flask, python-babel, python-flask-oldsessions
+Build-Depends: debhelper (>= 10),
+ dh-python,
+ ant,
+ libjava3d-java,
+ python-dev,
+ python-setuptools,
+ python-flask,
+ python-babel,
+ python-flask-oldsessions,
+ ruby-compass
 Standards-Version: 3.9.7
 
 Package: python-sagenb
-Architecture: any
-Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends},
+ libjs-jquery,
+ libjs-jquery-form,
+ libjs-jquery-ui,
+ libjs-json,
+ libjs-prettify,
+ tinymce
 Description: sage-notebook
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..0ded9f3
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,43 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Sage Notebook
+Source: https://github.com/sagemath/sagenb
+Files-Excluded:
+ *.min.js
+ sagenb/data/highlight/*
+ sagenb/data/jquery/jquery*.js
+ sagenb/data/jquery/plugins/form/*
+ sagenb/data/jquery/plugins/jquery.bgiframe.min.js
+ sagenb/data/jqueryui/*
+ sagenb/data/json/*
+ sagenb/data/tiny_mce/*
+ sagenb/data/sage/css/main.css
+ sagenb/data/sage/css/test_report.css
+ sagenb/data/sage3d/lib/sage3d.jar
+Comment:
+ bgiframe is a IE6-specific work-around, and upstream omits its source anyway
+
+Files: *
+Copyright: 2009-2016 SageNB contributors <sage-notebook at googlegroups.com>
+           2006-2016 William Stein <wstein at gmail.com>
+License: GPL-3+
+
+Files: debian/*
+Copyright: 2016 Ximin Luo <infinity0 at debian.org>
+License: GPL-3+
+
+License: GPL-3+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/debian/patches/fix-sass-syntax.patch b/debian/patches/fix-sass-syntax.patch
new file mode 100644
index 0000000..b67f610
--- /dev/null
+++ b/debian/patches/fix-sass-syntax.patch
@@ -0,0 +1,22 @@
+--- a/sass/src/main.scss
++++ b/sass/src/main.scss
+@@ -978,15 +978,15 @@
+   &.insert_new_cell {
+     height: 16px;
+     display: block;
+-    margin: 3px;
++    margin: 3px; }
+   &.wksht-icon_button {
+-    display:inline-block;}
+-    &:hover {background-color:#8888fe;}
++    display:inline-block;
++    &:hover {background-color:#8888fe;}}
+   &.legacy_insert_new_cell{
+     height: 13px;
+     width: 95%;
+     display: inline-block;
+-    &:hover{background-color:#8888fe;}}
++    &:hover{background-color:#8888fe;}}}
+ 
+ a {
+   &.worksheetname {
diff --git a/debian/patches/series b/debian/patches/series
index c999e5c..8c93dd6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
 update-flask-0.11.patch
 #fix-test-case.patch
+use-system-jquery.js
+fix-sass-syntax.patch
diff --git a/debian/patches/use-system-jquery.js b/debian/patches/use-system-jquery.js
new file mode 100644
index 0000000..0a4b72a
--- /dev/null
+++ b/debian/patches/use-system-jquery.js
@@ -0,0 +1,51 @@
+--- a/sagenb/data/graph_editor/graph_editor.html
++++ b/sagenb/data/graph_editor/graph_editor.html
+@@ -26,9 +26,9 @@
+           margin: 10px;
+       }
+     </style>  
+-    <script type="text/javascript" src="/javascript/jquery/jquery-1.11.0.min.js"></script>
++    <script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
+     <link rel="stylesheet" href="/javascript/jqueryui/css/sage/jquery-ui-1.10.4.custom.css" />
+-    <script type="text/javascript" src="/javascript/jqueryui/js/jquery-ui-1.10.4.custom.min.js"></script>
++    <script type="text/javascript" src="/javascript/jqueryui/js/jquery-ui.min.js"></script>
+     <script type="text/javascript" src="/javascript/graph_editor/processing.editor.min.js"></script>
+     <script type="text/javascript" src="/javascript/graph_editor/graph_editor.js"></script>
+   </head>
+--- a/sagenb/data/sage/html/base.html
++++ b/sagenb/data/sage/html/base.html
+@@ -10,7 +10,7 @@
+         <link type="text/css" rel="stylesheet" href="/css/{% block css %}main{% endblock %}.css" />
+         {% block more_css %}{% endblock %}
+         {# jQuery and other universally used libraries #}
+-        <script type="text/javascript" src="/javascript/jquery/jquery-1.11.0.min.js"></script>
++        <script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
+         <script type="text/javascript" src="/javascript/dynamic/localization.js"></script>
+         <script type="text/javascript" src="/javascript/json/json2.min.js"></script>
+         {% block javascript %}
+--- a/sagenb/data/sage/html/notebook/base.html
++++ b/sagenb/data/sage/html/notebook/base.html
+@@ -15,10 +15,10 @@
+ {% block javascript %}
+ 
+ <!-- trying to work around JSmol collisions with jquery--->
+-<script type="text/javascript" src="/javascript/jquery/jquery-1.11.0.min.js"></script>
++<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
+ <!-- jQuery UI - interacts, widgets, drag-drop, etc. -->
+ <link rel="stylesheet" href="/javascript/jqueryui/css/sage/jquery-ui-1.10.4.custom.css" />
+-<script type="text/javascript" src="/javascript/jqueryui/js/jquery-ui-1.10.4.custom.min.js"></script>
++<script type="text/javascript" src="/javascript/jqueryui/js/jquery-ui.min.js"></script>
+ 
+ <!-- jQuery plugins - color pickers, shift-click, AJAX forms, IE fixes, notifications -->
+ <link rel="stylesheet" href="/javascript/jquery/plugins/farbtastic/farbtastic.css" type="text/css" />
+--- a/sagenb/data/sage/html/worksheet_listing.html
++++ b/sagenb/data/sage/html/worksheet_listing.html
+@@ -26,7 +26,7 @@
+ {% block javascript %}
+ {% if not pub %}
+ <link rel="stylesheet" href="/javascript/jqueryui/css/sage/jquery-ui-1.10.4.custom.css" />
+-<script type="text/javascript" src="/javascript/jqueryui/js/jquery-ui-1.10.4.custom.min.js"></script>
++<script type="text/javascript" src="/javascript/jqueryui/js/jquery-ui.min.js"></script>
+ <script type="text/javascript" src="/javascript/jquery/plugins/form/jquery.form.min.js"></script>
+ <script type="text/javascript" src="/javascript/jquery/plugins/jquery.bgiframe.min.js"></script>
+ <script type="text/javascript">
diff --git a/debian/python-sagenb.links b/debian/python-sagenb.links
new file mode 100644
index 0000000..5ade813
--- /dev/null
+++ b/debian/python-sagenb.links
@@ -0,0 +1,8 @@
+/usr/share/javascript/prettify                  /usr/lib/python2.7/dist-packages/sagenb/data/highlight
+/usr/share/javascript/jquery/jquery.js          /usr/lib/python2.7/dist-packages/sagenb/data/jquery/jquery.js
+/usr/share/javascript/jquery/jquery.min.js      /usr/lib/python2.7/dist-packages/sagenb/data/jquery/jquery.min.js
+/usr/share/javascript/jquery-form               /usr/lib/python2.7/dist-packages/sagenb/data/jquery/plugins/form
+/usr/share/javascript/jquery-ui                 /usr/lib/python2.7/dist-packages/sagenb/data/jqueryui/js
+/usr/share/javascript/jquery-ui/themes/base     /usr/lib/python2.7/dist-packages/sagenb/data/jqueryui/css/sage
+/usr/share/javascript/json                      /usr/lib/python2.7/dist-packages/sagenb/data/json
+/usr/share/tinymce/www                          /usr/lib/python2.7/dist-packages/sagenb/data/tiny_mce
diff --git a/debian/rules b/debian/rules
index f64011f..77ddef2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,23 @@
 #!/usr/bin/make -f
 
+export PYBUILD_NAME=sagenb
+
 %:
 	dh "$@" --with python2 --buildsystem=pybuild
 
+override_dh_auto_build:
+	cd sagenb/data/sage3d && ant \
+	  -lib /usr/share/java/j3dcore.jar \
+	  -lib /usr/share/java/vecmath.jar \
+	  -lib /usr/share/java/j3dutils.jar
+	cd sass && compass compile
+	dh_auto_build
+
 # TODO: temporarily disabled for now; requires the "sage" binary
 override_dh_auto_test:
 	true
+
+override_dh_auto_clean:
+	dh_auto_clean
+	cd sass && compass clean
+	rm -rf sagenb/data/sage3d/build sagenb/data/sage3d/lib

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git



More information about the debian-science-commits mailing list