File: build

package info (click to toggle)
cross-toolchain-base 78
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 412 kB
  • sloc: perl: 1,261; makefile: 1,221; sh: 234; python: 43
file content (30 lines) | stat: -rwxr-xr-x 544 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

set -e

arch=$(dpkg --print-architecture)

echo "Testing cross builds on $arch ..."

CPUS=$(getconf _NPROCESSORS_ONLN)
case "$CPUS" in
  [0-9]|[0-9][0-9]|[0-9][0-9][0-9]) ;;
  *) CPUS=1
esac

case "$arch" in
  amd64)
    CROSS_ARCHS="ppc64el";;
  i386)
    CROSS_ARCHS="arm64";;
  ppc64el)
    CROSS_ARCHS="arm64";;
  arm64)
    CROSS_ARCHS="armhf";;
  *)
    echo "Skipping cross builds on $arch"
    exit 77;;
esac

set -x
CROSS_ARCHS="$CROSS_ARCHS" DEB_BUILD_OPTIONS="parallel=$CPUS nopgo nolto" dpkg-buildpackage -d -b --no-sign