Add asciinema package
This commit is contained in:
parent
130e534c41
commit
05f44081cf
22
packages/asciinema/Makefile.patch
Normal file
22
packages/asciinema/Makefile.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff -u -r ../asciinema-1.1.1/Makefile ./Makefile
|
||||||
|
--- ../asciinema-1.1.1/Makefile 2015-06-21 17:58:14.000000000 +0200
|
||||||
|
+++ ./Makefile 2015-08-20 01:39:05.000000000 +0200
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
NAME=asciinema
|
||||||
|
VERSION=$(shell grep 'const Version' main.go | awk -F '"' '{print $$2}')
|
||||||
|
-COMMIT=$(shell git rev-parse --short HEAD)
|
||||||
|
+COMMIT=1.1.1
|
||||||
|
|
||||||
|
DIRS=bin
|
||||||
|
INSTALL_DIRS=`find $(DIRS) -type d 2>/dev/null`
|
||||||
|
@@ -14,8 +14,8 @@
|
||||||
|
|
||||||
|
all: build
|
||||||
|
|
||||||
|
-build: test
|
||||||
|
- go build -o bin/asciinema -ldflags "-X main.GitCommit $(COMMIT)"
|
||||||
|
+build:
|
||||||
|
+ go build -o bin/asciinema -ldflags "-extldflags=-pie -X main.GitCommit $(COMMIT)"
|
||||||
|
|
||||||
|
test:
|
||||||
|
go test ./...
|
35
packages/asciinema/build.sh
Normal file
35
packages/asciinema/build.sh
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://asciinema.org/
|
||||||
|
TERMUX_PKG_DESCRIPTION="Record and share your terminal sessions, the right way"
|
||||||
|
TERMUX_PKG_VERSION=1.1.1
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/asciinema/asciinema/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||||
|
TERMUX_PKG_FOLDERNAME=asciinema-${TERMUX_PKG_VERSION}
|
||||||
|
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||||
|
|
||||||
|
termux_step_make () {
|
||||||
|
export GOOS=android
|
||||||
|
export GO_LDFLAGS="-extldflags=-pie"
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
if [ "$TERMUX_ARCH" = "arm" ]; then
|
||||||
|
export GOARCH=arm
|
||||||
|
export GOARM=7
|
||||||
|
elif [ "$TERMUX_ARCH" = "i686" ]; then
|
||||||
|
export GOARCH=386
|
||||||
|
export GO386=sse2
|
||||||
|
else
|
||||||
|
echo "ERROR: Unsupported arch: $TERMUX_ARCH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export GOPATH=$TERMUX_PKG_TMPDIR
|
||||||
|
cd $GOPATH
|
||||||
|
mkdir -p src/github.com/asciinema/asciinema/
|
||||||
|
cp -Rf $TERMUX_PKG_SRCDIR/* src/github.com/asciinema/asciinema/
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_make_install () {
|
||||||
|
cd $GOPATH/src/github.com/asciinema/asciinema
|
||||||
|
export GOROOT=$HOME/lib/go/
|
||||||
|
export PATH=$PATH:$GOROOT/bin/
|
||||||
|
PREFIX=$TERMUX_PREFIX make build
|
||||||
|
PREFIX=$TERMUX_PREFIX make install
|
||||||
|
}
|
12
packages/asciinema/commands-rec.go.patch
Normal file
12
packages/asciinema/commands-rec.go.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -u -r ../asciinema-1.1.1/commands/rec.go ./commands/rec.go
|
||||||
|
--- ../asciinema-1.1.1/commands/rec.go 2015-06-21 17:58:14.000000000 +0200
|
||||||
|
+++ ./commands/rec.go 2015-08-20 01:45:49.000000000 +0200
|
||||||
|
@@ -69,7 +69,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
func tmpPath() (string, error) {
|
||||||
|
- file, err := ioutil.TempFile("", "asciicast-")
|
||||||
|
+ file, err := ioutil.TempFile("@TERMUX_PREFIX@/tmp", "asciicast-")
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
12
packages/asciinema/util-cfg.go.patch
Normal file
12
packages/asciinema/util-cfg.go.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -u -r ../asciinema-1.1.1/util/cfg.go ./util/cfg.go
|
||||||
|
--- ../asciinema-1.1.1/util/cfg.go 2015-06-21 17:58:14.000000000 +0200
|
||||||
|
+++ ./util/cfg.go 2015-08-20 01:47:50.000000000 +0200
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
|
||||||
|
const (
|
||||||
|
DefaultAPIURL = "https://asciinema.org"
|
||||||
|
- DefaultCommand = "/bin/sh"
|
||||||
|
+ DefaultCommand = "@TERMUX_PREFIX@/bin/bash"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ConfigAPI struct {
|
Loading…
Reference in New Issue
Block a user