diff options
author | Edvinas Valatka | 2019-02-05 14:55:18 +0200 |
---|---|---|
committer | Edvinas Valatka | 2019-02-05 14:56:40 +0200 |
commit | f470464f8b547e25ccee2ecbf7cb5ec3333caf99 (patch) | |
tree | 96932cafbbbe861121c38d2015266f11c377e372 | |
parent | 1272d903f556e010125b097f65939d8ac6969840 (diff) | |
download | aur-f470464f8b547e25ccee2ecbf7cb5ec3333caf99.tar.gz |
Some cleanups
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | gogs.install | 31 |
3 files changed, 23 insertions, 35 deletions
@@ -1,6 +1,6 @@ pkgbase = gogs-dev-git - pkgdesc = Self Hosted Git Service in the Go Programming Language. This is the current git version from branch develop. - pkgver = 0.11.55.0609+3+459c8be94 + pkgdesc = Self Hosted Git Service in the Go Programming Language. This is the current git version from develop branch. + pkgver = 0.11.86.0130+3+d862c43be pkgrel = 1 url = https://gogs.io install = gogs.install @@ -12,23 +12,19 @@ pkgbase = gogs-dev-git license = MIT makedepends = git makedepends = go - makedepends = go-bindata-git + makedepends = go-bindata makedepends = nodejs-less makedepends = sqlite depends = git - depends = pam optdepends = sqlite: SQLite support optdepends = mariadb: MariaDB support optdepends = postgresql: PostgreSQL support optdepends = redis: Redis support optdepends = memcached: MemCached support optdepends = openssh: GIT over SSH support - optdepends = bash: GIT over SSH support provides = gogs conflicts = gogs options = !buildflags - options = !strip - options = emptydirs source = gogs::git+https://github.com/gogs/gogs.git#branch=develop source = gogs.service source = gogs.sysusers @@ -8,24 +8,23 @@ _branch=develop _pkgname=gogs _team=github.com/gogs pkgname=${_pkgname}-dev-git -pkgver=0.11.79.1211+1+f43d21d0a +pkgver=0.11.86.0130+3+d862c43be pkgrel=1 -pkgdesc="Self Hosted Git Service in the Go Programming Language. This is the current git version from branch ${_branch}." +pkgdesc="Self Hosted Git Service in the Go Programming Language. This is the current git version from ${_branch} branch." arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') url="https://${_pkgname}.io" license=('MIT') -depends=('git' 'pam') +depends=('git') optdepends=("sqlite: SQLite support" "mariadb: MariaDB support" "postgresql: PostgreSQL support" "redis: Redis support" "memcached: MemCached support" - "openssh: GIT over SSH support" - "bash: GIT over SSH support") -makedepends=('git' 'go' 'go-bindata-git' 'nodejs-less' 'sqlite') + "openssh: GIT over SSH support") +makedepends=('git' 'go' 'go-bindata' 'nodejs-less' 'sqlite') conflicts=("${_pkgname}") provides=("${_pkgname}") -options=('!buildflags' '!strip' 'emptydirs') +options=('!buildflags') install=${_pkgname}.install source=("${_pkgname}::git+https://${_team}/${_pkgname}.git#branch=${_branch}" "${_pkgname}.service" @@ -36,9 +35,7 @@ prepare() { mkdir -p "${srcdir}/src/${_team}" mv -v "${srcdir}/${_pkgname}" "${srcdir}/src/${_team}/${_pkgname}" - cd "$srcdir/src/${_team}/${_pkgname}" - - sed -E -i conf/app.ini \ + sed -E -i $srcdir/src/${_team}/${_pkgname}/conf/app.ini \ -e '0, /^\[/ s/^(RUN_USER)\W.*$/\1 = gogs/' \ -e '/^\[server\]/, /^\[/ s/^(STATIC_ROOT_PATH)\W.*$/\1 = \/usr\/share\/gogs/' \ -e '/^\[log\]/, /^\[/ s/^(ROOT_PATH)\W.*$/\1 = \/var\/log\/gogs/' \ diff --git a/gogs.install b/gogs.install index 1b66ba577e2e..a67e5162827b 100644 --- a/gogs.install +++ b/gogs.install @@ -20,6 +20,7 @@ _disable_if_enabled() { } _gogs_home=/var/lib/gogs +_CustConf=${_gogs_home}/custom/conf/app.ini pre_install() { if getent passwd gogs >/dev/null; then @@ -36,14 +37,15 @@ pre_install() { post_install(){ systemctl daemon-reload - echo " If you do not have a custom configuration file finish the setup:" - echo " 1) start gogs service" - echo " 2) open the installation page http://$(uname -n):3000/" - echo " Otherwise:" - echo " Place your custom configuration file in ${_gogs_home}/custom/conf/app.ini" - echo "" - echo " Default configuration can be located at:" - echo " /usr/share/gogs/conf/app.ini.default" + if [ ! -f ${_CustConf} ] ; then + echo " If you do not have a custom configuration file finish the setup:" + echo " start gogs service and open the installation page http://$(uname -n):3000/" + echo " Otherwise:" + echo " Place your custom configuration file at ${_CustConf}" + echo "" + echo " Default configuration can be located at:" + echo " /usr/share/gogs/conf/app.ini.default" + fi } pre_upgrade() { @@ -54,8 +56,6 @@ pre_upgrade() { post_upgrade() { systemctl daemon-reload - local _CustConf=${_gogs_home}/custom/conf/app.ini - if [ ! -f ${_CustConf} ] ; then echo " Gogs old configuration file must be moved to ${_CustConf} before starting or re-enabling service." _disable_if_enabled @@ -69,12 +69,7 @@ pre_remove() { } post_remove() { - if getent passwd gogs >/dev/null; then - userdel gogs - fi - if getent group gogs >/dev/null; then - groupdel gogs - fi - systemctl daemon-reload - echo " You may need to manually remove an old Gogs home: ${_gogs_home}" + echo " " + echo " You may want to remove an Gogs home directory ${_gogs_home}, user and group" + echo " " } |