gitea: initial commit, version 1.18.4
This commit is contained in:
parent
94e37449b4
commit
632516868a
2255
gitea/.footprint
Normal file
2255
gitea/.footprint
Normal file
File diff suppressed because it is too large
Load Diff
6
gitea/.signature
Normal file
6
gitea/.signature
Normal file
@ -0,0 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF31CfyxHUKRHKgomyyl4xkqRqL+zzTMPSKFW+F2bxJmITTF5zCNI1RvStY/i/37b03jpE0teGvXbwuxs7ifJvDgU=
|
||||
SHA256 (Pkgfile) = 710fe5409ae03b9982114170db4d71bfeab260a16dd0ac89388ce39bb6b21004
|
||||
SHA256 (.footprint) = b93168082dc0688354e97cfdb3755c295a0179580dae02ed40e0ad66fc6f6019
|
||||
SHA256 (gitea-1.18.4.tar.gz) = 0238dc359bc7755b147f709e53cc722ed2378dcceeb921a3cc6cbe0ecb010216
|
||||
SHA256 (gitea.service) = db00bb90bf86796333610fb5416b344aac1427769d01950e19f9747a5017d4b8
|
49
gitea/Pkgfile
Normal file
49
gitea/Pkgfile
Normal file
@ -0,0 +1,49 @@
|
||||
# Description: painless self-hosted Git service
|
||||
# URL: https://gitea.io/
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: git go npm openssh postgresql
|
||||
|
||||
name=gitea
|
||||
version=1.18.4
|
||||
release=1
|
||||
source=(https://github.com/go-gitea/gitea/archive/v$version/$name-$version.tar.gz
|
||||
gitea.service)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
[ ! -d "$PKGMK_SOURCE_DIR/gopath" ] && mkdir "$PKGMK_SOURCE_DIR/gopath"
|
||||
export GOPATH="$PKGMK_SOURCE_DIR/gopath"
|
||||
[ ! -d $PKGMK_SOURCE_DIR/npm_cache ] && mkdir $PKGMK_SOURCE_DIR/npm_cache
|
||||
export npm_config_cache=$PKGMK_SOURCE_DIR/npm_cache
|
||||
export NPM_CONFIG_PREFIX="$SRC/npm"
|
||||
export PATH+=":$NPM_CONFIG_PREFIX/bin"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
|
||||
export LDFLAGS="-X 'code.gitea.io/gitea/modules/setting.AppWorkPath=/home/gitea/'"
|
||||
export LDFLAGS="$LDFLAGS -X 'code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/app.ini'"
|
||||
export LDFLAGS="$LDFLAGS -X 'code.gitea.io/gitea/modules/setting.StaticRootPath=/usr/share/gitea/'"
|
||||
export TAGS="bindata pam"
|
||||
|
||||
export GITEA_VERSION="$version"
|
||||
make deps
|
||||
make -j1 EXTRA_GOFLAGS="$GOFLAGS" backend frontend
|
||||
|
||||
install -Dm755 $name -t $PKG/usr/bin/
|
||||
#setcap cap_net_bind_service=+ep $PKG/usr/bin/$name
|
||||
|
||||
install -D -o gitea -g gitea custom/conf/app.example.ini -t $PKG/etc/gitea/
|
||||
|
||||
install -Dm 755 $SRC/$name.service $PKG/etc/rc.d/$name
|
||||
|
||||
install -d -m 755 -o gitea -g gitea $PKG/var/log/$name
|
||||
install -d -m 755 -o gitea -g gitea $PKG/home/$name
|
||||
install -d -m 755 $PKG/usr/share/$name
|
||||
|
||||
mv assets options public templates $PKG/usr/share/$name/
|
||||
for dir in $name $name/git $name/data $name/db $name/custom; do
|
||||
install -d -m 750 -o gitea -g gitea $PKG/home/$dir
|
||||
done
|
||||
}
|
36
gitea/gitea.service
Executable file
36
gitea/gitea.service
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/gitea: start/stop gitea daemon
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/bin/gitea
|
||||
OPTS=""
|
||||
USER="gitea"
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
$SSD --start -b -c $USER -u $USER --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop -u $USER --retry 10 --exec $PROG
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --exec $PROG
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(pidof $PROG)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
# End of file
|
9
gitea/pre-install
Executable file
9
gitea/pre-install
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
_USER=gitea
|
||||
_HOME=/home/gitea
|
||||
_GROUP=gitea
|
||||
|
||||
/usr/bin/getent group $_GROUP > /dev/null 2>&1 || /usr/sbin/groupadd $_GROUP
|
||||
/usr/bin/getent passwd $_USER > /dev/null 2>&1 || /usr/sbin/useradd -c 'gitea system user' -g $_GROUP -d $_HOME -s /bin/false $_USER
|
||||
passwd -l $_USER > /dev/null
|
Loading…
x
Reference in New Issue
Block a user