File: build-dos

package info (click to toggle)
libcaca 0.99.beta19-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,312 kB
  • sloc: ansic: 22,346; python: 2,316; cs: 1,213; cpp: 1,114; java: 916; objc: 836; makefile: 606; sh: 457; ruby: 193; asm: 65
file content (45 lines) | stat: -rwxr-xr-x 1,277 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/sh

##  DOS cross-compilation for libcaca -- Sam Hocevar <sam@hocevar.net>

set -x
set -e

# Clean up our working directory
SRCDIR="`pwd`"
DIRNAME="libcaca-dos-`sed -ne 's/^AM_INIT_AUTOMAKE(.*, \(.*\)).*/\1/p' configure.ac`"
INSTALLDIR="`pwd`/${DIRNAME}"
BUILDDIR="${INSTALLDIR}/build"
rm -Rf "${INSTALLDIR}"
rm -f "${INSTALLDIR}.zip"
mkdir "${INSTALLDIR}"
mkdir "${BUILDDIR}"

cd "${BUILDDIR}"
# Build for DOS
"${SRCDIR}/configure" --host=i386-pc-msdosdjgpp --prefix=/ --bindir=/ --libdir=/ --disable-imlib2 --disable-doc --disable-ruby --disable-csharp --disable-cxx
make pkglibdir=/lib pkgdatadir=/data
# Install into our private directory
make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib pkgdatadir=/
cd "${SRCDIR}"
rm -Rf "${BUILDDIR}"

i386-pc-msdosdjgpp-strip "${INSTALLDIR}/"*.exe

mkdir "${INSTALLDIR}/doc"
for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
   sed -e 's/$/^M/' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
done

rm -Rf "${INSTALLDIR}/share"
rm -Rf "${INSTALLDIR}/man"
rm -Rf "${INSTALLDIR}/include"
rm -Rf "${INSTALLDIR}/pkg-config"
rm -f "${INSTALLDIR}/caca-config"
rm -f "${INSTALLDIR}/"*.a
rm -f "${INSTALLDIR}/"*.la

# Pack the directory
zip "${DIRNAME}.zip" `find "${DIRNAME}"`
rm -Rf "${INSTALLDIR}"