Skip to content

Commit 9f748e3

Browse files
committed
provide system-wide install script
1 parent b6da048 commit 9f748e3

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
REPO := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
3+
4+
USER_INSTALL := $(if($(XDG_DATA_HOME),$(XDG_DATA_HOME),$(HOME)/.local/share)/gnome-shell/extensions
5+
SYSTEM_INSTALL := $(DESTDIR)/usr/share/gnome-shell/extensions
6+
7+
EXTFILES := \
8+
metadata.json \
9+
stylesheet.css \
10+
*.js \
11+
config/user.js \
12+
config/user.css \
13+
*.ui \
14+
LICENSE \
15+
resources/*
16+
SCHEMAS := schemas/*.gschema.xml
17+
18+
schemas/gschemas.compiled: $(SCHEMAS)
19+
cd schemas && glib-compile-schemas .
20+
21+
userinstall:
22+
mkdir -p "$(USER_INSTALL)"
23+
ln -snf "$(REPO)" "$(USER_INSTALL)/$(UUID)"
24+
25+
install: $(EXTFILES) $(SCHEMAS)
26+
for f in $(EXTFILES); do \
27+
install -D -p -m 0644 $$f "$(SYSTEM_INSTALL)/$(UUID)/$$f"; \
28+
done
29+
install -d "$(DESTDIR)/usr/share/glib-2.0/schemas"
30+
install -p -m 0644 $(SCHEMAS) "$(DESTDIR)/usr/share/glib-2.0/schemas/"
31+
32+
$(UUID).zip: $(EXTFILES) schemas/gschemas.compiled
33+
# Creates a zip of (only) the necessary files required by Gnome for the
34+
# PaperWM extension.
35+
# Designed for submitting a zip to extensions.gnome.org.
36+
zip -r $@ $^
37+
38+
extzip: $(UUID).zip
39+
40+
.PHONY: userinstall install extzip

generate-extension-zip.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

schemas/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)