Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE=1
5
6 export PYBUILD_NAME=djangorestframework
7
8 %:
9 dh $@ --buildsystem=pybuild
10
11 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
12 execute_after_dh_auto_build:
13 # Build the HTML documentation.
14 mkdir $(CURDIR)/docs.debian
15 LC_ALL=C.UTF-8 PYTHONPATH=/usr/share/mkdocs/themes mkdocs build -v && mv site docs.debian/html
16 $(RM) docs.debian/html/404.html
17 $(RM) docs.debian/html/fonts/*
18 endif
19
20 execute_after_dh_python3:
21 # Don't embed what's already provided elsewhere
22 $(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/fonts/*
23 $(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/css/font-awesome*.css
24 $(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/css/bootstrap*.min.css
25 $(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/css/prettify*.css
26 $(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/js/bootstrap*.js
27 $(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/js/jquery*.js
28 $(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/js/prettify*.js
29
30 execute_after_dh_auto_clean:
31 rm -rf docs.debian
32 rm -rf .mypy_cache
33
34 override_dh_installchangelogs:
35 dh_installchangelogs docs/community/release-notes.md
36
37 override_dh_mkdocs:
38 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
39 dh_mkdocs
40 endif
41
42 override_dh_installdocs:
43 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
44 dh_installdocs -ppython-djangorestframework-doc --doc-main-package=python3-djangorestframework
45 dh_installdocs --remaining-packages
46 find debian/python-djangorestframework-doc/ -name '*.html' -exec sed -i \
47 -e '/https:\/\/fonts.googleapis.com\//d' \
48 -e '/https:\/\/fonts.gstatic.com/d' \
49 {} \;
50 endif