-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
85 lines (69 loc) · 2.22 KB
/
Makefile
File metadata and controls
85 lines (69 loc) · 2.22 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
PREFIX = /usr/local
DESTDIR =
HOME-DESTDIR = $(HOME)/.local/share/gnome-shell/extensions/$(UUID)
UUID = typescript-template@swsnr.de
DIST-EXTRA-SRC = LICENSE-GPL2 LICENSE-MPL2
BLUEPRINTS = $(addprefix ui/,about.blp)
UIDEFS = $(addsuffix .ui,$(basename $(BLUEPRINTS)))
.PHONY: dist
dist: compile
mkdir -p ./dist/
mkdir -p ./build/ui
cp -t ./build/ui $(UIDEFS)
gnome-extensions pack --force --out-dir dist build \
--extra-source=../metadata.json \
--extra-source=ui \
$(addprefix --extra-source=,$(wildcard src/*)) \
$(addprefix --extra-source=../,$(DIST-EXTRA-SRC)) \
$(addprefix --schema=../,$(wildcard schemas/*.gschema.xml))
# Make a reproducible dist package
.PHONY: dist-repro
dist-repro: dist
strip-nondeterminism dist/$(UUID).shell-extension.zip
# Install to local home directory; this simply unpacks the zip file as GNOME would do
.PHONY: install-home
install-home: dist
mkdir -p $(HOME-DESTDIR)
bsdtar -xf dist/$(UUID).shell-extension.zip -C $(HOME-DESTDIR) --no-same-owner
.PHONY: uninstall-home
uninstall-home:
rm -rf $(HOME-DESTDIR)
# Install system wide, moving various parts to appropriate system directories
.PHONY: install-system
install-system: dist
install -d \
$(DESTDIR)/$(PREFIX)/share/gnome-shell/extensions/$(UUID) \
$(DESTDIR)/$(PREFIX)/share/glib-2.0/schemas
bsdtar -xf dist/$(UUID).shell-extension.zip \
-C $(DESTDIR)/$(PREFIX)/share/gnome-shell/extensions/$(UUID) --no-same-owner
mv $(DESTDIR)/$(PREFIX)/share/gnome-shell/extensions/$(UUID)/schemas/*.gschema.xml \
$(DESTDIR)/$(PREFIX)/share/glib-2.0/schemas
rm -rf $(DESTDIR)/$(PREFIX)/share/gnome-shell/extensions/$(UUID)/schemas
.PHONY: uninstall-system
uninstall-system:
rm -rf \
$(DESTDIR)/$(PREFIX)/share/gnome-shell/extensions/$(UUID) \
$(DESTDIR)/$(PREFIX)/share/glib-2.0/schemas/org.gnome.shell.extensions.typescript-template.gschema.xml
.PHONY: compile
compile: $(UIDEFS)
npm run compile
.PHONY: clean
clean:
rm -rf ./dist/ ./build/
.PHONY: generate
generate:
npm run generate:gir-types
.PHONY: format
format:
npm run format -- --write
.PHONY: lint
lint:
npm run lint
.PHONY: check
check: lint
npm run format -- --check
.PHONY: fix
fix: format
npm run lint -- --fix
$(UIDEFS): %.ui: %.blp
blueprint-compiler compile --output $@ $<