source: libcaca/trunk/build-win32 @ 677

Last change on this file since 677 was 628, checked in by Sam Hocevar, 15 years ago
  • Distribute the license with Win32 packages and convert text files to CRLF format.
  • 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 628 2006-03-16 12:46:39Z 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
18make pkglibdir=/lib pkgdatadir=/data bindir=/bin
19
20# Install into our private directory
21make install DESTDIR="${DESTDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
22cp COPYING COPYING.LGPL "${DESTDIR}/share/doc/libcaca-dev/"
23
24mv "${DESTDIR}/bin/"* "${DESTDIR}/"
25mv "${DESTDIR}/lib/"* "${DESTDIR}/"
26i586-mingw32msvc-strip "${DESTDIR}/"*.exe
27i586-mingw32msvc-strip "${DESTDIR}/"*.dll
28rmdir "${DESTDIR}/bin"
29rmdir "${DESTDIR}/lib"
30
31mkdir "${DESTDIR}/doc"
32for f in `ls "${DESTDIR}/share/doc/libcaca-dev/"`; do
33   sed -e 's/$/ /' < "${DESTDIR}/share/doc/libcaca-dev/${f}" > "${DESTDIR}/doc/${f}.txt"
34done
35rm -Rf "${DESTDIR}/share"
36rm -Rf "${DESTDIR}/man"
37rm -Rf "${DESTDIR}/include"
38rm -f "${DESTDIR}/caca-config"
39rm -f "${DESTDIR}/"*.a
40rm -f "${DESTDIR}/"*.la
41
42# Pack the directory
43zip "${DIRNAME}.zip" `find "${DIRNAME}"`
44rm -Rf "${DIRNAME}"
45
Note: See TracBrowser for help on using the repository browser.