Commit e4d70dc1 authored by David Paleino's avatar David Paleino

First debianization

parent 44e9e9ac
node-connect (1.7.1-1) UNRELEASED; urgency=low
* Initial release (Closes: #645183)
-- David Paleino <dapal@debian.org> Thu, 13 Oct 2011 12:44:43 +0200
Source: node-connect
Section: web
Priority: extra
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>
Uploaders: David Paleino <dapal@debian.org>
Build-Depends:
debhelper (>= 8~)
, dh-buildinfo
Standards-Version: 3.9.2
Homepage: https://github.com/senchalabs/connect
Vcs-Git: git://git.debian.org/collab-maint/node-connect.git
Vcs-Browser: http://git.debian.org/?p=collab-maint/node-connect.git;a=summary
Package: libnode-connect
Architecture: all
Depends:
${misc:Depends}
, libnode-qs
, libnode-mime
Description: high performance middleware framework for NodeJS
Connect is a middleware framework for node, shipping with bundled
middlewares and a rich choice of 3rd-party middlewares.
.
It bundles:
- basicAuth: basic http authentication
- bodyParser: extensible request body parser
- compiler: static asset compiler (sass, less, coffee-script, etc)
- cookieParser: cookie parser
- csrf: cross-site request forgery protection
- directory: directory listing middleware
- errorHandler: flexible error handler
- favicon: efficient favicon server (with default icon)
- limit: limit the bytesize of request bodies
- logger: request logger with custom format support
- methodOverride: faux HTTP method support
- profiler: request profiler reporting response-time, memory usage, etc
- query: automatic querystring parser, populating `req.query`
- responseTime: calculates response-time and exposes via X-Response-Time
- router: provides rich Sinatra / Express-like routing
- session: session management support with bundled MemoryStore
- static: streaming static file server supporting `Range` and more
- staticCache: memory cache layer for the static() middleware
- vhost: virtual host sub-domain mapping middleware
Format: http://dep.debian.net/deps/dep5
Upstream-Name: connect
Files: *
Copyright: © 2010, Sencha Inc.
© 2011, LearnBoost
© 2011, TJ Holowaychuk
License: MIT
Files: debian/*
Copyright: © 2011, David Paleino <dapal@debian.org>
License: MIT
License: MIT
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.
lib/* usr/lib/nodejs/connect/
usr/lib/nodejs/connect/connect.js usr/lib/nodejs/connect/index.js
From: David Paleino <dapal@debian.org>
Subject: move public/ under /usr/share/libnode-connect/
Origin: vendor
Forwarded: no
---
lib/middleware/directory.js | 6 +++---
lib/middleware/errorHandler.js | 6 +++---
lib/middleware/favicon.js | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
--- node-connect.orig/lib/middleware/directory.js
+++ node-connect/lib/middleware/directory.js
@@ -100,9 +100,9 @@ exports = module.exports = function dire
*/
exports.html = function(req, res, files, next, dir, showUp, icons){
- fs.readFile(__dirname + '/../public/directory.html', 'utf8', function(err, str){
+ fs.readFile('/usr/share/libnode-connect/public/directory.html', 'utf8', function(err, str){
if (err) return next(err);
- fs.readFile(__dirname + '/../public/style.css', 'utf8', function(err, style){
+ fs.readFile('/usr/share/libnode-connect/public/style.css', 'utf8', function(err, style){
if (err) return next(err);
if (showUp) files.unshift('..');
str = str
@@ -186,7 +186,7 @@ function html(files, dir, useIcons) {
function load(icon) {
if (cache[icon]) return cache[icon];
- return cache[icon] = fs.readFileSync(__dirname + '/../public/icons/' + icon, 'base64');
+ return cache[icon] = fs.readFileSync('/usr/share/libnode-connect/public/icons/' + icon, 'base64');
}
/**
--- node-connect.orig/lib/middleware/errorHandler.js
+++ node-connect/lib/middleware/errorHandler.js
@@ -59,8 +59,8 @@ exports = module.exports = function erro
var accept = req.headers.accept || '';
// html
if (~accept.indexOf('html')) {
- fs.readFile(__dirname + '/../public/style.css', 'utf8', function(e, style){
- fs.readFile(__dirname + '/../public/error.html', 'utf8', function(e, html){
+ fs.readFile('/usr/share/libnode-connect/public/style.css', 'utf8', function(e, style){
+ fs.readFile('/usr/share/libnode-connect/public/error.html', 'utf8', function(e, html){
var stack = (err.stack || '')
.split('\n').slice(1)
.map(function(v){ return '<li>' + v + '</li>'; }).join('');
@@ -97,4 +97,4 @@ exports = module.exports = function erro
* Template title.
*/
-exports.title = 'Connect';
\ No newline at end of file
+exports.title = 'Connect';
--- node-connect.orig/lib/middleware/favicon.js
+++ node-connect/lib/middleware/favicon.js
@@ -45,7 +45,7 @@ var icon;
module.exports = function favicon(path, options){
var options = options || {}
- , path = path || __dirname + '/../public/favicon.ico'
+ , path = path || '/usr/share/libnode-connect/public/favicon.ico'
, maxAge = options.maxAge || 86400000;
return function favicon(req, res, next){
@@ -73,4 +73,4 @@ module.exports = function favicon(path,
next();
}
};
-};
\ No newline at end of file
+};
00-fix_public_path.patch
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
override_dh_install:
dh_install
dh_buildinfo
rm -rf $(CURDIR)/debian/libnode-connect/usr/lib/nodejs/connect/index.js
mv $(CURDIR)/debian/libnode-connect/usr/lib/nodejs/connect/public \
$(CURDIR)/debian/libnode-connect/usr/share/libnode-connect/
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