gitea: update default paths for customdir, workdir, config & repositories
This commit is contained in:
parent
e3acf553ef
commit
7d3e6e0d9b
@ -1,18 +1,21 @@
|
||||
; Either "dev", "prod" or "test", default is "dev"
|
||||
APP_NAME = Termux Gitea
|
||||
RUN_MODE = prod
|
||||
|
||||
[repository]
|
||||
ROOT = @TERMUX_PREFIX@/var/gitea
|
||||
ROOT = @TERMUX_PREFIX@/var/lib/gitea/git-data
|
||||
|
||||
[server]
|
||||
LFS_CONTENT_PATH = @TERMUX_PREFIX@/var/lib/gitea/lfs-data
|
||||
|
||||
[database]
|
||||
DB_TYPE=sqlite3
|
||||
PATH=@TERMUX_PREFIX@/var/gitea/gitea.db
|
||||
DB_TYPE = sqlite3
|
||||
PATH = @TERMUX_PREFIX@/var/lib/gitea/gitea.db
|
||||
|
||||
[log]
|
||||
ROOT_PATH=@TERMUX_PREFIX@/var/log/gitea
|
||||
MODE=file
|
||||
LEVEL=Info
|
||||
ROOT_PATH = @TERMUX_PREFIX@/var/log/gitea
|
||||
MODE = file
|
||||
LEVEL = Info
|
||||
|
||||
; Update mirrors
|
||||
[cron.update_mirrors]
|
||||
SCHEDULE = @every 120m
|
||||
|
@ -3,9 +3,11 @@ 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>"
|
||||
TERMUX_PKG_VERSION=1.10.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/go-gitea/gitea/archive/v$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=01a158128803e3e310d6e8816f49a8f1c6ef82d7c29c3fc9dbdefddad7b0bfdf
|
||||
TERMUX_PKG_DEPENDS="dash, git"
|
||||
TERMUX_PKG_CONFFILES="etc/gitea/app.ini"
|
||||
|
||||
termux_step_make() {
|
||||
echo 'replace github.com/go-macaron/cors v0.0.0-20190309005821-6fd6a9bfe14e9 => github.com/go-macaron/cors 6fd6a9bfe14e' >> $TERMUX_PKG_SRCDIR/go.mod
|
||||
@ -22,8 +24,13 @@ termux_step_make() {
|
||||
export PATH="$PATH:$GOPATH/bin"
|
||||
|
||||
CGO_ENABLED=0 CGO_LDFLAGS="" CGO_CFLAGS="" GOOS=linux GOARCH=amd64 make generate
|
||||
#CGO_ENABLED=0 CGO_LDFLAGS="" CGO_CFLAGS="" LDFLAGS="" TAGS="bindata sqlite" make all
|
||||
LDFLAGS="" TAGS="bindata sqlite" make all
|
||||
(
|
||||
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"
|
||||
TAGS="bindata sqlite" make all
|
||||
)
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
@ -34,13 +41,9 @@ termux_step_make_install() {
|
||||
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/lib/gitea
|
||||
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"/var/log/gitea
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
export GITEA_WORK_DIR=@TERMUX_PREFIX@/var/gitea
|
||||
exec @TERMUX_PREFIX@/bin/gitea web -c @TERMUX_PREFIX@/etc/gitea/app.ini
|
Loading…
Reference in New Issue
Block a user