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
|
#!/usr/bin/make -f
ifeq ($(shell dpkg-vendor --is Ubuntu && echo yes),yes)
export EXTENSION_UUID=tiling-assistant@ubuntu.com
else
export EXTENSION_UUID=tiling-assistant@leleat-on-github
endif
%:
dh $@
execute_before_dh_auto_build:
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
mkdir -p $(EXTENSION_UUID)
jq -r '.uuid = "$(EXTENSION_UUID)" '\
'| .name = "Ubuntu Tiling Assistant" '\
'| .url = "https://launchpad.net/ubuntu/+source/gnome-shell-extension-tiling-assistant"' \
tiling-assistant@leleat-on-github/metadata.json > \
$(EXTENSION_UUID)/metadata.json
endif
./update-locale.sh
override_dh_install:
set -e; for x in $(EXTENSION_UUID)/locale/*; do \
install -d debian/tmp/usr/share/locale/$$(basename $$x)/LC_MESSAGES; \
install -m644 $$x/LC_MESSAGES/*.mo debian/tmp/usr/share/locale/$$(basename $$x)/LC_MESSAGES; \
done
dh_install
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
extension_path=debian/gnome-shell-extension-ubuntu-tiling-assistant/usr/share/gnome-shell/extensions; \
cp $(EXTENSION_UUID)/metadata.json \
$$extension_path/$(EXTENSION_UUID)/metadata.json
endif
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
execute_after_dh_clean:
rm -rf $(EXTENSION_UUID)
endif
override_dh_translations:
mv translations/main.pot translations/main.pot.in
dh_translations --domain=${EXTENSION_UUID}
mv translations/main.pot.in translations/main.pot
override_dh_gnome_clean:
override_dh_gencontrol:
dh_gencontrol -- \
-Vgnome:MinimumVersion=$(shell python3 -c "import json; print(min(int(x) for x in json.load(open('${EXTENSION_UUID}/metadata.json', 'rt'))['shell-version']))") \
-Vgnome:MaximumVersion=$(shell python3 -c "import json; print(1+max(int(x) for x in json.load(open('${EXTENSION_UUID}/metadata.json', 'rt'))['shell-version']))")
|