build 1.0 KB

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. distdir=/var/tmp/dist/[% project %]
  4. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  5. mkdir -p /var/tmp/dist
  6. tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/elfutils') %]
  7. tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
  8. export PATH="/var/tmp/dist/binutils/bin:$PATH"
  9. tar -C /var/tmp/dist -xf $rootdir/[% project %]-[% c("version") %].tar.gz
  10. cd /var/tmp/dist
  11. mv [% project %]-[% c("version") %] [% project %]
  12. cd [% project %]
  13. scons -Q arch=[% c("var/selfrando_arch") %] LIBELF_PATH="/var/tmp/dist/elfutils" NO_MREMAP=1 FORCE_INPLACE=1 DEBUG_LEVEL=env WRITE_LAYOUTS=env LOG=console
  14. # Fix the path where we install selfrando
  15. sed -i 's|^SR_PATH=.*|SR_PATH=/var/tmp/dist/selfrando/out/[% c("var/selfrando_arch") %]/bin|' Tools/TorBrowser/tc-wrapper/ld
  16. cd /var/tmp/dist
  17. [% c('tar', {
  18. tar_src => [ project ],
  19. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  20. }) %]