source: libcaca/trunk/build-win32 @ 4410

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

Large source code cleanup, getting rid of spaces, tabs, and svn keywords.

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