source: libcaca/trunk/build-win32 @ 4219

Last change on this file since 4219 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
Line 
1#! /bin/sh
2
3##  Win32 cross-compilation for libcaca -- Sam Hocevar <sam@hocevar.net>
4##  $Id: build-win32 4148 2009-12-19 14:38:38Z sam $
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 --disable-imlib2 --disable-doc "$@"
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
30mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
31mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
32rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
33i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe || true
34i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll || true
35rmdir "${INSTALLDIR}/bin"
36rmdir "${INSTALLDIR}/lib"
37
38mkdir "${INSTALLDIR}/doc"
39for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
40   sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
41done
42rm -Rf "${INSTALLDIR}/share"
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
50# Pack the directory
51zip "${DIRNAME}.zip" `find "${DIRNAME}"`
52rm -Rf "${INSTALLDIR}"
53
Note: See TracBrowser for help on using the repository browser.