File: rules

package info (click to toggle)
python-django 0.95.1-1etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 6,344 kB
  • ctags: 3,919
  • sloc: python: 24,083; makefile: 14; sql: 6
file content (24 lines) | stat: -rwxr-xr-x 1,243 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
#!/usr/bin/make -f

DEB_PYTHON_SYSTEM := pysupport

include /usr/share/cdbs/1/rules/buildcore.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

DEB_PYTHON_INSTALL_ARGS_ALL += --single-version-externally-managed

binary-post-install/python-django::
	# Use default python shebang
	perl -pi -e 's|^#!/usr/bin/env python.*$$|#!/usr/bin/python|' debian/python-django/usr/share/python-support/python-django/django/conf/project_template/manage.py
	# Ensure executability of some scripts that are copied to projects
	# (or used within projects)
	chmod 755 debian/python-django/usr/share/python-support/python-django/django/conf/project_template/manage.py
	chmod 755 debian/python-django/usr/share/python-support/python-django/django/bin/[^_]*.py
	chmod 755 debian/python-django/usr/share/python-support/python-django/django/bin/profiling/[^_]*.py
	# Create convenience symlink
	mkdir -p debian/python-django/usr/lib/python-django
	dh_link usr/share/python-support/python-django/django/bin usr/lib/python-django/bin 
	# Rename django-admin.py to django-admin
	mv debian/python-django/usr/bin/django-admin.py debian/python-django/usr/bin/django-admin