From 45241f4758894697c7c7eb0ddc3a0a17f4d30cfe Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sat, 26 Jan 2019 21:15:09 -0200 Subject: [PATCH] gogs: simplify directory creation --- srcpkgs/gogs/files/gogs/run | 18 +++--------------- srcpkgs/gogs/template | 11 +++++++++-- 2 files changed, 12 insertions(+), 17 deletions(-) mode change 100755 => 100644 srcpkgs/gogs/files/gogs/run diff --git a/srcpkgs/gogs/files/gogs/run b/srcpkgs/gogs/files/gogs/run old mode 100755 new mode 100644 index 2c6a25ec9e5..361e12f0f75 --- a/srcpkgs/gogs/files/gogs/run +++ b/srcpkgs/gogs/files/gogs/run @@ -1,16 +1,4 @@ #!/bin/sh -[ -r ./conf ] && . ./conf -: ${USER:=gogs} -: ${GROUP:=gogs} -: ${HOME:=/srv/gogs} -exec 2>&1 -cd $HOME -export HOME -export USER - -for f in ${HOME}/repo ${HOME}/data/avatars ${HOME}/data/attachment /var/log/gogs; do - mkdir -p $f - chown ${USER}:${GROUP} $f -done - -exec chpst -u $USER:$GROUP -P gogs web --config /etc/gogs.ini +export USER=gogs +export HOME=/srv/gogs +exec chpst -u gogs:gogs -P gogs web --config /etc/gogs.ini 2>&1 diff --git a/srcpkgs/gogs/template b/srcpkgs/gogs/template index 1d10f08a87a..9eb4a9b6bf4 100644 --- a/srcpkgs/gogs/template +++ b/srcpkgs/gogs/template @@ -1,9 +1,9 @@ # Template file for 'gogs' pkgname=gogs version=0.11.79 -revision=1 +revision=2 build_style=go -go_import_path="github.com/gogs/gogs" +go_import_path=github.com/gogs/gogs go_build_tags="sqlite pam cert" hostmakedepends="git curl" makedepends="pam-devel" @@ -20,6 +20,13 @@ system_accounts="gogs" gogs_homedir="/srv/gogs" gogs_shell="/bin/bash" +make_dirs=" + /srv/gogs 0755 gogs gogs + /srv/gogs/repo 0755 gogs gogs + /srv/gogs/data/avatars 0755 gogs gogs + /srv/gogs/data/attachment 0755 gogs gogs + /var/log/gogs 0755 gogs gogs" + export CGO_ENABLED=1 post_install() {