You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1.5 KiB

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 Plyushch <leonid.plyushch@gmail.com> @xeffyr"
TERMUX_PKG_VERSION=1.8.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/go-gitea/gitea/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=91f1094f1aa833c8e2cb11cf4c2e1301c53317a49c9f6818c4a7a1ef926850cd
TERMUX_PKG_DEPENDS="dash, git"
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
# go-bindata shoudn't be cross-compiled
GOOS=linux GOARCH=amd64 go get -u github.com/jteeuwen/go-bindata/...
export PATH="$PATH:$GOPATH/bin"
TAGS="bindata sqlite" make generate 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
sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" \
"$TERMUX_PKG_BUILDER_DIR"/gitea-service.sh > "$TERMUX_PREFIX"/bin/gitea-service.sh
chmod 700 ${TERMUX_PREFIX}/bin/gitea-service.sh
}
termux_step_post_massage() {
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"/var/gitea
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"/var/log/gitea
}