aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-13 10:35:55 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-13 10:35:55 +0200
commit6e9ddc2851862a0477cf931e5c7cfb4d3b4e44ff (patch)
tree2ded40cf312d02003a03a9dcf20fadbe6ef2379b
parent04feb376a38677ec055843c34afbb296f1d9f7b2 (diff)
downloadreclaim-webextension-6e9ddc2851862a0477cf931e5c7cfb4d3b4e44ff.tar.gz
reclaim-webextension-6e9ddc2851862a0477cf931e5c7cfb4d3b4e44ff.zip
support build of chrome and ff webext; use version from latest tag
-rw-r--r--Makefile12
-rwxr-xr-xbin/build_plugin7
-rwxr-xr-xbin/package_plugin17
-rw-r--r--manifest-chrome.json40
-rw-r--r--manifest-firefox.json (renamed from manifest.json)2
m---------ui0
6 files changed, 75 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 5015077..936d9a4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,14 @@
1all: build package_firefox package_chrome clean
2 ./bin/build_plugin firefox chrome
3
1build: 4build:
2 ./bin/build_plugin 5 ./bin/build_plugin
6
7package_firefox: build
8 ./bin/package_plugin firefox
9
10package_chrome: build
11 ./bin/package_plugin chrome
12
13clean:
14 if test -d build; then rm -rf build; fi
diff --git a/bin/build_plugin b/bin/build_plugin
index 2c5ffe0..3f81408 100755
--- a/bin/build_plugin
+++ b/bin/build_plugin
@@ -18,6 +18,9 @@ cd ..
18 18
19rm -rf ui 19rm -rf ui
20 20
21zip -r $DEST/reclaim-plugin.zip -FS * 21if test -d $DEST/build
22rm -rf $TEMPDIR 22then
23 rm -rf $DEST/build
24fi
25mv $TEMPDIR $DEST/build
23cd $DEST 26cd $DEST
diff --git a/bin/package_plugin b/bin/package_plugin
new file mode 100755
index 0000000..f846f5f
--- /dev/null
+++ b/bin/package_plugin
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3TEMPDIR=build
4DEST=$PWD
5
6cd $TEMPDIR
7
8TARGET=$1
9if test $1 != "firefox" -a $1 != "chrome"
10then
11echo "Unknown extension target. Use 'firefox' or 'chrome'"
12exit 1
13fi
14
15cp manifest-$TARGET.json manifest.json # Set manifest for browser
16zip -r $DEST/reclaim-plugin-$TARGET-$(git describe --tags).zip -FS *
17cd $DEST
diff --git a/manifest-chrome.json b/manifest-chrome.json
new file mode 100644
index 0000000..9896cff
--- /dev/null
+++ b/manifest-chrome.json
@@ -0,0 +1,40 @@
1{
2
3 "manifest_version": 2,
4 "name": "re:claimID",
5 "description": "An extension for use with re:claimID.",
6 "version": "0.13.0",
7
8 "browser_action": {
9 "default_icon": "icons/logo.png",
10 "theme_icons": [{
11 "light": "icons/logo_dark.png",
12 "dark": "icons/logo.png",
13 "size": 32
14 }],
15 "default_title": "re:claimID",
16 "default_popup": "popup/popup.html"
17 },
18
19 "icons": {
20 "48": "icons/logo48.png",
21 "96": "icons/logo96.png"
22 },
23
24 "background": {
25 "scripts": [
26 "background/reclaim.js",
27 "scripts/gnunet.js"
28 ]
29 },
30
31 "permissions": ["storage", "https://api.reclaim/*", "https://ui.reclaim/*", "http://localhost:7776/*",
32 "webRequest", "webRequestBlocking"],
33 "web_accessible_resources": ["*/**", "index.html", "*.js", "assets/*", "*.woff*", "*.ttf", "*.svg"],
34
35 "options_ui": {
36 "page": "index.html",
37 "open_in_tab": true,
38 "chrome_style": true
39 }
40}
diff --git a/manifest.json b/manifest-firefox.json
index ff07a58..da98670 100644
--- a/manifest.json
+++ b/manifest-firefox.json
@@ -3,7 +3,7 @@
3 "manifest_version": 2, 3 "manifest_version": 2,
4 "name": "re:claimID", 4 "name": "re:claimID",
5 "description": "An extension for use with re:claimID.", 5 "description": "An extension for use with re:claimID.",
6 "version": "0.3.0", 6 "version": "0.13.0",
7 7
8 "applications": { 8 "applications": {
9 "gecko": { 9 "gecko": {
diff --git a/ui b/ui
Subproject 7c39f4d7980edda8fdfa65f0304153d6205791d Subproject 8f771fe65b5fa62b9533d54a20044067f1086ff