File: rules

package info (click to toggle)
cherrypy3 3.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,940 kB
  • sloc: python: 21,736; makefile: 26; sh: 6
file content (37 lines) | stat: -rwxr-xr-x 1,183 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export PYBUILD_DESTDIR_python2=debian/python-cherrypy3/
export PYBUILD_DESTDIR_python3=debian/python3-cherrypy3/
export PYBUILD_BEFORE_TEST=cp cherrypy/cherryd {build_dir}/cherrypy

include /usr/share/dpkg/default.mk

%:
	dh $@ --buildsystem pybuild --with python2,python3

override_dh_clean:
	-rm -rf api
	-rm -rf CherryPy.egg-info/
	-rm -f debian/cherryd.1
	dh_clean

override_dh_auto_build:
	chmod +x cherrypy/cherryd
	PYTHONPATH=. help2man -n cherryd -s 1 -o debian/cherryd.1 --version-string=$(DEB_VERSION_UPSTREAM)  ./cherrypy/cherryd
	chmod -x cherrypy/cherryd
	env PYTHONPATH=`pwd` epydoc --name CherryPy3 --url http://www.cherrypy.org/ -o api cherrypy
	dh_auto_build --buildsystem pybuild

#Testsuite hangs and wasn't run before
override_dh_auto_test:

override_dh_install:
	find debian/python*-cherrypy3/ -name LICENSE.txt -exec rm {} \;
	dh_install
	# Make python 2&3 cherrypy3 co-installable
	mv debian/python-cherrypy3/usr/bin/cherryd debian/python-cherrypy3/usr/sbin
	mkdir -p debian/python3-cherrypy3/usr/sbin/
	mv debian/python3-cherrypy3/usr/bin/cherryd debian/python3-cherrypy3/usr/sbin/cherryd3

override_dh_compress:
	dh_compress -X.py -X.pdf