-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.am
53 lines (44 loc) · 1.47 KB
/
Makefile.am
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
SUBDIRS = po
EXT_NAME = Text Scaler
EXT_ID = $(PACKAGE_NAME)
EXT_VERSION = $(PACKAGE_VERSION)
EXT_URL = https://github.com/mariospr/text-scaler-gnome-shell-extension
EXT_UUID = $(EXT_ID)@gnome-shell-extensions.mariospr.org
topextensiondir = $(datadir)/gnome-shell/extensions
extensiondir = $(topextensiondir)/$(EXT_UUID)
dist_extension_DATA = extension.js
nodist_extension_DATA = metadata.json
metadata.json: metadata.json.in Makefile
@sed \
-e "s|@NAME@|$(EXT_NAME)|" \
-e "s|@UUID@|$(EXT_UUID)|" \
-e "s|[@]VERSION@|$(EXT_VERSION)|" \
-e "s|@URL@|$(EXT_URL)|" \
-e "s|[@]GETTEXT_DOMAIN@|$(GETTEXT_PACKAGE)|" \
< $< > $@
zip-file: all
-rm -fR $(builddir)/_build
$(MKDIR_P) $(builddir)/_build; \
$(MAKE) install DESTDIR="$(abs_builddir)/_build"; \
mv "$(builddir)/_build$(topextensiondir)/$(EXT_UUID)" "$(builddir)/_build/"; \
cp -r "$(builddir)/_build$(datadir)/locale" "$(builddir)/_build/$(EXT_UUID)"; \
(cd "$(builddir)/_build/$(EXT_UUID)"; \
zip -qr "$(abs_builddir)/$(EXT_UUID).shell-extension.zip" .; \
);
-rm -fR $(builddir)/_build
localprefix = $(HOME)/.local/share/gnome-shell/extensions
local-install: zip-file
zip_file="$(abs_builddir)/$(EXT_UUID).shell-extension.zip"; \
if [ -d "$(localprefix)/$(EXT_UUID)" ]; then \
rm -fR "$(localprefix)/$(EXT_UUID)"; \
fi; \
$(MKDIR_P) $(localprefix)/$(EXT_UUID); \
(cd $(localprefix)/$(EXT_UUID); \
unzip -q $${zip_file}; \
);
EXTRA_DIST = \
metadata.json.in \
$(NULL)
CLEANFILES = \
metadata.json \
$(NULL)