summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mozes <hydrapolic@gmail.com>2019-03-15 10:12:53 +0100
committerPatrice Clement <monsieurp@gentoo.org>2019-03-15 23:42:14 +0100
commit5bd278c49c6680eedced51e9b6d910d7098bf159 (patch)
tree87d74f3741d10b3ab3de7d3f1a7fe1b42f1623d9 /www-apps
parentsci-visualization/gnuplot: amd64 stable wrt bug #677424 (diff)
downloadgentoo-5bd278c49c6680eedced51e9b6d910d7098bf159.tar.gz
gentoo-5bd278c49c6680eedced51e9b6d910d7098bf159.tar.bz2
gentoo-5bd278c49c6680eedced51e9b6d910d7098bf159.zip
www-apps/gitea: bump to 1.7.4.
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/11371 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/gitea/Manifest1
-rw-r--r--www-apps/gitea/files/gitea.initd-r15
-rw-r--r--www-apps/gitea/files/gitea.service8
-rw-r--r--www-apps/gitea/gitea-1.7.4.ebuild67
4 files changed, 76 insertions, 5 deletions
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 5f6259a7c335..4065ddacc5de 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1 +1,2 @@
DIST gitea-1.5.2.tar.gz 18866286 BLAKE2B a9a31fa6a310dcb6debd9399f234262214021d72adda52af959e6d9d692d5902ff6955a9802bf60212cecb2a0146c4905952d44643aa83e49c645d32541907c2 SHA512 ef91c881b3cb81d79d182b78c95624f24d63e21daa2d6e561fca79edba0ad588fae7c55503f900a8f05c566ed3bff92a9c4385fc7e5c701a80749d2a8c58b599
+DIST gitea-1.7.4.tar.gz 20858340 BLAKE2B 81d896d313abe25bc1a5becd16249c2ce39ab45d9f40ccf3a565b6777847c7256d5b131f597be237df57513a207978e23480ad3c6087bbc588afe8bbcd46d5c9 SHA512 eede6d410529b1facf65061256e48fee7d459aa12d8c55346d3ad78004a45b7bf667536979fe92270a85901102fd9cddb8183490e16f912b742e799ca912e370
diff --git a/www-apps/gitea/files/gitea.initd-r1 b/www-apps/gitea/files/gitea.initd-r1
index 837164aa0140..6f957d426c08 100644
--- a/www-apps/gitea/files/gitea.initd-r1
+++ b/www-apps/gitea/files/gitea.initd-r1
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 2016-2018 Gentoo Foundation
+# Copyright 2016-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Gitea, a self-hosted Git service"
@@ -11,7 +11,8 @@ command="/usr/bin/gitea web"
command_args="${command_args:--config /var/lib/gitea/conf/app.ini}"
command_background="true"
start_stop_daemon_args="--user ${user} --group ${group} \
- -e GITEA_WORK_DIR=/var/lib/gitea
+ -e GITEA_WORK_DIR=${GITEA_WORK_DIR:-/var/lib/gitea} \
+ -e GITEA_CUSTOM=${GITEA_CUSTOM:-/var/lib/gitea} \
--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
diff --git a/www-apps/gitea/files/gitea.service b/www-apps/gitea/files/gitea.service
index 3fdbc1fd0c3d..733e05ea1ed3 100644
--- a/www-apps/gitea/files/gitea.service
+++ b/www-apps/gitea/files/gitea.service
@@ -1,6 +1,6 @@
[Unit]
Description=Gitea service
-Documentation=https://gitea.io
+Documentation=https://docs.gitea.io/
AssertPathIsDirectory=/var/lib/gitea
AssertPathIsReadWrite=/var/lib/gitea
@@ -8,13 +8,15 @@ AssertPathIsReadWrite=/var/lib/gitea
After=network.target
Requires=network.target
After=mysqld.service
-Requires=mysqld.service
+After=postgresql.service
+After=memcached.service
+After=redis.service
[Service]
User=git
Group=git
-Environment="GITEA_CUSTOM=/var/lib/gitea"
+Environment="GITEA_WORK_DIR=/var/lib/gitea GITEA_CUSTOM=/var/lib/gitea"
WorkingDirectory=/var/lib/gitea
ExecStart=/usr/bin/gitea web -c /var/lib/gitea/conf/app.ini
diff --git a/www-apps/gitea/gitea-1.7.4.ebuild b/www-apps/gitea/gitea-1.7.4.ebuild
new file mode 100644
index 000000000000..6508562a68bb
--- /dev/null
+++ b/www-apps/gitea/gitea-1.7.4.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit golang-build golang-vcs-snapshot systemd user
+
+EGO_PN="code.gitea.io/gitea"
+KEYWORDS="~amd64 ~arm"
+
+DESCRIPTION="A painless self-hosted Git service, written in Go"
+HOMEPAGE="https://github.com/go-gitea/gitea"
+SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+
+DEPEND="
+ dev-go/go-bindata
+ sys-libs/pam
+"
+RDEPEND="
+ dev-vcs/git
+ sys-libs/pam
+"
+
+pkg_setup() {
+ enewgroup git
+ enewuser git -1 /bin/bash /var/lib/gitea git
+}
+
+src_prepare() {
+ default
+ sed -i -e "s/\"main.Version.*$/\"main.Version=${PV}\"/"\
+ -e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN}/Makefile || die
+}
+
+src_compile() {
+ GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} generate
+ TAGS="bindata pam sqlite" LDFLAGS="" CGO_LDFLAGS="" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} build
+}
+
+src_install() {
+ diropts -m0750 -o git -g git
+ keepdir /var/log/gitea /var/lib/gitea /var/lib/gitea/data
+ pushd src/${EGO_PN} >/dev/null || die
+ dobin gitea
+ insinto /var/lib/gitea/conf
+ newins custom/conf/app.ini.sample app.ini.example
+ popd >/dev/null || die
+ newinitd "${FILESDIR}"/gitea.initd-r1 gitea
+ newconfd "${FILESDIR}"/gitea.confd gitea
+ systemd_dounit "${FILESDIR}/gitea.service"
+}
+
+pkg_postinst() {
+ if [[ ! -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
+ elog "No app.ini found, copying initial config over"
+ cp "${FILESDIR}"/app.ini "${EROOT}"/var/lib/gitea/conf/ || die
+ chown git:git /var/lib/gitea/conf/app.ini
+ elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitea)."
+ else
+ elog "app.ini found, please check example file for possible changes"
+ ewarn "Please note that environment variables have been changed:"
+ ewarn "GITEA_WORK_DIR is set to /var/lib/gitea (previous value: unset)"
+ ewarn "GITEA_CUSTOM is set to '\$GITEA_WORK_DIR/custom' (previous: /var/lib/gitea)"
+ fi
+}