debian swirl logo

Back to the packages list soya

#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

DEB_COMPRESS_EXCLUDE := .py
DEB_DESTDIR = $(CURDIR)/debian/$(cdbs_curpkg)/

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

# Debug package
build/python-soya-dbg::
		set -e; \
		for i in $(cdbs_python_build_versions); do \
		  python$$i-dbg ./setup.py build; \
		done

install/python-soya-dbg::
		set -e; \
		for i in $(cdbs_python_build_versions); do \
		  python$$i-dbg ./setup.py install --root $(CURDIR)/debian/$(cdbs_curpkg); \
		done
		find debian/$(cdbs_curpkg) \
		        ! -type d ! -name '*_d.so' | xargs rm -f
		find debian/$(cdbs_curpkg) -depth -empty -exec rmdir {} \;

clean/python-soya-dbg:
		for i in $(cdbs_python_build_versions); do \
		  python$$i-dbg ./setup.py clean -a; \
		done

install/python-soya::
	# fix unnecessary versionned shebang
		sed -i 's/^#! *\/usr\/bin\/python[0-9.]\+/#! \/usr\/bin\/python/' debian/$(cdbs_curpkg)/usr/bin/*
	# move data to usr/share
		mv debian/$(cdbs_curpkg)/usr/lib/python$(cdbs_python_current_version)/*-packages/soya/data/* \
			debian/$(cdbs_curpkg)/usr/share/$(cdbs_curpkg)
		rm -rf debian/$(cdbs_curpkg)/usr/lib/python*/*-packages/soya/data
	# avoid font duplication
		rm debian/$(cdbs_curpkg)/usr/share/python-soya/FreeSans.ttf
		dh_link -p$(cdbs_curpkg) usr/share/fonts/truetype/freefont/FreeSans.ttf \
			usr/share/python-soya/FreeSans.ttf
	# remove unneeded execute bit
		find debian/$(cdbs_curpkg)/usr/share/ -type f -exec chmod -R a-x {} \;

clean::
		rm -f debian/pycompat
		rm -f _soya.c
		rm -rf build

Builds:

python-soya-dbg
high level 3d engine for python - debug extension
python-soya
high level 3d engine for python