2008-06-20 21:34:53 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2009-02-15 22:52:19 +08:00
|
|
|
#exec 2>&1
|
2008-06-20 21:34:53 +08:00
|
|
|
|
2009-02-15 22:52:19 +08:00
|
|
|
BUILDDIR=/tmp/aria2buildtest
|
2008-06-20 21:34:53 +08:00
|
|
|
|
2009-02-15 22:52:19 +08:00
|
|
|
if [ ! -d "$BUILDDIR" ]; then
|
|
|
|
mkdir "$BUILDDIR" \
|
2021-08-21 21:03:42 +08:00
|
|
|
|| { echo "Failed to create directory $BUILDDIR" && exit 1; }
|
2008-06-20 21:34:53 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n "Starting build test "
|
2021-08-21 21:03:42 +08:00
|
|
|
echo "$(date)"
|
2008-06-20 21:34:53 +08:00
|
|
|
|
|
|
|
# build CONFIGURE_OPTS BIN_SUFFIX DESC
|
|
|
|
build()
|
|
|
|
{
|
|
|
|
echo -n "new build() started at "
|
2021-08-21 21:03:42 +08:00
|
|
|
echo "$(date)"
|
2008-06-20 21:34:53 +08:00
|
|
|
echo "*** configure opts=$1"
|
2008-07-23 00:10:31 +08:00
|
|
|
BIN_NAME="aria2c_$2"
|
2009-02-15 22:52:19 +08:00
|
|
|
if [ -f "$BUILDDIR/$BIN_NAME" ]; then
|
2008-06-20 21:34:53 +08:00
|
|
|
echo "$BIN_NAME exists, skipping"
|
|
|
|
return
|
|
|
|
fi
|
2021-08-21 21:03:42 +08:00
|
|
|
./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log" \
|
2009-02-15 22:52:19 +08:00
|
|
|
&& cp config.log "$BUILDDIR/config.log_$2" \
|
2009-07-26 21:47:50 +08:00
|
|
|
&& LANG=C make clean \
|
2021-08-21 21:03:42 +08:00
|
|
|
&& LANG=C make -j2 check 2>&1 | tee "$BUILDDIR/aria2c_$2.log" \
|
2009-02-15 22:52:19 +08:00
|
|
|
&& cp src/aria2c "$BUILDDIR/aria2c_$2"
|
2015-09-27 22:49:44 +08:00
|
|
|
|
|
|
|
if [ -f "test/aria2c.log" ]; then
|
|
|
|
cat "test/aria2c.log" >> "$BUILDDIR/aria2c_$2.log"
|
|
|
|
fi
|
2008-06-20 21:34:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
clear()
|
|
|
|
{
|
2021-08-21 21:03:42 +08:00
|
|
|
for file in $(ls "$BUILDDIR"); do
|
|
|
|
rm -f "$BUILDDIR/$file"
|
2008-06-20 21:34:53 +08:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
clear)
|
|
|
|
clear
|
|
|
|
;;
|
|
|
|
*)
|
2008-07-23 00:10:31 +08:00
|
|
|
# Library combinations
|
2012-01-07 23:59:34 +08:00
|
|
|
build "--without-libnettle --without-libgcrypt --without-openssl" \
|
|
|
|
"nodigest"
|
2011-08-22 17:56:35 +08:00
|
|
|
build "--without-libnettle --with-libgcrypt" "libgcrypt"
|
2008-06-20 21:34:53 +08:00
|
|
|
build "--without-gnutls" "openssl"
|
|
|
|
build "--without-gnutls --without-openssl" "nossl"
|
|
|
|
build "--without-libcares" "nocares"
|
2008-11-18 20:17:54 +08:00
|
|
|
build "--without-libxml2" "expat"
|
2008-06-20 21:34:53 +08:00
|
|
|
build "--without-libxml2 --without-libexpat" "noxml"
|
2008-07-23 00:10:31 +08:00
|
|
|
build "--without-libz" "nozlib"
|
2008-11-18 20:17:54 +08:00
|
|
|
build "--without-sqlite3" "nosqlite3"
|
2015-05-23 14:24:12 +08:00
|
|
|
build "--without-libssh2" "nolibssh2"
|
2008-06-20 21:34:53 +08:00
|
|
|
# Feature combinations
|
|
|
|
build "--disable-bittorrent" "nobt"
|
|
|
|
build "--disable-metalink" "noml"
|
|
|
|
build "--disable-bittorrent --disable-metalink" "nobt_noml"
|
|
|
|
build "--disable-epoll" "noepoll"
|
|
|
|
build "--disable-epoll --without-libcares" "noepoll_nocares"
|
2015-05-24 17:43:12 +08:00
|
|
|
build "--enable-libaria2" "libaria2"
|
2008-06-20 21:34:53 +08:00
|
|
|
;;
|
|
|
|
esac
|