Codebase list sugar-read-activity / 67645a69-992b-417d-bf00-49d5754a0a2d/main debian / rules
67645a69-992b-417d-bf00-49d5754a0a2d/main

Tree @67645a69-992b-417d-bf00-49d5754a0a2d/main (Download .tar.gz)

rules @67645a69-992b-417d-bf00-49d5754a0a2d/mainraw · history · blame

#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

PKG = $(DEB_SOURCE)

export PYBUILD_SYSTEM = custom
export PYBUILD_INSTALL_ARGS = HOME=debian/fakehome \
 && mkdir --parents "$$HOME" \
 && /usr/bin/python3 setup.py install --destdir debian/tmp \
 && rm -rf "$$HOME"

# omit git hint files
# omit manually installed MIME files (registered system-wide instead)
%:
	dh $@ --with linktree --buildsystem=pybuild -X.git -X/usr/share/mime/

execute_after_dh_install:
# Fix favor ISO 639-1 when differing from ISO 639-2
	mv debian/$(PKG)/usr/share/locale/aym \
		debian/$(PKG)/usr/share/locale/ay
# Ensure proper hash-bang in Python script (Python Policy 0.9 ยง3.1)
	perl -pi -e 's,^#! ?(/usr/bin/)?(env )?python[[:print:]]*$$,#!/usr/bin/python3,' \
		debian/*/usr/share/sugar/activities/*/*.py