[Pkg-javascript-commits] [mustache.js] 31/31: Packaging refresh.
Martín Ferrari
tincho at debian.org
Sun Nov 13 22:20:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
tincho pushed a commit to branch master
in repository mustache.js.
commit 46992a70e82540977e5d7fd95896df8632eeb3be
Author: Martín Ferrari <tincho at debian.org>
Date: Sun Nov 13 19:35:29 2016 +0000
Packaging refresh.
* Packaging refresh:
- Include CLI tool (patch nodejs path).
- Re-enable tests.
- Use a build directory, and re-generate the minified JS.
---
debian/changelog | 4 ++++
debian/clean | 4 ----
debian/control | 16 +++++++--------
debian/libjs-mustache.docs | 1 +
debian/libjs-mustache.install | 11 +++++++----
debian/node-mustache.docs | 1 +
debian/node-mustache.install | 5 ++++-
debian/node-mustache.links | 1 +
debian/patches/01-Use_build_dir.patch | 35 +++++++++++++++++++++++++++++++++
debian/patches/02-Fix_nodejs_path.patch | 8 ++++++++
debian/patches/series | 2 ++
debian/rules | 21 +++++++++-----------
12 files changed, 79 insertions(+), 30 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index be3a64f..322dc03 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,10 @@ mustache.js (2.3.0-1) UNRELEASED; urgency=medium
* Remove old patches.
* Update compat and Standards-Version with no changes.
* Update copyright info.
+ * Packaging refresh:
+ - Include CLI tool (patch nodejs path).
+ - Re-enable tests.
+ - Use a build directory, and re-generate the minified JS.
-- Martín Ferrari <tincho at debian.org> Sun, 13 Nov 2016 19:03:08 +0100
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index 2f50b1f..0000000
--- a/debian/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-dojox/string/mustache.js
-qooxdoo.mustache.js
-requirejs.mustache.js
-yui3/mustache/mustache.js
diff --git a/debian/control b/debian/control
index fd3148c..6448c98 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,7 @@ Section: web
Priority: extra
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
Uploaders: David Paleino <dapal at debian.org>
-Build-Depends:
- debhelper (>= 9~)
- , rake
+Build-Depends: debhelper (>= 9~), rake, node-uglify, mocha, chai
Standards-Version: 3.9.8
Homepage: http://mustache.github.com/
Vcs-Git: git://git.debian.org/collab-maint/mustache.js.git
@@ -23,14 +21,13 @@ Description: Mustache rendering engine for Javascript
it is impossible to embed application logic in this template
language."
.
- This package provides the Mustache rendering engine for Javascript.
+ This package provides the Mustache rendering engine for Javascript. Includes
+ wrappers for jQuery, MooTools, Dojo, YUI3, and qooxdoo.
Package: node-mustache
Architecture: all
-Depends:
- ${misc:Depends}
- , nodejs
-Description: Mustache rendering engine for Javascript - CommonJS
+Depends: ${misc:Depends}, nodejs
+Description: Mustache rendering engine for Javascript - NodeJS
Inspired by ctemplate, Mustache is a framework-agnostic way to render
logic-free views. (As in model-view-controller.)
.
@@ -38,4 +35,5 @@ Description: Mustache rendering engine for Javascript - CommonJS
it is impossible to embed application logic in this template
language."
.
- This package provides the Mustache rendering engine for CommonJS.
+ This package provides the Mustache rendering engine for NodeJS, and the
+ `mustache' command-line tool.
diff --git a/debian/libjs-mustache.docs b/debian/libjs-mustache.docs
index b43bf86..391419a 100644
--- a/debian/libjs-mustache.docs
+++ b/debian/libjs-mustache.docs
@@ -1 +1,2 @@
README.md
+MIGRATING.md
diff --git a/debian/libjs-mustache.install b/debian/libjs-mustache.install
index 5a51e15..073297e 100644
--- a/debian/libjs-mustache.install
+++ b/debian/libjs-mustache.install
@@ -1,4 +1,7 @@
-jquery.mustache.js usr/share/javascript/mustache/
-mustache.js usr/share/javascript/mustache/
-qooxdoo.mustache.js usr/share/javascript/mustache/
-requirejs.mustache.js usr/share/javascript/mustache/
+mustache.js usr/share/javascript/mustache/
+build/mustache.min.js usr/share/javascript/mustache/
+build/jquery.mustache.js usr/share/javascript/mustache/
+build/mootools.mustache.js usr/share/javascript/mustache/
+build/qooxdoo.mustache.js usr/share/javascript/mustache/
+build/yui3/mustache/ usr/share/javascript/yui3/
+build/dojox/string/ usr/share/javascript/dojox/
diff --git a/debian/node-mustache.docs b/debian/node-mustache.docs
index b43bf86..391419a 100644
--- a/debian/node-mustache.docs
+++ b/debian/node-mustache.docs
@@ -1 +1,2 @@
README.md
+MIGRATING.md
diff --git a/debian/node-mustache.install b/debian/node-mustache.install
index 8e44ddb..a1bea23 100644
--- a/debian/node-mustache.install
+++ b/debian/node-mustache.install
@@ -1 +1,4 @@
-lib/mustache.js usr/lib/nodejs/
+package.json usr/lib/nodejs/mustache/
+mustache.js usr/lib/nodejs/mustache/
+build/mustache.min.js usr/lib/nodejs/mustache/
+bin/ usr/lib/nodejs/mustache/
diff --git a/debian/node-mustache.links b/debian/node-mustache.links
new file mode 100644
index 0000000..f733b61
--- /dev/null
+++ b/debian/node-mustache.links
@@ -0,0 +1 @@
+usr/lib/nodejs/mustache/bin/mustache usr/bin/mustache
diff --git a/debian/patches/01-Use_build_dir.patch b/debian/patches/01-Use_build_dir.patch
new file mode 100644
index 0000000..effccd7
--- /dev/null
+++ b/debian/patches/01-Use_build_dir.patch
@@ -0,0 +1,35 @@
+--- a/Rakefile
++++ b/Rakefile
+@@ -3,6 +3,10 @@
+
+ task :default => :test
+
++def build_dir
++ ENV['BUILDDIR'] || '.'
++end
++
+ def minified_file
+ ENV['FILE'] || 'mustache.min.js'
+ end
+@@ -26,7 +30,7 @@
+
+ desc "Make a compressed build in #{minified_file}"
+ task :minify => :install_uglify do
+- sh "uglifyjs mustache.js > #{minified_file}"
++ sh "uglifyjs mustache.js > #{build_dir}/#{minified_file}"
+ end
+
+ desc "Run JSHint"
+@@ -47,10 +51,10 @@
+ task short.to_sym => dependencies do
+ puts "Packaging for #{name}"
+
+- mkdir_p final_location unless final_location.nil?
++ mkdir_p "#{build_dir}/#{final_location || '.'}"
+
+ sources = [ "#{source}/mustache.js.pre", 'mustache.js', "#{source}/mustache.js.post" ]
+- relative_name = "#{final_location || '.'}/#{target_js}"
++ relative_name = "#{build_dir}/#{final_location || '.'}/#{target_js}"
+
+ open(relative_name, 'w') do |f|
+ sources.each {|source| f << File.read(source) }
diff --git a/debian/patches/02-Fix_nodejs_path.patch b/debian/patches/02-Fix_nodejs_path.patch
new file mode 100644
index 0000000..9599b1a
--- /dev/null
+++ b/debian/patches/02-Fix_nodejs_path.patch
@@ -0,0 +1,8 @@
+--- a/bin/mustache
++++ b/bin/mustache
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env node
++#!/usr/bin/env nodejs
+
+ var fs = require('fs'),
+ path = require('path');
diff --git a/debian/patches/series b/debian/patches/series
index 38befa8..8d641d1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
#00-disable_tests.patch
#01-replace_unicode_char.patch
+01-Use_build_dir.patch
+02-Fix_nodejs_path.patch
diff --git a/debian/rules b/debian/rules
index 100ea9d..67d1aa8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,21 +4,18 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+export BUILDDIR := $(CURDIR)/build
+
%:
- dh $@
+ dh $@ --builddirectory=$(BUILDDIR)
override_dh_auto_build:
- rake commonjs
rake jquery
- rake requirejs
+ rake mootools
rake qooxdoo
- #rake dojo
- #rake yui3
-
-override_dh_auto_clean:
- #disabled, it also removes .pc/ and other possibly-useful things
- #rake clean
+ rake dojo
+ rake yui3
+ rake minify
- rm -rf \
- lib/ \
- jquery.mustache.js
+override_dh_auto_test:
+ rake test
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/mustache.js.git
More information about the Pkg-javascript-commits
mailing list