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
|
#!/usr/bin/make -f
DEB_PYTHON_SYSTEM := pysupport
DEB_PYTHON_MODULE_PACKAGE = python-django
DEB_DH_COMPRESS_ARGS = -X.js
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
build/python-django::
# Build HTML documentation, drop copy of source files
cd docs && make html
rm -rf docs/_build/html/_sources/
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
# Remove execute rights from stuff that shouldn't have them
chmod 644 debian/python-django/etc/bash_completion.d/django_bash_completion
# 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
# Remove convenience copy of libjs-jquery and replace with symlink
cd debian/python-django/usr/share/doc/python-django/html/_static\
&& rm -f jquery.js\
&& ln -s ../../../../javascript/jquery/jquery.js .
clean::
rm -rf docs/_build/*
|