source: libcaca/trunk/build-win32 @ 975

Last change on this file since 975 was 975, checked in by Sam Hocevar, 14 years ago
  • Updated build scripts for DOS and Win32.
  • 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@zoy.org>
4##  $Id: build-win32 975 2006-05-25 19:10:35Z sam $
5
6set -x
7set -e
8
9# Clean up our working directory
10SRCDIR="`pwd`"
11DIRNAME="libcaca-win32-`sed -ne 's/^AM_INIT_AUTOMAKE(.*, \(.*\)).*/\1/p' configure.ac`"
12INSTALLDIR="`pwd`/${DIRNAME}"
13BUILDDIR="${INSTALLDIR}/build"
14rm -Rf "${INSTALLDIR}"
15rm -f "${INSTALLDIR}.zip"
16mkdir "${INSTALLDIR}"
17mkdir "${BUILDDIR}"
18
19cd "${BUILDDIR}"
20# Build for win32
21"${SRCDIR}/configure" --host=i586-mingw32msvc --program-suffix=.exe --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-doc
22make pkglibdir=/lib pkgdatadir=/data bindir=/bin
23# Install into our private directory
24make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
25cd "${SRCDIR}"
26rm -Rf "${BUILDDIR}"
27
28mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
29mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
30rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
31i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe
32i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll
33rmdir "${INSTALLDIR}/bin"
34rmdir "${INSTALLDIR}/lib"
35
36mkdir "${INSTALLDIR}/doc"
37for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS TODO; do
38   sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
39done
40rm -Rf "${INSTALLDIR}/share"
41rm -Rf "${INSTALLDIR}/man"
42rm -Rf "${INSTALLDIR}/include"
43rm -Rf "${INSTALLDIR}/pkg-config"
44rm -f "${INSTALLDIR}/caca-config"
45rm -f "${INSTALLDIR}/"*.a
46rm -f "${INSTALLDIR}/"*.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.