summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..7064850
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,28 @@
+#!/usr/bin/make -f
+
+FIREFOX_ID := {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
+EXTENSION_ID := foxyproxy@eric.h.jung
+
+SHELL := sh -e
+
+%:
+ dh ${@}
+
+override_dh_auto_install:
+ mkdir -p debian/webext-foxyproxy/usr/share/webext
+ cp -a src debian/webext-foxyproxy/usr/share/webext/foxyproxy
+
+ # fonts-font-awesome
+ sed -i -e 's|styles/fontawesome-.*.css|styles/font-awesome.min.css|g' debian/webext-foxyproxy/usr/share/webext/foxyproxy/*.html
+
+execute_before_dh_link:
+ mkdir -p debian/webext-foxyproxy/usr/share/mozilla/extensions/${FIREFOX_ID}
+ ln -s /usr/share/webext/foxyproxy debian/webext-foxyproxy/usr/share/mozilla/extensions/${FIREFOX_ID}/${EXTENSION_ID}
+
+execute_after_dh_missing:
+ # fonts-font-awesome
+ @if grep -qs -r 'styles/fontawesome-.*.css' debian/webext-foxyproxy/usr/share/webext/foxyproxy; \
+ then \
+ echo "E: found remaining references to embedded fonts-font-awesome, aborting."; \
+ exit 1; \
+ fi