2015-02-01 05:13:19 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
./autogen.sh
|
|
|
|
|
2015-09-09 14:13:05 +02:00
|
|
|
if [ "x$ARCH" = "xnative" ]; then
|
2015-09-11 15:03:56 +02:00
|
|
|
# test autotools
|
2015-03-19 01:12:42 +01:00
|
|
|
./configure
|
2015-09-17 12:05:53 +02:00
|
|
|
make -j 4 distcheck
|
2015-09-11 15:03:56 +02:00
|
|
|
|
|
|
|
# make distribution
|
|
|
|
make dist
|
|
|
|
tar zxvf libressl-*.tar.gz
|
|
|
|
cd libressl-*
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
# test cmake and ninja
|
2015-09-09 14:13:05 +02:00
|
|
|
if [ `uname` = "Darwin" ]; then
|
2015-09-11 15:03:56 +02:00
|
|
|
cmake ..
|
|
|
|
make
|
2015-09-17 12:48:09 +02:00
|
|
|
make test
|
2015-02-01 05:35:52 +01:00
|
|
|
else
|
2015-09-11 15:03:56 +02:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y python-software-properties
|
|
|
|
sudo apt-add-repository -y ppa:kalakris/cmake
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y cmake ninja-build
|
|
|
|
cmake -GNinja ..
|
|
|
|
ninja
|
2015-09-17 12:05:53 +02:00
|
|
|
ninja test
|
2015-02-01 05:35:52 +01:00
|
|
|
fi
|
2015-02-01 05:13:19 +01:00
|
|
|
else
|
2015-02-01 05:35:52 +01:00
|
|
|
CPU=i686
|
2015-09-09 14:13:05 +02:00
|
|
|
if [ "x$ARCH" = "xmingw64" ]; then
|
2015-02-01 05:35:52 +01:00
|
|
|
CPU=x86_64
|
|
|
|
fi
|
|
|
|
export CC=$CPU-w64-mingw32-gcc
|
2015-02-01 05:13:19 +01:00
|
|
|
|
2015-09-09 14:45:54 +02:00
|
|
|
if [ -z $(which $CC) ]; then
|
2015-02-01 05:13:19 +01:00
|
|
|
# Update Ubuntu 12.04 with current mingw toolchain
|
2015-09-09 14:45:54 +02:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y python-software-properties
|
2015-02-01 05:24:31 +01:00
|
|
|
sudo apt-add-repository -y ppa:tobydox/mingw-x-precise
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y $ARCH-x-gcc make
|
2015-02-01 05:13:19 +01:00
|
|
|
export PATH=$PATH:/opt/$ARCH/bin
|
|
|
|
fi
|
|
|
|
|
2015-03-19 01:12:42 +01:00
|
|
|
./configure --host=$CPU-w64-mingw32
|
2015-02-01 05:35:52 +01:00
|
|
|
make -j
|
2015-02-01 05:13:19 +01:00
|
|
|
fi
|