File: build_arch.sh

package info (click to toggle)
austin 3.7.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,444 kB
  • sloc: ansic: 8,622; python: 2,669; sh: 106; makefile: 54
file content (39 lines) | stat: -rw-r--r-- 906 bytes parent folder | download | duplicates (2)
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
#!/bin/bash -eu

set -e
set -u

# Install build dependencies
apt-get update
apt-get -y install \
    autoconf \
    build-essential \
    libunwind-dev \
    binutils-dev \
    libiberty-dev \
    musl-tools \
    zlib1g-dev

# Build Austin
autoreconf --install
./configure
make

export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p")

pushd src
    tar -Jcf austin-$VERSION-gnu-linux-$ARCH.tar.xz austin
    tar -Jcf austinp-$VERSION-gnu-linux-$ARCH.tar.xz austinp

    cp austin  /artifacts/austin
    cp austinp /artifacts/austinp

    musl-gcc -O3 -Os -s -Wall -pthread *.c -o austin -D__MUSL__
    tar -Jcf austin-$VERSION-musl-linux-$ARCH.tar.xz austin

    cp austin /artifacts/austin.musl

    mv austin-$VERSION-gnu-linux-$ARCH.tar.xz /artifacts
    mv austinp-$VERSION-gnu-linux-$ARCH.tar.xz /artifacts
    mv austin-$VERSION-musl-linux-$ARCH.tar.xz /artifacts
popd