#!/bin/sh
#
+# This file may help you build the dependency packages that
+# are needed to cross compile the Win64 bit version of the Bacula
+# File daemon. This file is provided as is, and we don't guarantee
+# that it will work. We run it only on Ubuntu Hardy. Trying to use
+# it on any other GNU/Linux distro will probably require changes.
+#
# This file is driven by the parameters that are defined in
# the file External-mingw-w64
#
cd ../../..
TOP_DIR=`pwd`
+TOP_DIR=${DEPKGS:-${TOP_DIR}}
if [ -e ${TOP_DIR}/cross-tools/mingw-w64/bin/x86_64-pc-mingw32-gcc ]
then
cd ${TOP_DIR}/cross-tools/mingw-w64/bin
BIN_DIR=`pwd`
else
- echo "The GCC cross compiler isn\'t installed."
+ echo "The GCC cross compiler is not installed."
echo "You must run build-win64-cross-tools first"
exit 1
fi
fi | tee -a make.log | parse_output
}
+process_rsync()
+{
+ get_source "${URL_RSYNC}" "${DIR_RSYNC}" "${MKD_RSYNC}"
+ ./configure --host=x86_64-pc-mingw32
+ make -k # rdiff.exe has a problem
+ cp .libs/librsync.a ${DEPPKG_DIR}/lib
+ cp librsync*h ${DEPPKG_DIR}/include
+}
+
process_zlib()
{
if get_source "${URL_ZLIB}" "${DIR_ZLIB}" "${MKD_ZLIB}"
then
echo Patching pthreads
>patch.log
- do_patch pthreads-w64+bacula.patch
+ do_patch pthreads-w64.patch
fi
echo Building pthreads
> make.log
>patch.log
do_patch openssl-w64.patch
echo Configuring openssl
+ echo ./Configure --prefix=${DEPPKG_DIR} \
+ shared zlib-dynamic no-dso no-hw \
+ threads \
+ --with-zlib-include=${DEPPKG_DIR}/include \
+ mingw64
./Configure --prefix=${DEPPKG_DIR} \
shared zlib-dynamic no-dso no-hw \
threads \
perl util/mkdef.pl 32 libeay no-static-engine >ms/libeay32.def
perl util/mkdef.pl 32 ssleay >ms/ssleay32.def
perl util/mkdef.pl crypto ssl NT update
- CFLAG=-I${DEPPKG_DIR}/include do_make Makefile all
+ sed -i 's/CC=/CC=mingw32-gcc #/' crypto/comp/Makefile
+ sed -i 's/AR=/AR=mingw32-ar r #/' crypto/comp/Makefile
+ sed -i "s:^CFLAGS=:CFLAGS= -I${DEPPKG_DIR}/include:" crypto/comp/Makefile
+
+ do_make Makefile all
+ cd engines
+ touch lib4758cca.bad libaep.bad libatalla.bad libcswift.bad libchil.bad libgmp.bad libnuron.bad libsureware.bad libubsec.bad libcapi.bad
+ cd ..
+ do_make Makefile all
echo Installing openssl
- do_make Makefile install_sw
+ do_make Makefile install_sw install
+ cp *.dll ${DEPPKG_DIR}/bin
}
if [ "$#" -eq 0 ]
then
process_zlib
+ process_rsync
process_pcre
process_pthreads
process_openssl