source: libcaca/trunk/build-win32 @ 866

Last change on this file since 866 was 866, checked in by Sam Hocevar, 14 years ago
  • Brought the Win32 build back on its wheels.
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1#! /bin/sh
2
3##  Win32 cross-compilation for libcaca -- Sam Hocevar <sam@zoy.org>
4##  $Id: build-win32 866 2006-04-24 21:45:26Z sam $
5
6set -x
7set -e
8
9# Clean up our working directory
10DIRNAME="libcaca-win32-`sed -ne '/^VERSION/s/[^0-9]*//p' Makefile`"
11DESTDIR="`pwd`/${DIRNAME}"
12rm -Rf "${DIRNAME}"
13rm -f "${DIRNAME}.zip"
14mkdir "${DIRNAME}"
15
16# Build for win32
17./configure --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-doc --disable-pangoft2
18make pkglibdir=/lib pkgdatadir=/data bindir=/bin
19
20# Install into our private directory
21make install DESTDIR="${DESTDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
22
23mv "${DESTDIR}/bin/"* "${DESTDIR}/"
24mv "${DESTDIR}/lib/"* "${DESTDIR}/"
25i586-mingw32msvc-strip "${DESTDIR}/"*.exe
26i586-mingw32msvc-strip "${DESTDIR}/"*.dll
27rmdir "${DESTDIR}/bin"
28rmdir "${DESTDIR}/lib"
29
30mkdir "${DESTDIR}/doc"
31for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS TODO; do
32   sed -e 's/$/ /' < "${f}" > "${DESTDIR}/doc/${f}.txt"
33done
34rm -Rf "${DESTDIR}/share"
35rm -Rf "${DESTDIR}/man"
36rm -Rf "${DESTDIR}/include"
37rm -f "${DESTDIR}/caca-config"
38rm -f "${DESTDIR}/"*.a
39rm -f "${DESTDIR}/"*.la
40
41# Pack the directory
42zip "${DIRNAME}.zip" `find "${DIRNAME}"`
43rm -Rf "${DIRNAME}"
44
Note: See TracBrowser for help on using the repository browser.