-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 1.1 KB
/
Makefile
File metadata and controls
39 lines (30 loc) · 1.1 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
UUID = github-tray@debba.github.com
INSTALL_DIR = $(HOME)/.local/share/gnome-shell/extensions/$(UUID)
SCHEMAS_DIR = schemas
LOCALE_DIR = locale
all: build
build: translations
translations:
@for po in po/*.po; do \
lang=$$(basename $$po .po); \
mkdir -p $(LOCALE_DIR)/$$lang/LC_MESSAGES; \
msgfmt -o $(LOCALE_DIR)/$$lang/LC_MESSAGES/github-tray.mo $$po; \
done
JS_FILES = extension.js githubApi.js ui.js utils.js prefs.js \
notificationManager.js workflowManager.js refreshManager.js changeDetector.js
install: build
mkdir -p $(INSTALL_DIR)
cp -r $(JS_FILES) metadata.json stylesheet.css $(SCHEMAS_DIR) ui $(INSTALL_DIR)
@if [ -d $(LOCALE_DIR) ]; then cp -r $(LOCALE_DIR) $(INSTALL_DIR); fi
@echo "Extension installed in $(INSTALL_DIR)"
@echo "Restart GNOME Shell to see changes."
uninstall:
rm -rf $(INSTALL_DIR)
pack: build
@rm -f $(UUID).zip
zip -r $(UUID).zip $(JS_FILES) metadata.json stylesheet.css $(SCHEMAS_DIR) ui $(LOCALE_DIR)
@echo "Package created: $(UUID).zip"
clean:
rm -rf $(LOCALE_DIR)
rm -f $(UUID).zip
.PHONY: all build schemas translations install uninstall pack clean