aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Anderson <telans@posteo.de>2021-01-09 00:17:28 +1300
committerTheo Anderson <telans@posteo.de>2021-01-09 00:17:28 +1300
commited515cf2a9eae78e2d1d6f8881e49a427b4d0942 (patch)
tree027081f1736fbd8aef8249b8229543b7822865da
parent*/*: drop x86-macos (diff)
downloadguru-ed515cf2.tar.gz
guru-ed515cf2.tar.bz2
guru-ed515cf2.zip
www-apps/gogs: tidy ebuild
Closes: https://bugs.gentoo.org/741522 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Theo Anderson <telans@posteo.de>
-rw-r--r--www-apps/gogs/files/gogs-0.12.3.patch6
-rw-r--r--www-apps/gogs/gogs-0.12.3.ebuild45
2 files changed, 28 insertions, 23 deletions
diff --git a/www-apps/gogs/files/gogs-0.12.3.patch b/www-apps/gogs/files/gogs-0.12.3.patch
index 2d99c012d..f5c0eb0b1 100644
--- a/www-apps/gogs/files/gogs-0.12.3.patch
+++ b/www-apps/gogs/files/gogs-0.12.3.patch
@@ -1,6 +1,6 @@
-diff --git a/custom/conf/app.ini b/custom/conf/app.ini
---- a/custom/conf/app.ini
-+++ b/custom/conf/app.ini
+diff --git a/conf/app.ini b/conf/app.ini
+--- a/conf/app.ini
++++ b/conf/app.ini
@@ -1,14 +1,12 @@
-# !!! NEVER EVER MODIFY THIS FILE !!!
-# !!! PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE !!!
diff --git a/www-apps/gogs/gogs-0.12.3.ebuild b/www-apps/gogs/gogs-0.12.3.ebuild
index d8679f2a5..05c81318a 100644
--- a/www-apps/gogs/gogs-0.12.3.ebuild
+++ b/www-apps/gogs/gogs-0.12.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,10 @@ EAPI=7
inherit fcaps go-module systemd
DESCRIPTION="Gogs is a self-hosted Git service written in Go"
-HOMEPAGE="https://gogs.io https://github.com/gogs/gogs"
+HOMEPAGE="
+ https://gogs.io
+ https://github.com/gogs/gogs
+"
EGO_SUM=(
"cloud.google.com/go v0.26.0/go.mod"
@@ -439,26 +442,26 @@ EGO_SUM=(
"xorm.io/core v0.7.2/go.mod"
"xorm.io/xorm v0.8.0"
"xorm.io/xorm v0.8.0/go.mod"
- )
+)
+
go-module_set_globals
-SRC_URI="https://github.com/gogs/gogs/archive/v${PV}.tar.gz -> ${P}.tar.gz ${EGO_SUM_SRC_URI}"
+SRC_URI="
+ https://github.com/gogs/gogs/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${EGO_SUM_SRC_URI}
+"
LICENSE="Apache-2.0 BSD MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
IUSE="cert mysql +pam postgres +sqlite"
REQUIRED_USE="|| ( sqlite mysql postgres )"
-PATCHES=( "${FILESDIR}/${P}.patch" )
-
RESTRICT="mirror"
DEPEND="
acct-user/gogs
sqlite? ( dev-db/sqlite:3 )
"
-
RDEPEND="
${DEPEND}
app-shells/bash
@@ -469,24 +472,23 @@ RDEPEND="
postgres? ( dev-db/postgresql[pam?] )
"
+PATCHES=( "${FILESDIR}/${P}.patch" )
FILECAPS=(
cap_net_bind_service+ep usr/bin/gogs
)
src_prepare() {
- mkdir -p "${S}/custom/conf/"
- cp "${S}/conf/app.ini" "${S}/custom/conf/"
-
default
-
- sed -i -e 's:data/gogs.db:database/gogs.db:' "${S}/templates/install.tmpl" || die
+ mkdir -p custom/conf/
+ cp conf/app.ini custom/conf/
+ sed -i 's:data/:database/:' templates/install.tmpl || die
}
src_compile() {
- GOLANG_PKG_TAGS=""
- use cert && GOLANG_PKG_TAGS+=" cert"
- use pam && GOLANG_PKG_TAGS+=" pam"
- go build -tags ${GOLANG_PKG_TAGS} -o gogs
+ local GOLANG_PKG_TAGS=()
+ use cert && GOLANG_PKG_TAGS+=( cert )
+ use pam && GOLANG_PKG_TAGS+=( pam )
+ go build -tags ${GOLANG_PKG_TAGS[@]} -o gogs || die
}
src_install() {
@@ -501,9 +503,7 @@ src_install() {
newinitd "${FILESDIR}/gogs-initd" gogs
# Install HTTPS certs
- if use cert; then
- keepdir /etc/${PN}/https
- fi
+ use cert && keepdir /etc/${PN}/https
# Install configuration files
insinto /etc/${PN}/conf
@@ -530,3 +530,8 @@ src_install() {
keepdir /var/log/${PN}
fowners -R gogs:git /var/log/${PN}
}
+
+pkg_postinst() {
+ ewarn "You will not be able to run gogs via the command line."
+ ewarn "Please use the installed service files."
+}