File: rules

package info (click to toggle)
renpy 6.6.2.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 8,740 kB
  • ctags: 3,407
  • sloc: python: 22,153; ansic: 3,724; makefile: 138; lisp: 128; sh: 14
file content (186 lines) | stat: -rwxr-xr-x 5,957 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	$(MAKE) -f /usr/share/quilt/quilt.make patch
	chmod 644 `find */ -name "*.py"`
	touch configure-stamp

build: build-stamp
build-stamp: configure-stamp 
	dh_testdir
	cd module; python setup.py build
	#docbook-to-man debian/renpy.sgml > renpy.1
	touch build-stamp

clean: configure
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	cd module; python setup.py clean
	rm -rf module/build/
	$(MAKE) -f /usr/share/quilt/quilt.make unpatch
	dh_clean 

install-indep:
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# common/ - A directory containing common script files that help Ren'Py work.
	dh_install -prenpy common/* usr/share/games/renpy/common/

	rm -f $(CURDIR)/debian/renpy/usr/share/games/renpy/common/DejaVuSans.*
	dh_link -prenpy /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf \
		usr/share/games/renpy/common/DejaVuSans.ttf

	# renpy/ - Contains the python source code for Ren'Py.
	dh_install -prenpy  renpy/* usr/share/games/renpy/renpy/
	# data/ - Contains the data for the launcher.
	dh_install -prenpy  data/* usr/share/games/renpy/data/
	# Scripts that give additional features.
	dh_install -prenpy  template/* usr/share/games/renpy/template/

	dh_install -prenpy-demo demo/* usr/share/games/renpy/demo/
	chmod +x debian/renpy-demo.sh
	dh_install -prenpy-demo debian/renpy-demo.sh usr/share/games/renpy/

	dh_install -prenpy-thequestion the_question/* usr/share/games/renpy/the_question/
	chmod +x debian/renpy-the_question.sh
	dh_install -prenpy-thequestion debian/renpy-the_question.sh usr/share/games/renpy/

	dh_install -prenpy  renpy.py usr/share/games/renpy/
	dh_link -prenpy  usr/share/games/renpy/renpy.py usr/games/renpy
	dh_link -prenpy-demo usr/share/games/renpy/renpy-demo.sh usr/games/renpy-demo
	dh_link -prenpy-thequestion usr/share/games/renpy/renpy-the_question.sh usr/games/the_question

	dh_install -prenpy debian/renpy.xpm usr/share/pixmaps
	dh_install -prenpy debian/renpy.desktop usr/share/applications
	dh_install -prenpy-demo debian/renpy-demo.xpm usr/share/pixmaps
	dh_install -prenpy-demo debian/renpy-demo.desktop usr/share/applications
	dh_install -prenpy-thequestion debian/renpy-thequestion.xpm usr/share/pixmaps
	dh_install -prenpy-thequestion debian/renpy-thequestion.desktop usr/share/applications

	dh_install -prenpy-doc doc/* usr/share/doc/renpy/html

install-arch:
	# module/ - Contains the source code for the _renpy module.
	cd module; python setup.py install --root=$(CURDIR)/debian/python-renpy


install: install-arch install-indep

# Build architecture-independent files here.
binary-indep: install-indep
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGELOG.txt -i
	dh_installdocs -i
	dh_installexamples -i
	dh_installmenu -i
	dh_installman -prenpy debian/renpy.6
	dh_installman -prenpy-demo debian/renpy-demo.6
	dh_installman -prenpy-thequestion debian/the_question.6
	#dh_installdirs -prenpy usr/share/lintian/overrides/
	#dh_install -prenpy debian/overrides/renpy usr/share/lintian/overrides/
	dh_compress -i
	dh_fixperms -i
	dh_pysupport -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install-arch
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGELOG.txt -a
	dh_installdocs -a
	dh_installexamples -a
	dh_desktop -prenpy 
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_pysupport -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

# Dynamic upstream renpy version detection
#
# RENPY_VERSION = $(shell uscan --dehs --report-status | \ 
# 	grep upstream-version | sed 's/<.*>\(.*\)<.*>/\1/g')
#
# Dynamic current renpy version detection
#
# RENPY_VERSION = $(shell head -1 debian/changelog | \
# 	sed 's/.*(\(.*\)\.ds.*/\1/')
#
# Static renpy version assignment
RENPY_VERSION = 6.6.2
DEBIAN_VERSION = $(RENPY_VERSION).dfsg1

get-orig-source:
	dh_testdir
	dh_testroot
	rm -rf "renpy-$(RENPY_VERSION)"
	echo "Downloading Ren'Py..."
	test -e "renpy-$(RENPY_VERSION)-full.tar.bz2" || \
		wget "http://www.renpy.org/dl/$(RENPY_VERSION)/renpy-$(RENPY_VERSION)-full.tar.bz2"
	tar xvfj "renpy-$(RENPY_VERSION)-full.tar.bz2"
	rm -f "renpy-$(RENPY_VERSION)-full.tar.bz2"
	rm -f "renpy_$(DEBIAN_VERSION).orig.tar.gz"
	cd "renpy-$(RENPY_VERSION)"; \
		rm -rf `find . -name "*.dll"` ; \
		rm -rf `find . -name "*.exe"` ; \
		rm -rf `find . -name "*.rpyc"` ; \
		rm -rf editor lib renpy.app renpy.code
	tar cvfz "renpy_$(DEBIAN_VERSION).orig.tar.gz" "renpy-$(RENPY_VERSION)"
	rm -rf "renpy-$(RENPY_VERSION)"
	mv "renpy_$(DEBIAN_VERSION).orig.tar.gz" ..

get-doc:
	dh_testdir
	dh_testroot
	mkdir tmp-doc
	cd tmp-doc && \
		wget --page-requisites --recursive --no-parent --convert-links --html-extension \
			--no-host-directories \
			--cut-dirs=3 --execute robots=off \
			--include-directories='/wiki/renpy/doc,/w' \
			http://www.renpy.org/wiki/renpy/doc/reference \
			http://www.renpy.org/wiki/renpy/doc/tutorials \
			http://www.renpy.org/wiki/renpy/Features \
			http://www.renpy.org/wiki/renpy/License
	cd tmp-doc && \
		find . -name "*.html" | while read f; do \
			cp "$$f" tmp1.html ; \
			awk '/<!-- start content -->/,/<!-- Saved in parser cache/' tmp1.html \
				| grep -v '<!-- start content -->' \
				| grep -v '<!-- Saved in parser cache' \
				| grep -v 'http://www.renpy.org/wiki/renpy/Home_Page?action=AttachFile&amp;do=get&amp;target=launcher.png' \
				> tmp2.html ; \
			sed --regexp-extended 's,<span class="editsection">\[.*\] *</span>,,g' \
				tmp2.html >tmp3.html ; \
			tidy tmp3.html > "$$f" ; \
			rm -f tmp* ; \
		done

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install-indep install-arch install configure get-doc get-orig-source