-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (37 loc) · 1.18 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
45
46
47
48
49
NAME = $(shell cat ./metadata.json | jq -j '.name')
UUID = $(shell cat ./metadata.json | jq -j '.uuid')
VERSION = $(shell cat ./metadata.json | jq -j '.version')
builddir := build
js_files := $(wildcard *.js)
schema_files := $(wildcard schemas/*.xml)
translation_files := $(js_files) $(schema_files)
sources := LICENSE-MIT LICENSE-GPL2 preferences-standalone $(js_files) $(schema_files)
output := $(builddir)/$(UUID).zip
schemas/gschemas.compiled: $(schema_files)
glib-compile-schemas schemas/
po/titlebar-screenshot.pot: $(translation_files)
xgettext --from-code=UTF-8 --output=po/example.pot $(translation_files)
$(output): $(sources)
mkdir -p $(builddir)
gnome-extensions pack \
--force \
$(addprefix --extra-source=,$(sources)) \
--podir=./po/ \
--gettext-domain=$(UUID) \
--out-dir=$(builddir) \
.
.PHONY: test-settings
test-settings:
gjs /usr/share/gnome-shell/org.gnome.Shell.Extensions & \
gnome-extensions prefs $(UUID)
.PHONY: clean
clean:
-rm -rf $(builddir)
.PHONY: build
build: $(output)
.PHONY: install
install: uninstall
gnome-extensions install --force ./build/$(UUID).shell-extension.zip
.PHONY: uninstall
uninstall:
-gnome-extensions uninstall $(UUID)