-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
44 lines (36 loc) · 1.11 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
43
44
EXTENSION_NAME = word-clock
NAME = Word Clock
VERSION = 11
URL = https://github.com/ebassi/word-clock-extension
UUID = $(EXTENSION_NAME)@emmanuelebassi.name
SED = `which sed`
ZIP = `which zip`
install_data = metadata.json extension.js
metadata.json: metadata.json.in Makefile
@$(SED) \
-e "s|@NAME@|$(NAME)|" \
-e "s|@UUID@|$(UUID)|" \
-e "s|@VERSION@|$(VERSION)|" \
-e "s|@URL@|$(URL)|" \
< $< > $@
install: $(install_data)
@if test -z $$XDG_DATA_HOME; then \
EXTENSIONS_HOME=$$HOME/.local/share/gnome-shell/extensions ; \
else \
EXTENSIONS_HOME=$$XDG_DATA_HOME/gnome-shell/extensions ; \
fi ; \
mkdir -p $$EXTENSIONS_HOME/$(UUID) && \
cp -f $(install_data) $$EXTENSIONS_HOME/$(UUID)/
uninstall:
@if test -z $$XDG_DATA_HOME; then \
EXTENSIONS_HOME=$$HOME/.local/share/gnome-shell-extensions ; \
else \
EXTENSIONS_HOME=$$XDG_DATA_HOME/gnome-shell/extensions ; \
fi ; \
rm -rf $$EXTENSIONS_HOME/$(UUID)
all: $(install_data)
release: clean $(install_data)
$(ZIP) -j $(EXTENSION_NAME)-$(VERSION).zip $(install_data)
clean:
@rm -f metadata.json
@rm -f $(EXTENSION_NAME)-$(VERSION).zip