Commit | Line | Data |
---|---|---|
55685947 FF |
1 | # Go programs does not build on android-386 |
2 | # - will hopefully get fixed in go 1.6! | |
3 | # https://github.com/golang/go/issues/9327 | |
05f44081 FF |
4 | TERMUX_PKG_HOMEPAGE=https://asciinema.org/ |
5 | TERMUX_PKG_DESCRIPTION="Record and share your terminal sessions, the right way" | |
6 | TERMUX_PKG_VERSION=1.1.1 | |
7 | TERMUX_PKG_SRCURL=https://github.com/asciinema/asciinema/archive/v${TERMUX_PKG_VERSION}.tar.gz | |
8 | TERMUX_PKG_FOLDERNAME=asciinema-${TERMUX_PKG_VERSION} | |
9 | TERMUX_PKG_BUILD_IN_SRC=yes | |
10 | ||
11 | termux_step_make () { | |
12 | export GOOS=android | |
13 | export GO_LDFLAGS="-extldflags=-pie" | |
14 | export CGO_ENABLED=1 | |
15 | if [ "$TERMUX_ARCH" = "arm" ]; then | |
16 | export GOARCH=arm | |
17 | export GOARM=7 | |
18 | elif [ "$TERMUX_ARCH" = "i686" ]; then | |
19 | export GOARCH=386 | |
20 | export GO386=sse2 | |
451fbbe8 FF |
21 | elif [ "$TERMUX_ARCH" = "aarch64" ]; then |
22 | export GOARCH=arm64 | |
23 | elif [ "$TERMUX_ARCH" = "x86_64" ]; then | |
24 | export GOARCH=amd64 | |
05f44081 FF |
25 | else |
26 | echo "ERROR: Unsupported arch: $TERMUX_ARCH" | |
27 | exit 1 | |
28 | fi | |
29 | ||
30 | export GOPATH=$TERMUX_PKG_TMPDIR | |
31 | cd $GOPATH | |
32 | mkdir -p src/github.com/asciinema/asciinema/ | |
33 | cp -Rf $TERMUX_PKG_SRCDIR/* src/github.com/asciinema/asciinema/ | |
34 | } | |
35 | ||
36 | termux_step_make_install () { | |
37 | cd $GOPATH/src/github.com/asciinema/asciinema | |
38 | export GOROOT=$HOME/lib/go/ | |
55685947 | 39 | export PATH=$GOROOT/bin:$PATH |
05f44081 FF |
40 | PREFIX=$TERMUX_PREFIX make build |
41 | PREFIX=$TERMUX_PREFIX make install | |
42 | } |