Package list sugar-etoys-activity / 2c310b7 debian / rules
2c310b7

Tree @2c310b7 (Download .tar.gz)

rules @2c310b7raw · history · blame

#!/usr/bin/make -f

include /usr/share/cdbs/1/class/python-sugar.mk
include /usr/share/cdbs/1/rules/debhelper.mk

pkg = $(DEB_SOURCE_PACKAGE)

# Avoid install icons (shipped with sugar-*-icon-theme)
install/$(pkg)::
	rm -rf $(cdbs_curdestdir)usr/share/icons

# Fix broken paths in desktop file
#  * TODO: drop when fixed in sugar-toolkit-gtk3
binary-fixup/$(pkg)::
	find $(cdbs_curdestdir)/usr/share -type f -name '*.desktop' \
		-execdir perl -pi -e 's,^\S+\s*=\s*\K\S*(?=/usr/share),,g' '{}' ';'

# Ensure proper hash-bang in Python script (Python Policy 0.9 ยง3.1)
binary-fixup/$(pkg)::
	perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/$(strip $(cdbs_curpythonruntime)),' \
		$(cdbs_curdestdir)/usr/share/sugar/activities/*/setup.py