1
0

rules 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/make -f
  2. #
  3. # Build Debian package using https://github.com/spotify/dh-virtualenv
  4. #
  5. # assume we only have one package
  6. PACKAGE_NAME:=`dh_listpackages`
  7. override_dh_systemd_enable:
  8. dh_systemd_enable --name=matrix-synapse
  9. override_dh_installinit:
  10. dh_installinit --name=matrix-synapse
  11. # we don't really want to strip the symbols from our object files.
  12. override_dh_strip:
  13. override_dh_shlibdeps:
  14. # make the postgres package's dependencies a recommendation
  15. # rather than a hard dependency.
  16. find debian/$(PACKAGE_NAME)/ -path '*/site-packages/psycopg2/*.so' | \
  17. xargs dpkg-shlibdeps -Tdebian/$(PACKAGE_NAME).substvars \
  18. -pshlibs1 -dRecommends
  19. # all the other dependencies can be normal 'Depends' requirements,
  20. # except for PIL's, which is self-contained and which confuses
  21. # dpkg-shlibdeps.
  22. dh_shlibdeps -X site-packages/PIL/.libs -X site-packages/psycopg2
  23. override_dh_virtualenv:
  24. ./debian/build_virtualenv
  25. # We are restricted to compat level 9 (because xenial), so have to
  26. # enable the systemd bits manually.
  27. %:
  28. dh $@ --with python-virtualenv --with systemd