-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
40 lines (32 loc) · 1.07 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
GETTEXT_PACKAGE = searchrecentlyused
PACKAGE_NAME = gnome-shell-extension-$(GETTEXT_PACKAGE)
PACKAGE_VERSION = 13
EXTENSION_UUID = $(GETTEXT_PACKAGE)@bmh1980de.gmail.com
DATADIR ?= /usr/share
ifeq ($(shell id -u),0)
EXTENSIONDIR = $(DATADIR)/gnome-shell/extensions/$(EXTENSION_UUID)
else
EXTENSIONDIR = $(HOME)/.local/share/gnome-shell/extensions/$(EXTENSION_UUID)
endif
all:
@echo "dist : create a source archive"
@echo "extension : create an extension archive"
@echo "install : install the extension"
clean:
rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)
dist:
set -e; \
mkdir $(PACKAGE_NAME)-$(PACKAGE_VERSION); \
cp -ra extension.js metadata.json Makefile \
$(PACKAGE_NAME)-$(PACKAGE_VERSION); \
if [ -d .git ]; then \
git log > $(PACKAGE_NAME)-$(PACKAGE_VERSION)/ChangeLog; \
fi; \
tar -c --xz -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.xz \
$(PACKAGE_NAME)-$(PACKAGE_VERSION)
extension:
zip $(EXTENSION_UUID).zip extension.js metadata.json
install:
set -e; \
mkdir -p $(DESTDIR)$(EXTENSIONDIR); \
cp -a extension.js metadata.json $(DESTDIR)$(EXTENSIONDIR)