No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

64 líneas
2.3 KiB

  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_installsystemd:
  8. dh_installsystemd --name=matrix-synapse
  9. # we don't really want to strip the symbols from our object files.
  10. override_dh_strip:
  11. # many libraries pulled from PyPI have allocatable sections after
  12. # non-allocatable ones on which dwz errors out. For those without the issue the
  13. # gains are only marginal
  14. override_dh_dwz:
  15. # dh_shlibdeps calls dpkg-shlibdeps, which finds all the binary files
  16. # (executables and shared libs) in the package, and looks for the shared
  17. # libraries that they depend on. It then adds a dependency on the package that
  18. # contains that library to the package.
  19. #
  20. # We make two modifications to that process...
  21. #
  22. override_dh_shlibdeps:
  23. # Firstly, postgres is not a hard dependency for us, so we want to make
  24. # the things that psycopg2 depends on (such as libpq) be
  25. # recommendations rather than hard dependencies. We do so by
  26. # running dpkg-shlibdeps manually on psycopg2's libs.
  27. #
  28. find debian/$(PACKAGE_NAME)/ -path '*/site-packages/psycopg2/*.so' | \
  29. xargs dpkg-shlibdeps -Tdebian/$(PACKAGE_NAME).substvars \
  30. -pshlibs1 -dRecommends
  31. # secondly, we exclude PIL's libraries from the process. They are known
  32. # to be self-contained, but they have interdependencies and
  33. # dpkg-shlibdeps doesn't know how to resolve them.
  34. #
  35. # As of Pillow 7.1.0, these libraries are in
  36. # site-packages/Pillow.libs. Previously, they were in
  37. # site-packages/PIL/.libs.
  38. #
  39. # (we also need to exclude psycopg2, of course, since we've already
  40. # dealt with that.)
  41. #
  42. dh_shlibdeps \
  43. -X site-packages/PIL/.libs \
  44. -X site-packages/Pillow.libs \
  45. -X site-packages/psycopg2
  46. override_dh_virtualenv:
  47. ./debian/build_virtualenv
  48. override_dh_builddeb:
  49. # force the compression to xzip, to stop dpkg-deb on impish defaulting to zstd
  50. # (which requires reprepro 5.3.0-1.3, which is currently only in 'experimental' in Debian:
  51. # https://metadata.ftp-master.debian.org/changelogs/main/r/reprepro/reprepro_5.3.0-1.3_changelog)
  52. dh_builddeb -- -Zxz
  53. %:
  54. dh $@ --with python-virtualenv