diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | .travis.yml | 13 | ||||
-rw-r--r-- | Makefile.in | 11 | ||||
m--------- | addon-sdk | 0 | ||||
-rw-r--r-- | bootstrap.js | 11 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | install.rdf | 29 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rwxr-xr-x | test.sh | 12 |
9 files changed, 58 insertions, 26 deletions
diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index a3c316f..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "addon-sdk"] - path = addon-sdk - url = https://github.com/mozilla/addon-sdk.git diff --git a/.travis.yml b/.travis.yml index 62ba557..44a401f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,14 @@ -language: python -python: - - "2.7" +language: node_js +node_js: + - "0.10" + - "0.11" + - "0.12" addons: firefox: "41.0.1" before_script: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" -script: ./test.sh +script: + - npm i jpm + - npm i + - jpm test diff --git a/Makefile.in b/Makefile.in index 7b3c878..35e9692 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,7 +21,6 @@ SHELL := /bin/bash DESTDIR = -ADDON_SDK = /opt/addon-sdk srcdir = @srcdir@ VPATH = @srcdir@ prefix = @prefix@ @@ -51,7 +50,7 @@ enabled already, you may, inside your Mozilla-browser, need to go in \ the menu in Tools > Add-ons and click enable where you see LibreJS. \ " -CFX_ARGS = +JPM_ARGS = all: xpi @@ -103,10 +102,14 @@ dist: info: doc/librejs.info cd doc && gendocs.sh --email bug-librejs@gnu.org librejs "GNU LibreJS Manual" +jpm: + npm i jpm + xpi: librejs.xpi -librejs.xpi: - cd $(ADDON_SDK) && source bin/activate && cd - && cfx $(CFX_ARGS) xpi +librejs.xpi: jpm + npm i + jpm xpi .PHONY: all install install-pdf install-dvi install-html uninstall clean \ distclean info pdf dvi html xpi txt diff --git a/addon-sdk b/addon-sdk deleted file mode 160000 -Subproject 12f7d53e8b5fc015a15fa4a30fa588e81e9e9b2 diff --git a/bootstrap.js b/bootstrap.js new file mode 100644 index 0000000..4866564 --- /dev/null +++ b/bootstrap.js @@ -0,0 +1,11 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +"use strict"; + +const { utils: Cu } = Components; +const rootURI = __SCRIPT_URI_SPEC__.replace("bootstrap.js", ""); +const COMMONJS_URI = "resource://gre/modules/commonjs"; +const { require } = Cu.import(COMMONJS_URI + "/toolkit/require.js", {}); +const { Bootstrap } = require(COMMONJS_URI + "/sdk/addon/bootstrap.js"); +const { startup, shutdown, install, uninstall } = new Bootstrap(rootURI); diff --git a/configure.ac b/configure.ac index 54f8fcf..2952cd5 100644 --- a/configure.ac +++ b/configure.ac @@ -5,8 +5,7 @@ AC_PATH_PROG([MAKEINFO], makeinfo) AC_PATH_PROG([TEXI2ANY], texi2any) AC_PATH_PROG([TEXI2DVI], texi2dvi) AC_PATH_PROG([TEXI2PDF], texi2pdf) -AC_ARG_VAR([ADDON_SDK], [location of the Mozilla addon-sdk (default=/opt/addon-sdk)]) -AC_ARG_VAR([CFX_ARGS], [build arguments to pass to cfx]) +AC_ARG_VAR([JPM_ARGS], [build arguments to pass to jpm]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/install.rdf b/install.rdf new file mode 100644 index 0000000..c34883b --- /dev/null +++ b/install.rdf @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> + <Description about="urn:mozilla:install-manifest"> + <em:id>jid1-KtlZuoiikVfFew@jetpack</em:id> + <em:type>2</em:type> + <em:bootstrap>true</em:bootstrap> + <em:unpack>false</em:unpack> + <em:version>6.0.10rc20150620</em:version> + <em:name>GNU LibreJS</em:name> + <em:description>GNU LibreJS is an add-on for Mozilla-based browsers (IceCat, Firefox, Abrowser, Iceweasel) + that prevents the execution of nonfree nontrivial JavaScript as described in "The Javascript Trap": http://www.gnu.org/philosophy/javascript-trap.html</em:description> + <em:creator>Loic J. Duros</em:creator> + <em:iconURL>data/widget/images/librejs-32.png</em:iconURL> + <em:homepageURL>https://gnu.org/software/librejs/</em:homepageURL> + <em:optionsURL>data:text/xml,<placeholder/></em:optionsURL> + <em:optionsType>2</em:optionsType> + + <em:targetApplication> + <Description> + <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> + <em:minVersion>38.0a1</em:minVersion> + <em:maxVersion>39.0</em:maxVersion> +</Description> +</em:targetApplication> + + + </Description> + +</RDF> diff --git a/package.json b/package.json index 3b2f49c..cb34bab 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "author": "Loic J. Duros", "homepage": "https://gnu.org/software/librejs/", "repository": "http://git.savannah.gnu.org/cgit/librejs.git/", - "version": "6.0.10.20151023", + "version": "6.0.10rc20151023", "title": "GNU LibreJS", "id": "jid1-KtlZuoiikVfFew@jetpack", "description": "GNU LibreJS is an add-on for Mozilla-based browsers (IceCat, Firefox, Abrowser, Iceweasel)\n that prevents the execution of nonfree nontrivial JavaScript as described in \"The Javascript Trap\": http://www.gnu.org/philosophy/javascript-trap.html", diff --git a/test.sh b/test.sh deleted file mode 100755 index 2886c95..0000000 --- a/test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ ! -f "addon-sdk/bin/activate" ]; then - die "Addon SDK not available. Run git submodule update." -fi - -pushd addon-sdk -source bin/activate -popd - -echo "Running tests" -cfx test --verbose |