build 1.0 KB

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  4. distdir=/var/tmp/dist/[% project %]
  5. mkdir -p /var/tmp/build
  6. tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
  7. cd /var/tmp/build/[% project %]-[% c('version') %]
  8. [% IF c("var/osx") -%]
  9. # Setting this after `configure` but before `make` might be enough, but let's
  10. # not bet on that and just set it here.
  11. export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]
  12. [% END -%]
  13. ./autogen.sh
  14. ./configure [% c("var/configure_opt") %] --disable-libevent-regress --disable-samples --prefix=$distdir
  15. [% IF c("var/osx") -%]
  16. export LD_PRELOAD=[% c("var/faketime_path") %]
  17. export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
  18. [% END -%]
  19. make -j[% c("buildconf/num_procs") %]
  20. make install
  21. cd /var/tmp/dist
  22. [% c('tar', {
  23. tar_src => [ project ],
  24. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  25. }) %]