summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 25745b815fe5bbdb6076172ce898076f40503a1f (plain)
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
#!/usr/bin/make -f

%:
	dh ${@}

execute_before_dh_auto_clean:
	# hibernate-status
	$(MAKE) -C hibernate-status clean

override_dh_auto_build:
	# multi-monitors-add-on
	cd multi-monitors-add-on && \
	for TRANSLATION in $(EXTENSION)/locale/* ; do \
		msgfmt -cv -o $${TRANSLATION}/LC_MESSAGES/multi-monitors-add-on.mo \
		              $${TRANSLATION}/LC_MESSAGES/multi-monitors-add-on.po; \
	done

	glib-compile-schemas --strict --targetdir=$(EXTENSION)/schemas/ $(EXTENSION)/schemas

override_dh_auto_install:
	mkdir -p debian/gnome-shell-extensions-extra/usr/share/gnome-shell/extensions

	# disable-workspace-switcher
	UUID=$(shell awk -F\" '/"uuid": / { print $$4 }' disable-workspace-switcher/*/metadata.json)
	cp -a disable-workspace-switcher debian/gnome-shell-extensions-extra/usr/share/gnome-shell/extensions/$${UUID}

	# hibernate-status
	UUID=$(shell awk -F\" '/"uuid": / { print $$4 }' hibernate-status/metadata.json)
	$(NAME) -C hibernate-status DESTDIR=$(CURDIR)/debian/gnome-shell-extensions-extra install

	rm -f debian/gnome-shell-extensions-extra/usr/share/gnome-shell/extensions/$${UUID}/LICENSE
	rm -f debian/gnome-shell-extensions-extra/usr/share/gnome-shell/extensions/$${UUID}/README.md

	# multi-monitors-add-on
	UUID=$(shell awk -F\" '/"uuid": / { print $$4 }' multi-monitors-add-on/*/metadata.json)
	cp -a multi-monitors-add-on/$${UUID} debian/gnome-shell-extensions-extra/usr/share/gnome-shell/extensions/$${UUID}