From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-934189-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 39F56139083
	for <garchives@archives.gentoo.org>; Fri, 24 Feb 2017 10:59:27 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 79114E0C4F;
	Fri, 24 Feb 2017 10:59:26 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 47E76E0C4F
	for <gentoo-commits@lists.gentoo.org>; Fri, 24 Feb 2017 10:59:26 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id F3A7C33D3CE
	for <gentoo-commits@lists.gentoo.org>; Fri, 24 Feb 2017 10:59:24 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 9DC755288
	for <gentoo-commits@lists.gentoo.org>; Fri, 24 Feb 2017 10:59:22 +0000 (UTC)
From: "Manuel Rüger" <mrueg@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Manuel Rüger" <mrueg@gentoo.org>
Message-ID: <1487933737.3f36d5e6b5939b8cc4ffc8c71062c55b7f36fac8.mrueg@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/
X-VCS-Repository: repo/gentoo
X-VCS-Files: www-apps/gitea/Manifest www-apps/gitea/gitea-1.0.2.ebuild
X-VCS-Directories: www-apps/gitea/
X-VCS-Committer: mrueg
X-VCS-Committer-Name: Manuel Rüger
X-VCS-Revision: 3f36d5e6b5939b8cc4ffc8c71062c55b7f36fac8
X-VCS-Branch: master
Date: Fri, 24 Feb 2017 10:59:22 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 6aec7f40-19ca-4ed8-9eb7-88270e2bfcde
X-Archives-Hash: a1d7a2f96769ece125013f606b0ffb11

commit:     3f36d5e6b5939b8cc4ffc8c71062c55b7f36fac8
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 24 10:55:37 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Fri Feb 24 10:55:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f36d5e6

www-apps/gitea: Version bump to 1.0.2

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 www-apps/gitea/Manifest           |  1 +
 www-apps/gitea/gitea-1.0.2.ebuild | 70 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)

diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 9f0ee2d0b6..1b2415b83d 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1,2 +1,3 @@
 DIST gitea-1.0.0.tar.gz 13444004 SHA256 3ad67b91f44e0b60739c57f42c880276686347f76e5993f9d95b99ab4f67185c SHA512 5047256cd02a5592a41600abdcb10a3ffee42dda7bd9696d60e8a926f0846098a6686de941feefc52b4070ed9842a744a2f5765c8a1e6ea26d5a63cca2fa96a2 WHIRLPOOL 1cf2205ac0cbcccb56f32101218780c250ad947ad961fcfecc5ceb5be56446a554d5cb2852569ff88fbc218eddc4bac2efd9c392fc53b2830d900b7dd76c0e99
 DIST gitea-1.0.1.tar.gz 13444004 SHA256 3ad67b91f44e0b60739c57f42c880276686347f76e5993f9d95b99ab4f67185c SHA512 5047256cd02a5592a41600abdcb10a3ffee42dda7bd9696d60e8a926f0846098a6686de941feefc52b4070ed9842a744a2f5765c8a1e6ea26d5a63cca2fa96a2 WHIRLPOOL 1cf2205ac0cbcccb56f32101218780c250ad947ad961fcfecc5ceb5be56446a554d5cb2852569ff88fbc218eddc4bac2efd9c392fc53b2830d900b7dd76c0e99
+DIST gitea-1.0.2.tar.gz 13448604 SHA256 f75e220f8c44a9b7c67d2d5339479e690df9f03ec3337eede3aab0c7e8e55c87 SHA512 1826e60961adc585fd54a2c913e6cfaa9754052a932981f83eb6a1f2521d09eb7165545f80494439763c8f13bb1f4ffc24b791162cae7b739fd9eb96f7db530c WHIRLPOOL 3afcfbf4d15b94b4b8e5fde511626ce6acfbf201a58b54f3cd077b6c6487f62b3a0b3e4ef7c3c4526a432e0aa4833e038ca7d69e2e09cf9fe329ea65607f42ab

diff --git a/www-apps/gitea/gitea-1.0.2.ebuild b/www-apps/gitea/gitea-1.0.2.ebuild
new file mode 100644
index 0000000000..cadd77f668
--- /dev/null
+++ b/www-apps/gitea/gitea-1.0.2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="code.gitea.io/gitea/..."
+EGIT_COMMIT="e2c8d6fcb2c4073ed5cf164d88e7b5d44d95943c"
+ARCHIVE_URI="https://github.com/go-gitea/gitea/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~arm"
+
+DESCRIPTION="A painless self-hosted Git service, written in Go"
+HOMEPAGE="https://github.com/go-gitea/gitea"
+SRC_URI="${ARCHIVE_URI}"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-go/go-bindata"
+RDEPEND="dev-vcs/git"
+
+pkg_setup() {
+	enewgroup git
+	enewuser git -1 /bin/bash /var/lib/gitea git
+}
+
+src_prepare() {
+	default
+	local GITEA_PREFIX=${EPREFIX}/var/lib/gitea
+	sed -i -e "s/git rev-parse --short HEAD/echo ${EGIT_COMMIT:0:7}/"\
+		-e "s/^LDFLAGS += -X \"main.Version.*$/LDFLAGS += -X \"main.Version=${PV}\"/"\
+		-e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN%/*}/Makefile || die
+	sed -i -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${GITEA_PREFIX}/data#"\
+		-e "s#^PATH = data/gitea.db#PATH = ${GITEA_PREFIX}/data/gitea.db#"\
+		-e "s#^PROVIDER_CONFIG = data/sessions#PROVIDER_CONFIG = ${GITEA_PREFIX}/data/sessions#"\
+		-e "s#^AVATAR_UPLOAD_PATH = data/avatars#AVATAR_UPLOAD_PATH = ${GITEA_PREFIX}/data/avatars#"\
+		-e "s#^TEMP_PATH = data/tmp/uploads#TEMP_PATH = ${GITEA_PREFIX}/data/tmp/uploads#"\
+		-e "s#^PATH = data/attachments#PATH = ${GITEA_PREFIX}/data/attachments#"\
+		-e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#" src/${EGO_PN%/*}/conf/app.ini || die
+}
+
+src_compile() {
+	GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN%/*} generate
+	TAGS="bindata pam sqlite" LDFLAGS="" CGO_LDFLAGS="-fno-PIC" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN%/*} build
+}
+
+src_install() {
+	pushd src/${EGO_PN%/*} || die
+	dobin gitea
+	insinto /var/lib/gitea/conf
+	newins conf/app.ini app.ini.example
+	popd || die
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/gitea.logrotated gitea
+	newinitd "${FILESDIR}"/gitea.initd gitea
+	newconfd "${FILESDIR}"/gitea.confd gitea
+	keepdir /var/log/gitea /var/lib/gitea/data
+	fowners -R git:git /var/log/gitea /var/lib/gitea/
+}
+
+pkg_postinst() {
+	if [[ ! -e ${EROOT}/var/lib/gitea/conf/app.ini ]]; then
+		elog "No app.ini found, copying the example over"
+		cp "${EROOT}"/var/lib/gitea/conf/app.ini{.example,} || die
+	else
+		elog "app.ini found, please check example file for possible changes"
+	fi
+}