| 1 |
#!/usr/bin/make -f
|
| 2 |
|
| 3 |
DEB_PYTHON_SYSTEM := pysupport
|
| 4 |
DEB_PYTHON_MODULE_PACKAGE = python-django
|
| 5 |
DEB_DH_COMPRESS_ARGS = -X.js
|
| 6 |
|
| 7 |
include /usr/share/cdbs/1/rules/buildcore.mk
|
| 8 |
include /usr/share/cdbs/1/rules/debhelper.mk
|
| 9 |
include /usr/share/cdbs/1/class/python-distutils.mk
|
| 10 |
include /usr/share/cdbs/1/rules/simple-patchsys.mk
|
| 11 |
|
| 12 |
binary-post-install/python-django::
|
| 13 |
# Use default python shebang
|
| 14 |
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
|
| 15 |
# Ensure executability of some scripts that are copied to projects
|
| 16 |
# (or used within projects)
|
| 17 |
chmod 755 debian/python-django/usr/share/python-support/python-django/django/conf/project_template/manage.py
|
| 18 |
chmod 755 debian/python-django/usr/share/python-support/python-django/django/bin/[^_]*.py
|
| 19 |
chmod 755 debian/python-django/usr/share/python-support/python-django/django/bin/profiling/[^_]*.py
|
| 20 |
# Create convenience symlink
|
| 21 |
mkdir -p debian/python-django/usr/lib/python-django
|
| 22 |
dh_link usr/share/python-support/python-django/django/bin usr/lib/python-django/bin
|
| 23 |
# Rename django-admin.py to django-admin
|
| 24 |
mv debian/python-django/usr/bin/django-admin.py debian/python-django/usr/bin/django-admin
|
| 25 |
|
| 26 |
build/python-django-doc::
|
| 27 |
# Build HTML documentation.
|
| 28 |
cd docs && make html
|
| 29 |
cd docs && make latex
|
| 30 |
cd docs/_build/latex && make all-pdf
|
| 31 |
# Something in that code forces pdf output so we have to
|
| 32 |
# get our postscript from pdf:
|
| 33 |
cd docs/_build/latex && pdf2ps django.pdf
|
| 34 |
|
| 35 |
clean::
|
| 36 |
rm -rf docs/_build/*
|
| 37 |
|
| 38 |
|
| 39 |
binary-post-install/python-django-doc::
|
| 40 |
# Remove convenience copy of libjs-jquery and replace with symlink.
|
| 41 |
cd debian/python-django-doc/usr/share/doc/python-django-doc/html/_static\
|
| 42 |
&& rm -f jquery.js\
|
| 43 |
&& ln -s ../../../../javascript/jquery/jquery.js .
|