File: rules

package info (click to toggle)
djangorestframework 3.16.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,092 kB
  • sloc: javascript: 31,965; python: 29,367; makefile: 32; sh: 6
file content (46 lines) | stat: -rwxr-xr-x 1,859 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
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1

export PYBUILD_NAME=djangorestframework

%:
	dh $@ --buildsystem=pybuild

ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	# Build the HTML documentation.
	mkdir $(CURDIR)/docs.debian
	LC_ALL=C.UTF-8 PYTHONPATH=/usr/share/mkdocs/themes mkdocs build -v && mv site docs.debian/html
	$(RM) docs.debian/html/404.html
	$(RM) docs.debian/html/fonts/*
endif

execute_after_dh_python3:
	# Don't embed what's already provided elsewhere
	$(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/fonts/*
	$(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/css/font-awesome*.css
	$(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/css/bootstrap*.min.css
	$(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/css/prettify*.css
	$(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/js/bootstrap*.js
	$(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/js/jquery*.js
	$(RM) debian/python3-djangorestframework/usr/lib/python3/dist-packages/rest_framework/static/rest_framework/js/prettify*.js

execute_after_dh_auto_clean:
	rm -rf docs.debian
	rm -rf .mypy_cache

override_dh_installchangelogs:
	dh_installchangelogs docs/community/release-notes.md

override_dh_mkdocs:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	dh_mkdocs
endif

override_dh_installdocs:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	dh_installdocs -ppython-djangorestframework-doc --doc-main-package=python3-djangorestframework
	dh_installdocs --remaining-packages
endif