elk/build-win32

31 lines
813 B
Plaintext
Raw Normal View History

#! /bin/sh
## Win32 cross-compilation for Elk -- Sam Hocevar <sam@zoy.org>
## $Id$
set -x
set -e
# Clean up our working directory
DIRNAME="elk-`sed -ne '/^VERSION/s/[^0-9]*//p' Makefile`"
DESTDIR="`pwd`/${DIRNAME}"
rm -Rf "${DIRNAME}"
rm -f "${DIRNAME}.zip"
mkdir "${DIRNAME}"
# To build for win32, I use:
# ./configure --host=i586-mingw32msvc --prefix=/ --bindir=/ --libdir=/
# make pkglibdir=/lib pkgdatadir=/scm
make install DESTDIR="${DESTDIR}" pkglibdir=/lib pkgdatadir=/scm
mv "${DESTDIR}/share/doc/elk/examples" "${DESTDIR}/examples"
mv "${DESTDIR}/share/doc/elk/ps" "${DESTDIR}/doc"
rmdir "${DESTDIR}/share/doc/elk"
rmdir "${DESTDIR}/share/doc"
rmdir "${DESTDIR}/share"
cp "src/.libs/libelk-0.dll" "${DESTDIR}"
# Pack the directory
zip "${DIRNAME}.zip" `find "${DIRNAME}"`
rm -Rf "${DIRNAME}"