termux-packages/packages/gitea/build.sh
Leonid Pliushch d8357b5ed2
Revert "gitea: update to 1.15.6"
Cancel Gitea update for now due to error in one of dependencies,
maybe need wait 1.15.7+.

 github.com/lib/pq
 # github.com/lib/pq
 vendor/github.com/lib/pq/user_posix.go:12:6: userCurrent redeclared in this block
         /home/builder/.termux-build/gitea/build/src/code.gitea.io/gitea/vendor/github.com/lib/pq/user_other.go:7:29: previous declaration
 code.gitea.io/gitea/modules/public
 code.gitea.io/gitea/modules/svg
 make: *** [Makefile:610: gitea] Error 2

This reverts commit 2bcc501646.
2021-11-27 16:03:47 +02:00

41 lines
1.5 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://gitea.io
TERMUX_PKG_DESCRIPTION="Git with a cup of tea, painless self-hosted git service"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=1.14.6
TERMUX_PKG_SRCURL=https://github.com/go-gitea/gitea/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=6953049817b86dafa3b8327b7a1b463ef7880f617a9574f03a4b4eb1ea4b6c4d
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="dash, git"
TERMUX_PKG_CONFFILES="etc/gitea/app.ini"
termux_step_make() {
termux_setup_golang
export GOPATH=$TERMUX_PKG_BUILDDIR
mkdir -p "$GOPATH"/src/code.gitea.io
cp -a "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/code.gitea.io/gitea
cd "$GOPATH"/src/code.gitea.io/gitea
LDFLAGS=""
LDFLAGS+=" -X code.gitea.io/gitea/modules/setting.CustomConf=$TERMUX_PREFIX/etc/gitea/app.ini"
LDFLAGS+=" -X code.gitea.io/gitea/modules/setting.AppWorkPath=$TERMUX_PREFIX/var/lib/gitea"
LDFLAGS+=" -X code.gitea.io/gitea/modules/setting.CustomPath=$TERMUX_PREFIX/var/lib/gitea"
GITEA_VERSION=v"$TERMUX_PKG_VERSION" TAGS="bindata sqlite" make all
}
termux_step_make_install() {
install -Dm700 \
"$GOPATH"/src/code.gitea.io/gitea/gitea \
"$TERMUX_PREFIX"/bin/gitea
mkdir -p "$TERMUX_PREFIX"/etc/gitea
sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" \
"$TERMUX_PKG_BUILDER_DIR"/app.ini > "$TERMUX_PREFIX"/etc/gitea/app.ini
}
termux_step_post_massage() {
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"/var/lib/gitea
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"/var/log/gitea
}