forked from stuartlangridge/gnome-shell-clock-override
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (52 loc) · 1.65 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
NAME=Clock Override
DISTNAME=clock-override
VERSION=12
PREFIX=$(HOME)/.local/share/gnome-shell/extensions/
distfiles=metadata.json convenience.js extension.js formatter.js prefs.js LICENSE \
$(wildcard schemas/*.gschema.xml) schemas/gschemas.compiled \
locale/de/LC_MESSAGES/clock-override.mo \
locale/es/LC_MESSAGES/clock-override.mo \
locale/fr/LC_MESSAGES/clock-override.mo \
locale/nb/LC_MESSAGES/clock-override.mo \
locale/pt/LC_MESSAGES/clock-override.mo
.PHONY: all
all: build
.PHONY: build
build: locale/clock-override.pot $(distfiles)
locale/clock-override.pot: prefs.js
xgettext --from-code=UTF-8 -k_ -kN_ -o $@ $?
%.mo: %.po
msgfmt $? -o $@
%.po: locale/clock-override.pot
msgmerge -U $@ $?
@touch $@
metadata.json: metadata.json.in Makefile
cp $< $@
sed -i -e 's:%_NAME_%:$(NAME):g' $@
sed -i -e 's:%_UUID_%:$(UUID):g' $@
sed -i -e 's:%_VERSION_%:$(VERSION):g' $@
schemas/gschemas.compiled: $(wildcard schemas/*.gschema.xml)
glib-compile-schemas --strict schemas/
.PHONY: clean
clean:
-rm metadata.json
-rm locale/*/LC_MESSAGES/clock-override.mo
-rm schemas/*.compiled
${DISTNAME}.zip: $(distfiles)
zip "${DISTNAME}.zip" -r9 ${distfiles}
.PHONY: dist
dist: ${DISTNAME}.zip
.PHONY: distclean
distclean:
-rm "${DISTNAME}.zip"
.PHONY: install
install: dist
-mkdir -p $(PREFIX)/$(UUID)
-rm -rf $(PREFIX)/$(UUID)/*
cp "${DISTNAME}.zip" $(PREFIX)/$(UUID)
cd $(PREFIX)/$(UUID) && unzip -o "${DISTNAME}.zip" && rm "${DISTNAME}.zip"
-gnome-shell-extension-tool --reload-extension="$(UUID)"
.PHONY: test
test:
jasmine --config test/terse.json