build 1023 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. [% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %]
  4. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  5. tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
  6. export PATH="/var/tmp/dist/binutils/bin:$PATH"
  7. export CGO_ENABLED=1
  8. distdir=/var/tmp/dist/[% project %]
  9. mkdir -p $distdir
  10. [% FOREACH dep = c("var/go_lib_deps") -%]
  11. tar -C /var/tmp/dist -xf [% c('input_files_by_name/' _ dep) %]
  12. [% END -%]
  13. mkdir -p $GOPATH/src/github.com/namecoin
  14. tar -C $GOPATH/src/github.com/namecoin -xf [% project %]-[% c('version') %].tar.gz
  15. mv $GOPATH/src/github.com/namecoin/ncdns-[% c('version') %] $GOPATH/src/github.com/namecoin/ncdns
  16. TAGS="-tags no_namecoin_tls"
  17. [% FOREACH inst IN c("var/go_lib_install") %]
  18. go install $TAGS -ldflags '-s' [% inst %]
  19. [% END %]
  20. cd /var/tmp/dist
  21. [% c('tar', {
  22. tar_src => [ 'gopath' ],
  23. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  24. }) %]