File: rules

package info (click to toggle)
renpy 7.1.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 107,352 kB
  • sloc: python: 42,124; ansic: 4,781; makefile: 43; sh: 14
file content (57 lines) | stat: -rwxr-xr-x 1,779 bytes parent folder | download
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
LDFLAGS2:=-Wl,-z,defs  -Wl,-as-needed -Wl,--no-undefined
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

RENPY_DEPS_INSTALL="/usr::/usr/lib/$(DEB_HOST_MULTIARCH)"

%:
	dh $@ --with python2,sphinxdoc

override_dh_install-indep:
	chmod +x renpy.py
	# Convert hicolor MacOS icons to png
	icns2png -x -s 128x128 -d 32 launcher/icon.icns
	mv icon_128x128x32.png renpy.png
	icns2png -x -s 128x128 -d 32 the_question/icon.icns
	mv icon_128x128x32.png renpy-thequestion.png
	dh_install

override_dh_auto_build:
	find */ -name "*.py" | while read F; do chmod --verbose 644 "$$F"; done
	export RENPY_DEPS_INSTALL=$(RENPY_DEPS_INSTALL) ; \
		CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
		LDFLAGS="$(LDFLAGS) $(LDFLAGS2)" \
		cd module && python$* setup.py build
	export http_proxy=127.0.0.1:9
	PYTHONPATH=. sphinx-build -N -bhtml sphinx/source/ build/html # HTML generator

override_dh_auto_install:
	export RENPY_DEPS_INSTALL=$(RENPY_DEPS_INSTALL) ; \
		cd module && python$* setup.py install \
			--no-compile \
			--root=$(CURDIR)/debian/python-renpy \
			;

override_dh_compress:
	dh_compress --exclude=.js --exclude=.pdf --exclude=.py --exclude=.txt

override_dh_clean:
	dh_clean
	rm -fv `find . -name "*.pyc"`
	rm -fv `find . -name "*.so"`
	rm -fv `find . -name "*.o"`
	rm -rf module/build/
	rm -fv module/gen/*
	$(RM) renpy.png renpy-thequestion.png

get-orig-source:
	uscan --download-current-version --force-download --repack --compression xz