build 908 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. distdir=/var/tmp/dist/[% project %]
  4. [% IF c("var/linux") %]
  5. [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'),
  6. hardened_gcc => 0 }) %]
  7. [% END -%]
  8. [% IF c("var/linux") -%]
  9. [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
  10. [% END -%]
  11. mkdir /var/tmp/build
  12. tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
  13. cd /var/tmp/build/[% project %]-[% c('version') %]
  14. [% IF !c("var/linux") -%]
  15. # Starting with Debian Bullseye, /usr/bin/python does not exist, so
  16. # we need to use python3 explicitly
  17. sed -i 's/env python$/env python3/' configure.py
  18. [% END -%]
  19. ./configure.py --bootstrap
  20. mkdir -p $distdir
  21. cp ninja $distdir
  22. cd /var/tmp/dist
  23. [% c('tar', {
  24. tar_src => [ project ],
  25. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  26. }) %]