source: libcaca/trunk/build-dos @ 4333

Last change on this file since 4333 was 4333, checked in by Sam Hocevar, 8 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.2 KB
Line 
1#! /bin/sh
2
3##  DOS cross-compilation for libcaca -- Sam Hocevar <sam@hocevar.net>
4
5set -x
6set -e
7
8# Clean up our working directory
9SRCDIR="`pwd`"
10DIRNAME="libcaca-dos-`sed -ne 's/^AM_INIT_AUTOMAKE(.*, \(.*\)).*/\1/p' configure.ac`"
11INSTALLDIR="`pwd`/${DIRNAME}"
12BUILDDIR="${INSTALLDIR}/build"
13rm -Rf "${INSTALLDIR}"
14rm -f "${INSTALLDIR}.zip"
15mkdir "${INSTALLDIR}"
16mkdir "${BUILDDIR}"
17
18cd "${BUILDDIR}"
19# Build for DOS
20"${SRCDIR}/configure" --host=i386-pc-msdosdjgpp --prefix=/ --bindir=/ --libdir=/ --disable-imlib2 --disable-doc --disable-ruby --disable-csharp --disable-cxx
21make pkglibdir=/lib pkgdatadir=/data
22# Install into our private directory
23make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib pkgdatadir=/
24cd "${SRCDIR}"
25rm -Rf "${BUILDDIR}"
26
27i386-pc-msdosdjgpp-strip "${INSTALLDIR}/"*.exe
28
29mkdir "${INSTALLDIR}/doc"
30for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
31   sed -e 's/$/^M/' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
32done
33
34rm -Rf "${INSTALLDIR}/share"
35rm -Rf "${INSTALLDIR}/man"
36rm -Rf "${INSTALLDIR}/include"
37rm -Rf "${INSTALLDIR}/pkg-config"
38rm -f "${INSTALLDIR}/caca-config"
39rm -f "${INSTALLDIR}/"*.a
40rm -f "${INSTALLDIR}/"*.la
41
42# Pack the directory
43zip "${DIRNAME}.zip" `find "${DIRNAME}"`
44rm -Rf "${INSTALLDIR}"
45
Note: See TracBrowser for help on using the repository browser.