File: make-linux-binary.sh

package info (click to toggle)
netpanzer 0.8.7%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 34,344 kB
  • sloc: cpp: 45,217; sh: 278; objc: 259; python: 102; perl: 30; xml: 30; makefile: 15
file content (48 lines) | stat: -rwxr-xr-x 1,276 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
46
47
48
#! /bin/bash

if [ ! -f RELEASE_VERSION ]; then
    echo "ERROR: RELEASE_VERSION file missing, cannot create"
    exit 1
fi

RELEASEDIR="releases"
VERSION="`<RELEASE_VERSION`"
NPDEST=/tmp/netpanzer
ZIPNAME="netpanzer-linux-${VERSION}.tar.gz"
EXENAME="build/crosslinux/release/netpanzer"

PATH=$PATH:/usr/local/gcc/i686-linux/bin/

echo "Making netPanzer linux version ${VERSION}"

mkdir -p build/crosslinux/{release,debug}/libs
ln -s "`i686-linux-g++ -print-file-name=libstdc++.a`" build/crosslinux/release/libs/libstdc++.a
ln -s "`i686-linux-g++ -print-file-name=libstdc++.a`" build/crosslinux/debug/libs/libstdc++.a

scons crosslinux \
      crosslinuxcompilerprefix=i686-linux- \
      crosslinuxsdlconfig=/usr/local/gcc/i686-linux/bin/sdl-config

i686-linux-strip "${EXENAME}"

[ -d "${NPDEST}" ] && rm -rf "${NPDEST}"

mkdir -p "${NPDEST}"
cp "${EXENAME}" "${NPDEST}"

support/scripts/copy_datafiles.sh "${NPDEST}"
support/scripts/copy_docfiles.sh "${NPDEST}"

[ ! -d "${RELEASEDIR}" ] && mkdir "${RELEASEDIR}"


find "${NPDEST}" -name "*/.*" -exec rm -f "{}" \;

pushd "${NPDEST}/.."
tar zcvf "${ZIPNAME}" `basename "${NPDEST}"`
popd

[ -f "${RELEASEDIR}/${ZIPNAME}" ] && rm -f "${RELEASEDIR}/${ZIPNAME}"

mv "${NPDEST}/../${ZIPNAME}" "${RELEASEDIR}"
rm -rf "${NPDEST}"