Package list sugar-etoys-activity / 0f31231
simplify build; build-depend on dh-sequence-python3 (not cdbs dh-python) Jonas Smedegaard 5 months ago
4 changed file(s) with 20 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
22 Priority: optional
33 Maintainer: Debian Sugar Team <pkg-sugar-devel@lists.alioth.debian.org>
44 Uploaders: Jonas Smedegaard <dr@jones.dk>,
5 Build-Depends: cdbs,
5 Build-Depends:
66 debhelper,
7 dh-python,
7 dh-sequence-python3,
88 python3,
99 python3-sugar3,
1010 unzip
0 usr/share
00 #!/usr/bin/make -f
11
2 include /usr/share/cdbs/1/class/python-sugar.mk
3 include /usr/share/cdbs/1/rules/debhelper.mk
2 include /usr/share/dpkg/pkg-info.mk
43
5 pkg = $(DEB_SOURCE_PACKAGE)
4 PKG = $(DEB_SOURCE)
65
7 # Avoid install icons (shipped with sugar-*-icon-theme)
8 install/$(pkg)::
9 rm -rf $(cdbs_curdestdir)usr/share/icons
6 export PYBUILD_SYSTEM = custom
7 export PYBUILD_INSTALL_ARGS = HOME=debian/fakehome \
8 && mkdir --parents "$$HOME" \
9 && /usr/bin/python3 setup.py install --destdir debian/tmp \
10 && rm -rf "$$HOME"
1011
12 # omit git hint files
13 # omit icons (shipped with sugar-*-icon-theme)
14 %:
15 dh $@ --buildsystem=pybuild -X.git -Xusr/share/icons
16
17 execute_after_dh_install:
1118 # Fix broken paths in desktop file
1219 # * TODO: drop when fixed in sugar-toolkit-gtk3
13 binary-fixup/$(pkg)::
14 find $(cdbs_curdestdir)/usr/share -type f -name '*.desktop' \
20 find debian/*/usr/share -type f -name '*.desktop' \
1521 -execdir perl -pi -e 's,^\S+\s*=\s*\K\S*(?=/usr/share),,g' '{}' ';'
16
1722 # Ensure proper hash-bang in Python script (Python Policy 0.9 ยง3.1)
18 binary-fixup/$(pkg)::
19 perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/$(strip $(cdbs_curpythonruntime)),' \
20 $(cdbs_curdestdir)/usr/share/sugar/activities/*/setup.py
23 perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/python3,' \
24 debian/*/usr/share/sugar/activities/*/setup.py