File: build-win32

package info (click to toggle)
zzuf 0.15-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,280 kB
  • ctags: 916
  • sloc: ansic: 7,266; sh: 581; cpp: 352; makefile: 80
file content (31 lines) | stat: -rwxr-xr-x 728 bytes parent folder | download
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
#! /bin/sh

##  Win32 cross-compilation for zzuf -- Sam Hocevar <sam@hocevar.net>

set -x
set -e

# Clean up our working directory
SRCDIR="`pwd`"
DIRNAME="zzuf-win32-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\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 win32
"${SRCDIR}/configure" --host=i686-w64-mingw32 --prefix=/ --bindir=/ --libdir=/

make pkglibdir=/ pkgdatadir=/data bindir=/

make install DESTDIR="${INSTALLDIR}" pkglibdir=/ pkgdatadir=/ bindir=/
rm -Rf "${BUILDDIR}"

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