/[python-modules]/packages/python-django/trunk/debian/rules
ViewVC logotype

Contents of /packages/python-django/trunk/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14443 - (hide annotations) (download)
Sat Sep 18 06:28:45 2010 UTC (2 years, 8 months ago) by hertzog
File size: 1970 byte(s)
New upstream version prepared by Krzysztof Klimonda
1 brettp-guest 1388 #!/usr/bin/make -f
2    
3 lamby 8496 include /usr/share/python/python.mk
4 brettp-guest 1388
5 lamby 7816 PREFIX = debian/python-django
6 lamby 8496 DJANGO_DIR = $(PREFIX)/$(call py_libdir_sh,`pyversions -d`)/django
7 brettp-guest 1388
8 lamby 7816 %:
9 lamby 9319 dh --with quilt $@
10 lamby 7816
11 lamby 9320 override_dh_auto_clean:
12 hertzog 14443 rm -rf docs.debian tests/__init__.py
13 lamby 12992 find -name "*.DS_Store" -delete
14 lamby 9320 dh_auto_clean
15 lamby 7816
16     override_dh_auto_build:
17     dh_auto_build
18 lamby 7968
19     # Build the HTML documentation.
20     # We programmatically replace most instances of django-admin.py with
21     # django-admin and remove the source files from the target _build.
22     cp -r docs docs.debian
23     find docs.debian -type f -print0 | xargs -0r perl -pi -e 's|(?<!/)(django-admin)\.py|$$1|'
24     make -C docs.debian html
25     rm -rf docs.debian/_build/html/_sources/
26 netzwurm 6401
27 hertzog 14443 override_dh_auto_test:
28     touch tests/__init__.py
29     LC_ALL=en_US.utf8 PYTHONPATH=. tests/runtests.py --settings=tests.test_sqlite --verbosity=2
30 lamby 9321
31 lamby 7816 override_dh_install:
32     dh_install
33    
34     # Use default shebang
35     perl -pi -e 's|^#!/usr/bin/env python.*|#!/usr/bin/python|' $(DJANGO_DIR)/conf/project_template/manage.py
36 lamby 8020 chmod +x $(DJANGO_DIR)/conf/project_template/manage.py
37 lamby 7816
38     # Move scripts to /usr/lib/python-django
39     mkdir -p $(PREFIX)/usr/lib/python-django
40     mv $(DJANGO_DIR)/bin $(PREFIX)/usr/lib/python-django
41    
42     # Fix permissions
43     chmod 644 $(PREFIX)/etc/bash_completion.d/django_bash_completion
44     find $(PREFIX)/usr/lib/python-django/bin/ -name '*.py' -not -name '__init__.py' -print0 | xargs -0r chmod 755
45    
46 brettp-guest 1686 # Rename django-admin.py to django-admin
47 lamby 7816 mv $(PREFIX)/usr/bin/django-admin.py $(PREFIX)/usr/bin/django-admin
48 lamby 12992
49     # Remove embedded Javascript libraries
50     for FILENAME in jquery.js jquery.min.js; do \
51     find $(PREFIX) -name $$FILENAME -exec \
52     ln -sf /usr/share/javascript/jquery/$$FILENAME {} \;; \
53     done
54 lamby 7843
55     override_dh_installdocs:
56     dh_installdocs
57 lamby 7816 # Remove embedded copy of libjs-jquery
58 lamby 7843 cd debian/python-django-doc/usr/share/doc/python-django-doc/html/_static \
59 lamby 7816 && rm jquery.js \
60 netzwurm 6401 && ln -s ../../../../javascript/jquery/jquery.js .
61 netzwurm 6382
62 lamby 7816 override_dh_compress:
63     dh_compress -X.js

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5