termux-packages/packages/git-lfs/build.sh

32 lines
1.0 KiB
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://git-lfs.github.com/
TERMUX_PKG_DESCRIPTION="Git extension for versioning large files"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
2021-04-01 12:09:42 +02:00
TERMUX_PKG_VERSION=2.13.3
TERMUX_PKG_SRCURL=https://github.com/git-lfs/git-lfs/archive/v$TERMUX_PKG_VERSION.tar.gz
2021-04-01 12:09:42 +02:00
TERMUX_PKG_SHA256=f8bd7a06e61e47417eb54c3a0db809ea864a9322629b5544b78661edab17b950
termux_step_make() {
termux_setup_golang
export GOPATH=$TERMUX_PKG_BUILDDIR
mkdir -p "$GOPATH"/github.com/git-lfs
ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH"/github.com/git-lfs/git-lfs
cd "$GOPATH"/github.com/git-lfs/git-lfs
2019-08-13 12:26:50 +02:00
! $TERMUX_ON_DEVICE_BUILD && GOOS=linux GOARCH=amd64 CC=gcc LD=gcc go generate github.com/git-lfs/git-lfs/commands
go build git-lfs.go
}
termux_step_make_install() {
install -Dm700 \
"$GOPATH"/github.com/git-lfs/git-lfs/git-lfs \
"$TERMUX_PREFIX"/bin/git-lfs
}
termux_step_post_make_install() {
# Remove read-only files generated in build process.
chmod -R 700 "$TERMUX_PKG_BUILDDIR"/pkg
rm -rf "$TERMUX_PKG_BUILDDIR"/pkg
}