-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (36 loc) · 1.31 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This is based on Textern’s Makefile (https://github.com/jlebon/textern)
ifneq ($(USER),1)
PREFIX ?= /usr/local
MOZILLA_PREFIX ?= /usr
LIBDIR ?= /usr/lib64
MOZILLA_NATIVE ?= $(LIBDIR)/mozilla/native-messaging-hosts
else
PREFIX ?= $(HOME)/.local
MOZILLA_NATIVE ?= $(HOME)/.mozilla/native-messaging-hosts
endif
LIBEXEC ?= $(PREFIX)/libexec
.PHONY: all
all:
@echo "No build step. Available targets:"
@echo "native-install install native app"
@echo "native-uninstall uninstall native app"
@echo "xpi create XPI webex archive"
@echo
@echo "Set USER=1 to target user directories instead."
# make phony and don't depend on .in file in case $USER changes
.PHONY: shellfox.sh.json
shellfox.sh.json:
sed -e 's|@@NATIVE_PATH@@|$(LIBEXEC)/shellfox/shellfox.sh|' [email protected] > $@
.PHONY: native-install
native-install: shellfox.sh.json
mkdir -p $(DESTDIR)$(MOZILLA_NATIVE)
cp -f shellfox.sh.json $(DESTDIR)$(MOZILLA_NATIVE)/shellfox.json
mkdir -p $(DESTDIR)$(LIBEXEC)/shellfox
cp -rf shellfox.sh $(DESTDIR)$(LIBEXEC)/shellfox
.PHONY: native-uninstall
native-uninstall:
rm -f $(DESTDIR)$(MOZILLA_NATIVE)/shellfox.json
rm -rf $(DESTDIR)$(LIBEXEC)/shellfox
.PHONY: xpi
xpi:
@rm -f shellfox.xpi && zip -r shellfox.xpi background.js manifest.json _locales html img/shellfox*.png img/shellfox.svg