File: rules

package info (click to toggle)
python-gitlab 1%3A1.6.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 892 kB
  • sloc: python: 5,400; sh: 201; makefile: 164
file content (31 lines) | stat: -rwxr-xr-x 902 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
#!/usr/bin/make -f

export PYBUILD_NAME=gitlab
export DH_VERBOSE=1

# define DEB_VERSION
include /usr/share/dpkg/default.mk

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='http://127.0.0.1:9/' python3 -m sphinx -N -E -bhtml docs build/html
	PYTHONPATH=. http_proxy='http://127.0.0.1:9/' python3 -m sphinx -N -E -bman docs build/man
	rm -rf ./build/html/.doctrees

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	dh_sphinxdoc -ppython-gitlab-doc
endif

override_dh_auto_install:
	dh_auto_install
	# Remove the script from the Python 2 package and move it to gitlab-cli
	rm debian/python-gitlab/usr/bin/gitlab
	mkdir -p debian/gitlab-cli/usr/bin
	mv debian/python3-gitlab/usr/bin/gitlab debian/gitlab-cli/usr/bin/python-gitlab

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog.rst