[Pkg-haskell-commits] darcs: gitit: Use system JS

KAction at gnu.org KAction at gnu.org
Tue May 26 21:03:12 UTC 2015


Tue May 26 19:16:34 UTC 2015  KAction at gnu.org
  * Use system JS

    M ./changelog +6
    A ./clean
    M ./copyright -48
    A ./patches/
    A ./patches/series
    A ./patches/use-debian-packaged-jquery.patch
    M ./rules -9 +14

Tue May 26 19:16:34 UTC 2015  KAction at gnu.org
  * Use system JS
diff -rN -u old-gitit/changelog new-gitit/changelog
--- old-gitit/changelog	2015-05-26 21:03:12.387807062 +0000
+++ new-gitit/changelog	2015-05-26 21:03:12.403807441 +0000
@@ -6,6 +6,12 @@
   * Change section to web (Closes: #784813) 
   * New upstream release
 
+  [ Dmitry Bogatov ]
+  * Prefer jquery libraries from Debian packages over
+    bundled code.
+  * Simplify debian/copyright -- no licenses for JS code
+  * Use debian/clean file over manual tinkering in debian/rules
+
  -- Joachim Breitner <nomeata at debian.org>  Thu, 21 May 2015 23:42:58 +0200
 
 gitit (0.10.4-2) unstable; urgency=medium
diff -rN -u old-gitit/clean new-gitit/clean
--- old-gitit/clean	1970-01-01 00:00:00.000000000 +0000
+++ new-gitit/clean	2015-05-26 21:03:12.391807157 +0000
@@ -0,0 +1,2 @@
+gitit.1
+expireGititCache.1
diff -rN -u old-gitit/copyright new-gitit/copyright
--- old-gitit/copyright	2015-05-26 21:03:12.387807062 +0000
+++ new-gitit/copyright	2015-05-26 21:03:12.391807157 +0000
@@ -88,54 +88,6 @@
  On Debian systems, the text of the GPL-2 license can be found in the
  file `/usr/share/common-licenses/GPL-2'.
 
-Files: data/static/js/jquery.min.js
-Copyright: © 2008, John Resig
-License: GPL-2 or MIT
- On Debian systems, the text of the GPL-2 license can be found in the
- file `/usr/share/common-licenses/GPL-2'.
-X-Origin: http://jquery.com/
-Comment: jQuery is already packaged in Debian: this embedded copy isn't
- used by gitit, a symbolic link to the Debian package is made instead.
-
-Files: data/static/js/jquery-ui.packed.js
-Copyright: © 2008-2010, Paul Bakaus
-           © 2008-2010, Brandon Aaron
-           © 2008-2010, David Bolter
-           © 2008-2010, Rich Caloggero
-           © 2008-2010, Chi Cheng
-           © 2008-2010, Colin Clark
-           © 2008-2010, Michelle D'Souza
-           © 2008-2010, Aaron Eisenberger
-           © 2008-2010, Ariel Flesler
-           © 2008-2010, Bohdan Ganicky
-           © 2008-2010, Scott González
-           © 2008-2010, Marc Grabanski
-           © 2008-2010, Klaus Hartl
-           © 2008-2010, Scott Jehl
-           © 2008-2010, Cody Lindley
-           © 2008-2010, Eduardo Lundgren
-           © 2008-2010, Todd Parker
-           © 2008-2010, John Resig
-           © 2008-2010, Patty Toland
-           © 2008-2010, Ca-Phun Ung
-           © 2008-2010, Keith Wood
-           © 2008-2010, Maggie Costello Wachs
-           © 2008-2010, Richard D. Worth
-           © 2008-2010, Jörn Zaefferer
-License: GPL-2 or MIT
- On Debian systems, the text of the GPL-2 license can be found in the
- file `/usr/share/common-licenses/GPL-2'.
-X-Origin: http://jqueryui.com/
-Comment: jQuery UI is already packaged in Debian: this embedded copy isn't
- used by gitit, a symbolic link to the Debian package is made instead.
-
-Files: data/static/js/jquery.hotkeys-0.7.9.min.js
-Copyright: © 2010, John Resig
-License: GPL-2 or MIT
- On Debian systems, the text of the GPL-2 license can be found in the
- file `/usr/share/common-licenses/GPL-2'.
-X-Origin: http://code.google.com/p/js-hotkeys/
-
 Files: debian/*
 Copyright: © 2010 - 2011, Giovanni Mascellani <gio at debian.org>
 License: GPL-3+
diff -rN -u old-gitit/patches/series new-gitit/patches/series
--- old-gitit/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ new-gitit/patches/series	2015-05-26 21:03:12.399807346 +0000
@@ -0,0 +1 @@
+use-debian-packaged-jquery.patch
diff -rN -u old-gitit/patches/use-debian-packaged-jquery.patch new-gitit/patches/use-debian-packaged-jquery.patch
--- old-gitit/patches/use-debian-packaged-jquery.patch	1970-01-01 00:00:00.000000000 +0000
+++ new-gitit/patches/use-debian-packaged-jquery.patch	2015-05-26 21:03:12.399807346 +0000
@@ -0,0 +1,39 @@
+--- a/Network/Gitit/Layout.hs
++++ b/Network/Gitit/Layout.hs
+@@ -78,7 +78,9 @@ filledPageTemplate base' cfg layout html
+                            'h':'t':'t':'p':_  -> x
+                            _                  -> base' ++ "/js/" ++ x
+ 
+-      scripts  = ["jquery-1.2.6.min.js", "jquery-ui-combined-1.6rc2.min.js", "footnotes.js"] ++ pgScripts layout
++      scripts  = ["jquery.js", "jquery.ui.core.js", "jquery.ui.draggable.js",
++                  "jquery.ui.droppable.js", "jquery.ui.tabs",
++                  "jquery.hotkeys.js", "footnotes.js"] ++ pgScripts layout
+       scriptLink x = script ! [src (prefixedScript x),
+         thetype "text/javascript"] << noHtml
+       javascriptlinks = renderHtmlFragment $ concatHtml $ map scriptLink scripts
+--- a/gitit.cabal
++++ b/gitit.cabal
+@@ -42,21 +42,14 @@ maintainer:          jgm at berkeley.edu
+ bug-reports:         http://github.com/jgm/gitit/issues
+ homepage:            http://gitit.net
+ stability:           experimental
+-extra-source-files:  data/static/js/jquery-1.2.6.js
+-                     data/static/js/jquery.hotkeys-0.7.9.js
+-                     data/static/js/jquery-ui.core-1.6rc2.js
+-                     data/static/js/jquery-ui.droppable-1.6rc2.js
+-                     data/static/js/jquery-ui.draggable-1.6rc2.js
+-                     data/static/js/jquery-ui.tabs-1.6rc2.js
+ data-files:          data/static/css/screen.css, data/static/css/print.css,
+                      data/static/css/ie.css, data/static/css/hk-pyg.css,
+                      data/static/css/reset-fonts-grids.css,
+                      data/static/css/custom.css,
+                      data/static/img/logo.png, data/static/img/icons/feed.png,
+                      data/static/img/icons/folder.png, data/static/img/icons/page.png,
+-                     data/static/js/dragdiff.js, data/static/js/jquery-1.2.6.min.js,
+-                     data/static/js/uploadForm.js, data/static/js/jquery-ui-combined-1.6rc2.min.js,
+-                     data/static/js/jquery.hotkeys-0.7.9.min.js,
++                     data/static/js/dragdiff.js,
++                     data/static/js/uploadForm.js,
+                      data/static/js/preview.js, data/static/js/search.js,
+                      data/static/js/MathMLinHTML.js, data/static/js/footnotes.js,
+                      data/static/robots.txt,
diff -rN -u old-gitit/rules new-gitit/rules
--- old-gitit/rules	2015-05-26 21:03:12.387807062 +0000
+++ new-gitit/rules	2015-05-26 21:03:12.399807346 +0000
@@ -20,15 +20,24 @@
 
 build/gitit:: $(MANPAGES)
 
+define link_jquery_ui
+	dh_link -pgitit /usr/share/javascript/jquery-ui/ui/jquery.ui.$(1).min.js \
+		usr/share/gitit/data/static/js/jquery.ui.$(1).js
+
+endef
+
 install/gitit:: debian/tmp-inst-ghc debian/extra-depends-ghc
 	cp -av debian/tmp-inst-ghc/usr/bin/* debian/gitit/usr/bin
 	cp -av debian/tmp-inst-ghc/usr/share/gitit debian/gitit/usr/share
 
-	# Don't use embedded copies of jQuery and jQuery UI; instead, make symlinks
-	rm -f debian/gitit/usr/share/gitit/data/static/js/jquery.min.js
-	rm -f debian/gitit/usr/share/gitit/data/static/js/jquery-ui.packed.js
-	dh_link -pgitit /usr/share/javascript/jquery/jquery.min.js usr/share/gitit/data/static/js/jquery.min.js
-	dh_link -pgitit /usr/share/javascript/jquery-ui/jquery-ui.min.js usr/share/gitit/data/static/js/jquery-ui.packed.js
+	$(foreach mod, core draggable droppable tabs, $(call link_jquery_ui,$(mod)))
+	dh_link -pgitit /usr/share/javascript/jquery/jquery.min.js \
+		usr/share/gitit/data/static/js/jquery.js
+
+	# Unlike other libraries, jquery-hotkeys does not provide minimized
+	# version.
+	dh_link -pgitit /usr/share/javascript/jquery-hotkeys/jquery.hotkeys.js \
+		usr/share/gitit/data/static/js/jquery.hotkeys.js
 
 	# Removes a few files, that are not necessary and make lintian cry
 	rm -f debian/gitit/usr/share/gitit/data/post-update
@@ -37,7 +46,3 @@
 
 	# Build data packages depends
 	dh_haskell_depends -pgitit
-
-clean::
-	rm -f $(MANPAGES)
-




More information about the Pkg-haskell-commits mailing list