| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME = gunicorn |
| 4 |
export PYBUILD_AFTER_TEST=rm -f {build_dir}/coverage.xml |
| 5 |
# |
| 6 |
# Skip signal test if not run by autopkgtest. |
| 7 |
ifeq ($(origin PYBUILD_AUTOPKGTEST),undefined) |
| 8 |
export PYBUILD_TEST_ARGS=--ignore=tests/test_signal_integration.py --ignore=tests/test_control_socket_integration.py |
| 9 |
endif |
| 10 |
|
| 11 |
%: |
| 12 |
dh $@ --buildsystem=pybuild |
| 13 |
|
| 14 |
execute_after_dh_auto_install: |
| 15 |
mkdir -p $(CURDIR)/debian/gunicorn/usr/bin |
| 16 |
mv $(CURDIR)/debian/python3-gunicorn/usr/bin/gunicorn* $(CURDIR)/debian/gunicorn/usr/bin |
| 17 |
|
| 18 |
override_dh_installexamples: |
| 19 |
dh_installexamples |
| 20 |
find \ |
| 21 |
$(CURDIR)/debian/gunicorn-examples/usr/share/doc/gunicorn-examples/examples \ |
| 22 |
-type f \ |
| 23 |
-executable \ |
| 24 |
-print0 | xargs -0r chmod -x |
| 25 |
|
| 26 |
override_dh_mkdocs: |
| 27 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 28 |
PYTHONPATH=$$(pybuild --print build_dir --name gunicorn -p $$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') | awk -F ': ' 'NR==1{print $$2}') mkdocs build -d $(CURDIR)/debian/python-gunicorn-doc/usr/share/doc/python-gunicorn-doc/html |
| 29 |
endif |
| 30 |
dh_mkdocs --theme-package mkdocs-material |
| 31 |
|
| 32 |
execute_before_dh_installman: |
| 33 |
PYTHONPATH=$$(pybuild --print build_dir --name gunicorn -p $$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') | awk -F ': ' 'NR==1{print $$2}') help2man --no-discard-stderr -n "HTTP/WSGI/ASGI server" $(CURDIR)/debian/gunicorn/usr/bin/gunicorn >gunicorn.1 |
| 34 |
PYTHONPATH=$$(pybuild --print build_dir --name gunicorn -p $$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') | awk -F ': ' 'NR==1{print $$2}') help2man --no-discard-stderr -n "gunicorn control client" $(CURDIR)/debian/gunicorn/usr/bin/gunicornc >gunicornc.1 |