[Pkg-javascript-commits] [acorn] 02/03: Initial Debian packaging.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Feb 27 12:45:04 UTC 2015


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

sebastic pushed a commit to branch master
in repository acorn.

commit 12cd928e08c23bab328cfc8aca44812283f5b218
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Feb 27 12:52:12 2015 +0100

    Initial Debian packaging.
---
 debian/changelog            |   6 +++
 debian/compat               |   1 +
 debian/control              |  47 +++++++++++++++++++
 debian/copyright            | 106 ++++++++++++++++++++++++++++++++++++++++++
 debian/docs                 |   1 +
 debian/gbp.conf             |  16 +++++++
 debian/libjs-acorn.install  |   6 +++
 debian/man/acorn.1.xml      | 110 ++++++++++++++++++++++++++++++++++++++++++++
 debian/node-acorn.dirs      |   1 +
 debian/node-acorn.install   |   5 ++
 debian/node-acorn.links     |   1 +
 debian/node-acorn.manpages  |   1 +
 debian/patches/nodejs.patch |  22 +++++++++
 debian/patches/series       |   1 +
 debian/rules                |  29 ++++++++++++
 debian/source/format        |   1 +
 debian/tests/control        |   2 +
 debian/tests/require        |   3 ++
 debian/upstream/metadata    |   6 +++
 debian/watch                |   6 +++
 20 files changed, 371 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..40a1388
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+acorn (0.11.0-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #779300)
+
+ -- Bas Couwenberg <sebastic at debian.org>  Fri, 27 Feb 2015 11:56:49 +0100
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..463b227
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,47 @@
+Source: acorn
+Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
+Uploaders: Bas Couwenberg <sebastic at debian.org>
+Section: web
+Priority: extra
+Build-Depends: debhelper (>= 9),
+               dh-buildinfo,
+               nodejs,
+               node-uglify,
+               docbook2x,
+               docbook-xsl,
+               docbook-xml,
+               xsltproc
+Standards-Version: 3.9.6
+Vcs-Browser: http://anonscm.debian.org/cgit/pkg-javascript/acorn.git
+Vcs-Git: git://anonscm.debian.org/pkg-javascript/acorn.git
+Homepage: http://marijnhaverbeke.nl/acorn/
+XS-Testsuite: autopkgtest
+
+Package: libjs-acorn
+Architecture: all
+Depends: ${misc:Depends}
+Recommends: javascript-common
+Description: ECMAScript parser for JavaScript
+ Acorn is a tiny, fast JavaScript parser written in JavaScript.
+ .
+ acorn.js defines the main parser interface. The library also comes with a
+ error-tolerant parser and an abstract syntax tree walker, defined in other
+ files (acorn_loose.js & util/walk.js).
+ .
+ This package contains the acorn JavaScript files.
+
+Package: node-acorn
+Architecture: all
+Depends: ${misc:Depends},
+         nodejs
+Description: ECMAScript parser for Node.js
+ Acorn is a tiny, fast JavaScript parser written in JavaScript.
+ .
+ acorn.js defines the main parser interface. The library also comes with a
+ error-tolerant parser and an abstract syntax tree walker, defined in other
+ files (acorn_loose.js & util/walk.js).
+ .
+ This package contains the acorn module for Node.js.
+ .
+ Node.js is an event-based server-side JavaScript engine.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..e3e8a32
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,106 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Acorn
+Upstream-Contact: Marijn Haverbeke <marijnh at gmail.com>
+Source: http://marijnhaverbeke.nl/acorn/
+
+Files: *
+Copyright: 2012-2014, Marijn Haverbeke <marijnh at gmail.com>
+           2012-2014, Alistair Braidwood
+           2012-2014, Aparajita Fishman
+           2012-2014, Arian Stolwijk
+           2012-2014, Artem Govorov
+           2012-2014, Brandon Mills
+           2012-2014, Charles Hughes
+           2012-2014, Conrad Irwin
+           2012-2014, David Bonnet
+           2012-2014, impinball
+           2012-2014, Ingvar Stepanyan
+           2012-2014, Jiaxing Wang
+           2012-2014, Johannes Herr
+           2012-2014, Jürg Lehni
+           2012-2014, keeyipchan
+           2012-2014, krator
+           2012-2014, Martin Carlberg
+           2012-2014, Mathias Bynens
+           2012-2014, Mathieu 'p01' Henri
+           2012-2014, Max Schaefer
+           2012-2014, Mihai Bazon
+           2012-2014, Mike Rennie
+           2012-2014, Oskar Schöldström
+           2012-2014, Paul Harper
+           2012-2014, Peter Rust
+           2012-2014, PlNG
+           2012-2014, r-e-d
+           2012-2014, Rich Harris
+           2012-2014, Sebastian McKenzie
+           2012-2014, zsjforcn
+License: Expat
+
+Files: test/jquery-string.js
+Copyright: 2005, 2014, jQuery Foundation, Inc. and other contributors
+License: Expat
+
+Files: test/tests-harmony.js
+Copyright: 2011-2012, Ariya Hidayat <ariya.hidayat at gmail.com>
+           2011-2012, Arpad Borsos <arpad.borsos at googlemail.com>
+           2011-2012, Yusuke Suzuki <utatane.tea at gmail.com>
+                2012, Joost-Wim Boekesteijn <joost-wim at boekesteijn.nl>
+                2014, Ingvar Stepanyan <me at rreverser.com>
+License: BSD-2-Clause
+
+Files: test/compare/esprima.js
+Copyright:      2012, Arpad Borsos <arpad.borsos at googlemail.com>
+                2012, Joost-Wim Boekesteijn <joost-wim at boekesteijn.nl>
+                2012, Kris Kowal <kris.kowal at cixar.com>
+                2012, Mathias Bynens <mathias at qiwi.be>
+                2012, Yusuke Suzuki <utatane.tea at gmail.com>
+           2011-2013, Ariya Hidayat <ariya.hidayat at gmail.com>
+                2013, Thaddee Tyl <thaddee.tyl at gmail.com>
+License: BSD-2-Clause
+
+Files: debian/*
+Copyright: 2015, Bas Couwenberg <sebastic at xs4all.nl>
+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.
+
+License: BSD-2-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
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/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..21d0417
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,16 @@
+[DEFAULT]
+
+# The default name for the upstream branch is "upstream".
+# Change it if the name is different (for instance, "master").
+upstream-branch = upstream
+
+# The default name for the Debian branch is "master".
+# Change it if the name is different (for instance, "debian/unstable").
+debian-branch = master
+
+# git-import-orig uses the following names for the upstream tags.
+# Change the value if you are not using git-import-orig
+upstream-tag = upstream/%(version)s
+
+# Always use pristine-tar.
+pristine-tar = True
diff --git a/debian/libjs-acorn.install b/debian/libjs-acorn.install
new file mode 100644
index 0000000..1b131cf
--- /dev/null
+++ b/debian/libjs-acorn.install
@@ -0,0 +1,6 @@
+acorn.js           usr/share/javascript/acorn/
+acorn_loose.js     usr/share/javascript/acorn/
+acorn.min.js       usr/share/javascript/acorn/
+acorn_loose.min.js usr/share/javascript/acorn/
+util/              usr/share/javascript/acorn/
+walk.min.js        usr/share/javascript/acorn/util/
diff --git a/debian/man/acorn.1.xml b/debian/man/acorn.1.xml
new file mode 100644
index 0000000..a01e8ec
--- /dev/null
+++ b/debian/man/acorn.1.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<refentry id='acorn'>
+
+  <refmeta>
+    <refentrytitle>acorn</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>acorn</refname>
+    <refpurpose>parse JavaScript file</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv id='synopsis'>
+    <cmdsynopsis>
+      <command>acorn</command>
+      <group>
+        <arg choice='opt'><option>--ecma3</option></arg>
+        <arg choice='opt'><option>--ecma5</option></arg>
+        <arg choice='opt'><option>--ecma6</option></arg>
+      </group>
+      <arg choice='opt'><option>--strictSemicolons</option></arg>
+      <arg choice='opt'><option>--locations</option></arg>
+      <arg choice='opt'><option>--compact</option></arg>
+      <arg choice='opt'><option>--silent</option></arg>
+      <arg choice='opt'><option>--help</option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1 id='description'>
+    <title>DESCRIPTION</title>
+    <para>
+      <command>acorn</command> is a utility to parse a JavaScript file from
+      the command line.
+      It accepts as arguments the input file.
+      The utility spits out the syntax tree as JSON data.
+    </para>
+  </refsect1>
+
+  <refsect1 id='options'>
+    <title>OPTIONS</title>
+
+    <variablelist>
+
+      <varlistentry>
+        <term><option>--ecma3</option></term>
+        <term><option>--ecma5</option></term>
+        <term><option>--ecma6</option></term>
+        <listitem>
+          <para>
+            Sets the ECMAScript version to parse.
+            Default is version 5.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--strictSemicolons</option></term>
+        <listitem>
+          <para>
+            Prevents the parser from doing automatic semicolon insertion.
+            Statements that do not end in semicolons will generate an error.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--locations</option></term>
+        <listitem>
+          <para>
+            Attaches a "loc" object to each node with "start" and "end"
+            subobjects, each of which contains the one-based line and
+            zero-based column numbers in {line, column} form.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--compact</option></term>
+        <listitem>
+          <para>
+            No whitespace is used in the AST output.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--silent</option></term>
+        <listitem>
+          <para>
+            Do not output the AST, just return the exit status.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--help</option></term>
+        <listitem>
+          <para>
+            Print the usage information and quit.
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </refsect1>
+
+</refentry>
diff --git a/debian/node-acorn.dirs b/debian/node-acorn.dirs
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/debian/node-acorn.dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/node-acorn.install b/debian/node-acorn.install
new file mode 100644
index 0000000..ea7897b
--- /dev/null
+++ b/debian/node-acorn.install
@@ -0,0 +1,5 @@
+package.json   usr/lib/nodejs/acorn/
+acorn.js       usr/lib/nodejs/acorn/
+acorn_loose.js usr/lib/nodejs/acorn/
+util/          usr/lib/nodejs/acorn/
+bin/acorn      usr/lib/nodejs/acorn/bin/
diff --git a/debian/node-acorn.links b/debian/node-acorn.links
new file mode 100644
index 0000000..090f0cd
--- /dev/null
+++ b/debian/node-acorn.links
@@ -0,0 +1 @@
+usr/lib/nodejs/acorn/bin/acorn usr/bin/acorn
diff --git a/debian/node-acorn.manpages b/debian/node-acorn.manpages
new file mode 100644
index 0000000..13cdaf4
--- /dev/null
+++ b/debian/node-acorn.manpages
@@ -0,0 +1 @@
+debian/man/*.1
diff --git a/debian/patches/nodejs.patch b/debian/patches/nodejs.patch
new file mode 100644
index 0000000..f0f1893
--- /dev/null
+++ b/debian/patches/nodejs.patch
@@ -0,0 +1,22 @@
+Description: Switch NodeJS command from node (upstream) to nodejs (Debian).
+Author: Bas Couwenberg <sebastic at xs4all.nl>
+
+--- a/bin/acorn
++++ b/bin/acorn
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env node
++#!/usr/bin/env nodejs
+ 
+ var path = require("path");
+ var fs = require("fs");
+--- a/package.json
++++ b/package.json
+@@ -13,7 +13,7 @@
+     "licenses": [{"type": "MIT",
+                   "url": "http://marijnhaverbeke.nl/acorn/LICENSE"}],
+     "scripts": {
+-      "test": "node test/run.js",
++      "test": "nodejs test/run.js",
+       "prepublish": "bin/without_eval > acorn_csp.js"
+     },
+     "bin": {"acorn": "./bin/acorn"},
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..81a5e8e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+nodejs.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..57836dd
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,29 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+MANPAGES := $(wildcard debian/man/*.*.xml)
+
+%:
+	dh $@
+
+override_dh_clean:
+	dh_clean debian/man/*.1 *.min.js
+
+override_dh_auto_build:
+	# Create man page from DocBook XML
+	for x in $(MANPAGES) ; do \
+	    docbook2x-man $$x ; \
+	    mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
+	done
+
+	# Minify Javascript
+	uglifyjs -o acorn.min.js acorn.js
+	uglifyjs -o acorn_loose.min.js acorn_loose.js
+	uglifyjs -o walk.min.js util/walk.js
+
+override_dh_auto_test:
+	nodejs test/run.js
+
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..3be8c91
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: require
+Depends: node-acorn
diff --git a/debian/tests/require b/debian/tests/require
new file mode 100644
index 0000000..a89f662
--- /dev/null
+++ b/debian/tests/require
@@ -0,0 +1,3 @@
+#!/bin/sh
+set -e
+nodejs -e "require('acorn');"
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..efdd18e
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,6 @@
+---
+Bug-Database: https://github.com/marijnh/acorn/issues
+Bug-Submit: https://github.com/marijnh/acorn/issues/new
+Name: Acorn
+Repository: https://github.com/marijnh/acorn.git
+Repository-Browse: https://github.com/marijnh/acorn
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..dfc53dc
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,6 @@
+version=3
+opts=\
+dversionmangle=s/\+(debian|dfsg|ds|deb)(\.\d+)?$//,\
+filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/acorn-$1.tar.gz/ \
+https://github.com/marijnh/acorn/releases \
+.*/archive/v?([\d\.]+).tar.gz

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



More information about the Pkg-javascript-commits mailing list