File: Makefile

package info (click to toggle)
gnome-shell-extension-gamemode 4-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 296 kB
  • sloc: sh: 63; python: 43; makefile: 34; xml: 25
file content (29 lines) | stat: -rw-r--r-- 712 bytes parent folder | download
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

SRCDIR := $(shell dirname "$0")
ABSSRC := $(shell realpath "$(SRCDIR)")
TMPDIR := $(shell mktemp -p "$(SRCDIR)" -d _install.XXXXXX)

UUID := gamemode@christian.kellner.me
VERSION := $(shell git describe 2> /dev/null || git rev-parse --short HEAD)

SOURCES := extension.js client.js
OTHER := LICENSE README.md
GEN := metadata.json

metadata.json: metadata.json.in
	@echo "SED $<"
	@sed 's/@VERSION@/$(VERSION)/; s/@UUID@/$(UUID)/;' $< > $@

.PHONY: zip
zip: $(SOURCES) $(GEN) $(OTHER)
	@echo "COPY $^ $(TMPDIR)"
	@cp $^ "$(TMPDIR)"/
	@echo "ZIP"
	@cd "$(TMPDIR)" ; \
	zip -rmq "$(ABSSRC)/$(UUID).shell-extension.zip" .
	@echo "RM"
	@rm -rf "$(TMPDIR)"

.PHONY: clean
clean:
	rm -rf metadata.json _install* *.zip