[Pkg-javascript-commits] [node-mime-types] 02/02: initial debian commit

Leo Iannacone l3on-guest at moszumanska.debian.org
Fri Jul 4 08:01:45 UTC 2014


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

l3on-guest pushed a commit to branch master
in repository node-mime-types.

commit f54682bf0c00b137daf5f0df8d26f9b1cd57f129
Author: Leo Iannacone <l3on at ubuntu.com>
Date:   Fri Jul 4 10:01:06 2014 +0200

    initial debian commit
---
 debian/changelog                                   |  6 ++
 debian/compat                                      |  1 +
 debian/control                                     | 30 ++++++++
 debian/copyright                                   | 38 ++++++++++
 debian/docs                                        |  1 +
 debian/install                                     |  2 +
 .../0001-get_mime_types_from_filesystem.patch      | 84 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/rules                                       |  9 +++
 debian/source/format                               |  1 +
 debian/tests/control                               |  2 +
 debian/tests/require                               |  3 +
 debian/watch                                       |  5 ++
 13 files changed, 183 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..dcf8d38
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+node-mime-types (1.0.1+dfsg-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #753672)
+
+ -- Leo Iannacone <l3on at ubuntu.com>  Wed, 02 Jul 2014 09:56:39 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..8f7e0c1
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,30 @@
+Source: node-mime-types
+Section: web
+Priority: extra
+Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
+Uploaders: Leo Iannacone <l3on at ubuntu.com>
+Build-Depends:
+ debhelper (>= 8)
+ , dh-buildinfo
+ , nodejs
+ , mime-support
+ , node-mime
+ , node-should
+ , node-mocha
+Standards-Version: 3.9.5
+Homepage: https://github.com/expressjs/mime-types
+Vcs-Git: git://anonscm.debian.org/pkg-javascript/node-mime-types.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-javascript/node-mime-types.git
+XS-Testsuite: autopkgtest
+
+Package: node-mime-types
+Architecture: all
+Depends:
+ ${misc:Depends}
+ , nodejs
+Description: ultimate JavaScript content-type utility - Node.js module
+ This package provides a library for mime-type mapping similar to mime
+ module with some differences, such as it always returns a value, even
+ false if mime type is not found, and supports additional mime types.
+ .
+ Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..71218d6
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,38 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: mime-types
+Upstream-Contact: https://github.com/expressjs/mime-types/issues
+Source: https://github.com/expressjs/mime-types
+ Repackaged, excluding pre-compiled JSON files
+Files-Excluded: lib/mime.json
+ lib/node.json
+
+
+Files: *
+Copyright: 2014 Jonathan Ong <me at jongleberry.com>
+License: Expat
+
+Files: debian/*
+Copyright: 2014 Leo Iannacone <l3on at ubuntu.com>
+License: Expat
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..18d5c5a
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,2 @@
+package.json usr/lib/nodejs/mime-types/
+lib usr/lib/nodejs/mime-types/
diff --git a/debian/patches/0001-get_mime_types_from_filesystem.patch b/debian/patches/0001-get_mime_types_from_filesystem.patch
new file mode 100644
index 0000000..21ec59e
--- /dev/null
+++ b/debian/patches/0001-get_mime_types_from_filesystem.patch
@@ -0,0 +1,84 @@
+Description: Avoid remote connections to get mime types.
+ * lib/build.js: use files shipped within mime-support
+   and node-mime packages
+ * Makefile:
+   - use nodejs binary
+   - provide clean task
+   - disable colors for mocha tests
+ * test/mime.js: update tests according with new types
+   database
+Author: Leo Iannacone <l3on at ubuntu.com>
+Forwarded: not-needed
+
+---
+ Makefile     |    9 ++++++---
+ build.js     |   20 ++++----------------
+ test/mime.js |    2 +-
+ 3 files changed, 11 insertions(+), 20 deletions(-)
+
+--- a/build.js
++++ b/build.js
+@@ -6,20 +6,12 @@
+  * Convert these text files to JSON for browser usage.
+  */
+ 
+-var co = require('co')
+ var fs = require('fs')
+ var path = require('path')
+-var cogent = require('cogent')
+ 
+-function* get(url) {
+-  var res = yield* cogent(url, {
+-    string: true
+-  })
+-
+-  if (res.statusCode !== 200)
+-    throw new Error('got status code ' + res.statusCode + ' from ' + url)
++function get(url) {
+ 
+-  var text = res.text
++  var text = fs.readFileSync(url, 'utf8')
+   var json = {}
+   // http://en.wikipedia.org/wiki/Internet_media_type#Naming
+   /**
+@@ -49,9 +41,5 @@
+     JSON.stringify(json, null, 2) + '\n')
+ }
+ 
+-co(function* () {
+-  yield [
+-    get('http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types'),
+-    get('https://raw.githubusercontent.com/broofa/node-mime/master/types/node.types')
+-  ]
+-})()
++get('/etc/mime.types')
++get('/usr/share/node-mime/node.types')
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,12 @@
+ 
+ build:
+-	node --harmony-generators build.js
++	nodejs build.js
+ 
+ test:
+-	node test/mime.js
+-	mocha --require should --reporter spec test/test.js
++	nodejs test/mime.js
++	mocha -C --require should --reporter spec test/test.js
++
++clean:
++	rm -f lib/mime.json lib/node.json
+ 
+ .PHONY: build test
+--- a/test/mime.js
++++ b/test/mime.js
+@@ -33,7 +33,7 @@
+ // Test extensions
+ //
+ 
+-eq('txt', mime.extension(mime.types.text));
++eq('asc', mime.extension(mime.types.text));
+ eq('html', mime.extension(mime.types.htm));
+ eq('bin', mime.extension('application/octet-stream'));
+ eq('bin', mime.extension('application/octet-stream '));
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b96ec55
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-get_mime_types_from_filesystem.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..0c06312
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+	dh $@
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d35c388
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: require
+Depends: node-mime-types
diff --git a/debian/tests/require b/debian/tests/require
new file mode 100644
index 0000000..e1aaac3
--- /dev/null
+++ b/debian/tests/require
@@ -0,0 +1,3 @@
+#!/bin/sh
+set -e
+nodejs -e "require('mime-types');"
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..be0bc72
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,5 @@
+version=3
+opts=\
+dversionmangle=s/\?(debian|dfsg|ds|deb)\d*$//,\
+filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/node-mime-types-$1.tar.gz/ \
+ https://github.com/expressjs/mime-types/tags .*/archive/v?([\d\.]+).tar.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-mime-types.git



More information about the Pkg-javascript-commits mailing list