25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

42 satır
1.2 KiB

  1. #!/bin/bash
  2. # The script to build the Debian package, as ran inside the Docker image.
  3. set -ex
  4. DIST=`lsb_release -c -s`
  5. # We need to build a newer dh_virtualenv on older OSes like Xenial.
  6. if [ "$DIST" = 'xenial' ]; then
  7. mkdir -p /tmp/dhvenv
  8. cd /tmp/dhvenv
  9. wget https://github.com/spotify/dh-virtualenv/archive/1.1.tar.gz
  10. tar xvf 1.1.tar.gz
  11. cd dh-virtualenv-1.1/
  12. env DEBIAN_FRONTEND=noninteractive mk-build-deps -ri -t "apt-get -yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io"
  13. dpkg-buildpackage -us -uc -b
  14. cd /tmp/dhvenv
  15. apt-get install -yqq ./dh-virtualenv_1.1-1_all.deb
  16. fi
  17. # we get a read-only copy of the source: make a writeable copy
  18. cp -aT /synapse/source /synapse/build
  19. cd /synapse/build
  20. # add an entry to the changelog for this distribution
  21. dch -M -l "+$DIST" "build for $DIST"
  22. dch -M -r "" --force-distribution --distribution "$DIST"
  23. dpkg-buildpackage -us -uc
  24. ls -l ..
  25. # copy the build results out, setting perms if necessary
  26. shopt -s nullglob
  27. for i in ../*.deb ../*.dsc ../*.tar.xz ../*.changes ../*.buildinfo; do
  28. [ -z "$TARGET_USERID" ] || chown "$TARGET_USERID" "$i"
  29. [ -z "$TARGET_GROUPID" ] || chgrp "$TARGET_GROUPID" "$i"
  30. mv "$i" /debs
  31. done