source: libcaca/trunk/build-win32 @ 4155

Last change on this file since 4155 was 4148, checked in by Sam Hocevar, 10 years ago

Update my e-mail address everywhere.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.5 KB
RevLine 
[341]1#! /bin/sh
2
[4148]3##  Win32 cross-compilation for libcaca -- Sam Hocevar <sam@hocevar.net>
[341]4##  $Id: build-win32 4148 2009-12-19 14:38:38Z sam $
5
6set -x
7set -e
8
9# Clean up our working directory
[975]10SRCDIR="`pwd`"
[2901]11DIRNAME="libpipi-win32-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\1/p' configure.ac`"
[975]12INSTALLDIR="`pwd`/${DIRNAME}"
13BUILDDIR="${INSTALLDIR}/build"
14rm -Rf "${INSTALLDIR}"
15rm -f "${INSTALLDIR}.zip"
16mkdir "${INSTALLDIR}"
17mkdir "${BUILDDIR}"
[341]18
[2859]19make distclean || true
20
[975]21cd "${BUILDDIR}"
[341]22# Build for win32
[2901]23"${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-doc "$@"
[628]24make pkglibdir=/lib pkgdatadir=/data bindir=/bin
[341]25# Install into our private directory
[975]26make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
27cd "${SRCDIR}"
28rm -Rf "${BUILDDIR}"
[628]29
[975]30mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
31mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
32rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
[2901]33i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe || true
34i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll || true
[975]35rmdir "${INSTALLDIR}/bin"
36rmdir "${INSTALLDIR}/lib"
[628]37
[975]38mkdir "${INSTALLDIR}/doc"
[2299]39for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
[628]40   sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
[975]41done
[628]42rm -Rf "${INSTALLDIR}/share"
[975]43rm -Rf "${INSTALLDIR}/man"
44rm -Rf "${INSTALLDIR}/include"
45rm -Rf "${INSTALLDIR}/pkg-config"
46rm -f "${INSTALLDIR}/caca-config"
47rm -f "${INSTALLDIR}/"*.a
48rm -f "${INSTALLDIR}/"*.la
49
[341]50# Pack the directory
51zip "${DIRNAME}.zip" `find "${DIRNAME}"`
52rm -Rf "${INSTALLDIR}"
[975]53
Note: See TracBrowser for help on using the repository browser.