build 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. distdir="/var/tmp/dist/[% project %]"
  4. [% c("var/set_PTDIR_DOCSDIR") -%]
  5. mkdir -p $PTDIR $DOCSDIR
  6. [% IF c("var/windows") -%]
  7. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  8. [% END -%]
  9. tar -C $distdir -xf $rootdir/[% c('input_files_by_name/libfte') %]
  10. mkdir -p /var/tmp/build
  11. tar -C /var/tmp/build -xf $rootdir/[% project %]-[% c('version') %].tar.gz
  12. cd /var/tmp/build/[% project %]-[% c('version') %]
  13. [% IF c("var/windows") -%]
  14. pydir="$distdir/python"
  15. export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
  16. $PYTHON setup_tbb.py py2exe
  17. py2exe_zip_timestomp dist/fteproxy.zip
  18. cp -an dist/{*.pyd,*.exe,*.zip} $PTDIR/
  19. mkdir -p $PTDIR/fteproxy
  20. cp -a fteproxy/VERSION $PTDIR/fteproxy
  21. mkdir -p $PTDIR/fteproxy/defs
  22. cp -a fteproxy/defs/*.json $PTDIR/fteproxy/defs
  23. rm -Rf $pydir
  24. [% ELSE -%]
  25. cp -a bin/fteproxy $PTDIR/fteproxy.bin
  26. cp -ra fteproxy $PTDIR/
  27. [% END -%]
  28. cp -a {COPYING,README.md} $DOCSDIR/
  29. cd $distdir
  30. [% c('tar', {
  31. tar_src => [ '.' ],
  32. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  33. }) %]