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