rules 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/make -f
  2. NAME=distro-tracker
  3. %:
  4. dh $@ --with python2,sphinxdoc,systemd --buildsystem=pybuild
  5. override_dh_auto_build:
  6. dh_auto_build
  7. $(MAKE) -C docs html
  8. override_dh_auto_install:
  9. dh_auto_install
  10. install -m 755 -D manage.py debian/$(NAME)/usr/bin/distro-tracker
  11. # Move settings in /etc/
  12. for dir in `find debian/tmp/ -type d -wholename '*/distro_tracker/project/settings'`; do \
  13. if [ ! -e debian/tmp/etc/$(NAME)/settings ]; then \
  14. mkdir -p debian/tmp/etc/$(NAME)/; \
  15. mv $$dir debian/tmp/etc/$(NAME)/; \
  16. else \
  17. rm -rf $$dir; \
  18. fi; \
  19. ln -sf /etc/$(NAME)/settings $$dir; \
  20. done
  21. # Replace selected.py with a symlink to production setttings
  22. ln -sf production.py debian/tmp/etc/$(NAME)/settings/selected.py
  23. # Clean up .pyc files
  24. rm -f debian/tmp/etc/$(NAME)/settings/*.pyc
  25. override_dh_auto_test:
  26. ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
  27. ./manage.py test django_email_accounts/ distro_tracker/
  28. endif
  29. override_dh_systemd_enable:
  30. dh_systemd_enable --name=distro-tracker-mail