build 1.0 KB

123456789101112131415161718192021222324252627
  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. patch -p1 < $rootdir/autotools-openssl-mac.patch
  10. # Setting this after `configure` but before `make` might be enough, but let's
  11. # not bet on that and just set it here.
  12. export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]
  13. [% END -%]
  14. ./autogen.sh
  15. ./configure --disable-static [% c("var/configure_opt") %] --prefix=$distdir
  16. [% IF c("var/osx") -%]
  17. export LD_PRELOAD=[% c("var/faketime_path") %]
  18. export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
  19. [% END -%]
  20. make -j[% c("buildconf/num_procs") %]
  21. make install
  22. cd /var/tmp/dist
  23. [% c('tar', {
  24. tar_src => [ project ],
  25. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  26. }) %]