build 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. distdir="/var/tmp/dist/[% project %]"
  4. [% IF c("var/windows") -%]
  5. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  6. [% ELSE -%]
  7. [% c("var/set_PTDIR_DOCSDIR") -%]
  8. mkdir -p $PTDIR
  9. [% END -%]
  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. # Let's pretend we have the setup dependency already as we don't want to get
  14. # it downloaded during building. Just pretending and thus avoiding another
  15. # dependency should be fine here as txsocksx catches the exception due to
  16. # missing __version__ and __sha__ .
  17. mkdir vcversioner-1.14.1.1-py2.7.egg
  18. [% IF c("var/windows") -%]
  19. pydir="$distdir/python"
  20. mkdir -p $pydir/Lib/site-packages
  21. export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
  22. $PYTHON setup.py install_lib --install-dir=$(wine winepath -w "$pydir/Lib/site-packages")
  23. [% ELSE -%]
  24. export PYTHON=python2
  25. $PYTHON setup.py build --build-lib build
  26. cp -a build/txsocksx $PTDIR/
  27. [% END -%]
  28. cd $distdir
  29. [% c('tar', {
  30. tar_src => [ '.' ],
  31. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  32. }) %]