File: rules

package info (click to toggle)
django-restricted-resource 2016.8-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 216 kB
  • ctags: 218
  • sloc: python: 695; makefile: 19; sh: 7
file content (29 lines) | stat: -rwxr-xr-x 1,097 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
#!/usr/bin/make -f

%:
	dh $@ --with python2,python3

.PHONY: override_dh_auto_test
override_dh_auto_test:
	# Run the bundled tests (in-memory database) when building the package
	LC_ALL=C python ./django_restricted_resource/test_project/manage.py test
	LC_ALL=C python3 ./django_restricted_resource/test_project/manage.py test

override_dh_auto_install:
	dh_auto_install
	python setup.py install --root=$(CURDIR)/debian/python-django-restricted-resource/ --install-layout=deb
	python3 setup.py install --root=$(CURDIR)/debian/python3-django-restricted-resource/ --install-layout=deb

override_dh_auto_clean:
	dh_auto_clean
	$(RM) django_restricted_resource/__init__.pyc
	# Cleanup versiontools leftovers
	$(RM) -r setup.cfg django_restricted_resource.egg-info/

# get upstream version for get-orig-source target
VERSION:= $(shell dpkg-parsechangelog | grep '^Version: ' | sed -e 's/^Version: //' | sed -e 's/\-.*$$//')

sdist-orig:
	python setup.py sdist
	mv -v dist/django-restricted-resource-$(VERSION)*.tar.gz ../django-restricted-resource_$(VERSION).orig.tar.gz
	$(RM) -r versiontools-*.egg/