aboutsummaryrefslogtreecommitdiff
path: root/yomichan/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'yomichan/makefile')
-rw-r--r--yomichan/makefile15
1 files changed, 6 insertions, 9 deletions
diff --git a/yomichan/makefile b/yomichan/makefile
index f8bc4a5..488ff61 100644
--- a/yomichan/makefile
+++ b/yomichan/makefile
@@ -4,6 +4,8 @@ download: yomichan
backup: download
patch: backup
+YOMITAN_VERSION = 24.4.16.0
+
# template rules in this file do not have explicit dependencies, this is to
# allow dependencies regardless of subdirectory. the dependencies are commented
# out instead for readability
@@ -11,7 +13,7 @@ patch: backup
include ../common.mk
yomichan-chrome.zip:
- curl https://github.com/FooSoft/yomichan/releases/latest/download/$@ -Lso- > $@
+ curl https://github.com/themoeway/yomitan/releases/download/$(YOMITAN_VERSION)/yomitan-chrome.zip -Lso- > $@
yomichan/images/%.svg: # %.svg
cp $< $@
@@ -36,7 +38,7 @@ yomichan: yomichan-chrome.zip
info.html.diff: info.html.diff.m4
-# .diff patches
+# patches
backup: yomichan/search.html.bak
yomichan/search.html.patched: search.html.diff
backup: yomichan/settings.html.bak
@@ -45,19 +47,14 @@ backup: yomichan/info.html.bak
yomichan/info.html.patched: info.html.diff
backup: yomichan/css/action-popup.css.bak
yomichan/css/action-popup.css.patched: action-popup.css.diff
-
-# updated extension manifest (allow userscript loading)
backup: yomichan/manifest.json.bak
-yomichan/manifest.json.patched: yomichan/manifest.json.bak
- jq '.content_scripts[0].js[.content_scripts[0].js | length] |= .+ "js/userscript-loader.js"' $< |\
- jq '.content_security_policy |= .+ "'"; script-src 'self' 'unsafe-eval'"'"' |\
- jq '.content_security_policy |= sub("img-src";"img-src data:")' > $@
+yomichan/manifest.json.patched: manifest.json.diff
+
# userscript loader files
yomichan/js/userscript-loader.js: userscript-loader.js
yomichan/images/script.svg: script.svg
yomichan/css/userscript-settings.css: userscript-settings.css
-
# install userscript loader
patch: yomichan/js/userscript-loader.js
patch: yomichan/images/script.svg