source: libpipi/trunk/build-win32 @ 2937

Last change on this file since 2937 was 2937, checked in by Sam Hocevar, 12 years ago

Improve the Win32 cross-build script. Still doesn't work well.

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#! /bin/sh
2
3##  Win32 cross-compilation for libpipi -- Sam Hocevar <sam@zoy.org>
4##  $Id$
5
6set -x
7set -e
8
9# Clean up our working directory
10SRCDIR="`pwd`"
11DIRNAME="libpipi-win32-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\1/p' configure.ac`"
12INSTALLDIR="`pwd`/${DIRNAME}"
13BUILDDIR="${INSTALLDIR}/build"
14rm -Rf "${INSTALLDIR}"
15rm -f "${INSTALLDIR}.zip"
16mkdir "${INSTALLDIR}"
17mkdir "${BUILDDIR}"
18
19make distclean || true
20
21cd "${BUILDDIR}"
22# Build for win32
23"${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib "$@"
24make pkglibdir=/lib pkgdatadir=/data bindir=/bin
25# Install into our private directory
26make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
27cd "${SRCDIR}"
28rm -Rf "${BUILDDIR}"
29
30i586-mingw32msvc-strip "${INSTALLDIR}/bin/"*.exe || true
31i586-mingw32msvc-strip "${INSTALLDIR}/lib/"*.dll || true
32
33# Install gtk-sharp
34cp -r "win32/dist/"* "${INSTALLDIR}/"
35cp -r "win32/assembly/"* "${INSTALLDIR}/bin/"
36
37# Install pipi-sharp
38mv "${INSTALLDIR}/lib/pipi-sharp/"* "${INSTALLDIR}/bin/"
39rm -Rf "${INSTALLDIR}/lib/pipi-sharp"
40
41mkdir "${INSTALLDIR}/doc"
42for f in COPYING NOTES; do
43   sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
44done
45rm -f "${INSTALLDIR}/lib/"*.a
46rm -f "${INSTALLDIR}/lib/"*.la
47
48# Pack the directory
49zip "${DIRNAME}.zip" `find "${DIRNAME}"`
50rm -Rf "${INSTALLDIR}"
51
Note: See TracBrowser for help on using the repository browser.