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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
#!/usr/bin/make -f
DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export ORIGLIBDIRS := /lib:/lib/$(DEB_HOST_MULTIARCH)
export DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | \
sed -rne 's,^Version: ([^+]+).*,\1,p')
PYVERS=$(shell pyversions -r debian/control)
# We include all the documentation except:
# util (which is for building the docs from the source)
# fullinstall.txt (which is installation instructions)
# LGPL (which is in /usr/share/common-licenses/LGPL-2.1 under Debian)
doclist = $(filter-out docs/util docs/fullinstall.txt docs/LGPL,$(wildcard docs/*))
%:
dh $@ --with python2
override_dh_clean:
rm -f *.pyc Setup
rm -rf build
dh_clean
override_dh_auto_install:
dh_auto_install
# Generate correctly versioned numpy dependencies (#698169)
dh_numpy
override_dh_auto_test:
ifeq "$(filter nocheck,$(DEB_BUILD_OPTIONS))" ""
# buildds don't provide graphical interfaces or audio/video devices
# to test with, hence some tests won't work properly without:
SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk \
python run_tests.py --exclude opengl,display || true
endif
override_dh_installdocs:
dh_installdocs -a $(doclist)
override_dh_installchangelogs:
dh_installchangelogs -a WHATSNEW
override_dh_link:
# Replace embedded font with system copy
set -e; for python in $(PYVERS); \
do ln -sf /usr/share/fonts/truetype/freefont/FreeSansBold.ttf \
$(CURDIR)/debian/python-pygame/usr/lib/$$python/dist-packages/pygame/freesansbold.ttf; \
done
dh_link -a
get-orig-source:
# Remove existing pygame directory and tarball, if existing
rm -rf pygame-$(DEB_UPSTREAM_VERSION)
rm -f pygame_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.gz
# Fetch latest upstream tarball
uscan --noconf --force-download --download-current-version \
--destdir=.
# Unpack and remove tarball
tar -xzf pygame-$(DEB_UPSTREAM_VERSION).tar.gz
rm -f pygame-$(DEB_UPSTREAM_VERSION).tar.gz
# Remove embedded freesansbold.ttf copy; it comes without the FontForge
# source file (.sfd), so it's technically a GPL violation
rm -f pygame-$(DEB_UPSTREAM_VERSION)/lib/freesansbold.ttf
# Repack tarball
tar -czf pygame_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.gz pygame-\
$(DEB_UPSTREAM_VERSION)/
|