build 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. [% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %]
  4. distdir=/var/tmp/dist/[% project %]
  5. [% c("var/set_PTDIR_DOCSDIR") -%]
  6. mkdir -p $PTDIR $DOCSDIR
  7. tar -C /var/tmp/dist -xf [% c('input_files_by_name/goptlib') %]
  8. mkdir -p /var/tmp/build
  9. tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
  10. cd /var/tmp/build/[% project %]-[% c('version') %]
  11. cd meek-client
  12. go build -ldflags '-s'
  13. cp -a meek-client[% IF c("var/windows") %].exe[% END %] $PTDIR
  14. cd ../meek-client-torbrowser
  15. go build -ldflags '-s'
  16. cp -a meek-client-torbrowser[% IF c("var/windows") %].exe[% END %] $PTDIR
  17. [% IF c("var/windows") %]
  18. cd ../terminateprocess-buffer
  19. go build -ldflags '-s'
  20. cp -a terminateprocess-buffer.exe $PTDIR
  21. [% END %]
  22. cd ..
  23. cp -a README doc/*.1[% IF c("var/windows") %].txt[% END %] $DOCSDIR
  24. cd firefox
  25. [% c('zip', {
  26. zip_src => [ '.' ],
  27. zip_args => '$distdir/meek-http-helper@bamsoftware.com.xpi',
  28. }) %]
  29. cd $distdir
  30. [% c('tar', {
  31. tar_src => [ '.' ],
  32. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  33. }) %]