123456789101112131415161718192021222324 |
- #!/bin/bash
- [% c("var/set_default_env") -%]
- [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
- distdir=/var/tmp/dist/[% project %]
- mkdir -p /var/tmp/build
- tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
- cd /var/tmp/build/[% project %]-[% c('version') %]
- [% IF c("var/osname") == "linux-i686" -%]
- export CC='gcc -m32'
- [% END %]
- [% IF c("var/osx") -%]
- # Tricking OpenSSL into using our clang as cross-compiler
- ln -s $clangdir/bin/clang $clangdir/bin/x86_64-apple-darwin11-cc
- export CC="cc [% c("var/FLAGS") %]"
- [% END -%]
- ./Configure --prefix=$distdir [% c('var/configure_opts') %]
- make
- make install
- cd /var/tmp/dist
- [% c('tar', {
- tar_src => [ project ],
- tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
- }) %]
|