Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/
Date: Thu, 27 Jun 2019 14:49:30
Message-Id: 1561646962.c69cf511301d84dd601832dcd5d2f16978d20517.mgorny@gentoo
1 commit: c69cf511301d84dd601832dcd5d2f16978d20517
2 Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
3 AuthorDate: Fri Jun 21 12:07:02 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 27 14:49:22 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c69cf511
7
8 www-apps/gitea: bump to 1.8.3
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.11
11 Signed-off-by: Pierre-Olivier Mercier <nemunaire <AT> nemunai.re>
12 Closes: https://github.com/gentoo/gentoo/pull/12298
13 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
14
15 www-apps/gitea/Manifest | 1 +
16 www-apps/gitea/gitea-1.8.3.ebuild | 104 ++++++++++++++++++++++++++++++++++++++
17 2 files changed, 105 insertions(+)
18
19 diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
20 index 7b0f2c8349b..131fa9008c2 100644
21 --- a/www-apps/gitea/Manifest
22 +++ b/www-apps/gitea/Manifest
23 @@ -1,2 +1,3 @@
24 DIST gitea-1.8.0.tar.gz 24268907 BLAKE2B b46a17733fc7bd0f228620bdfadf0d596ea56fca6e685afab7734e794c1f87c5e004529ca3d69e907d516bcb83563565b1d8c32501f1c2c0f9295ca028d96ad0 SHA512 eebbe2f77ed2e4c3562f48a6fa647e6f2a0492c5b6ea4f13542a5ef82e94a357a8d53897aa013107b5f735d2aff9d719893b5724de44831c43998c2e9c6e78d7
25 DIST gitea-1.8.2.tar.gz 24321492 BLAKE2B 48a718edd1d607e4f8ee2a301bdd907f2a233be515fa327eac9cfb50cdbc024e5f90e6e86e95056c256cb35497c5a3b2ab5fa4a068a22b28c1a3d2b94780da7a SHA512 23ef63c1cea276800a19fe04b87b4baa421e1202260b4ec55614a77ee54c0bc9e5db6dad7f98791c4d902b2d4cb15f4facc4d201631cf2ef7cefd0ff996753be
26 +DIST gitea-1.8.3.tar.gz 24320679 BLAKE2B 9ef901ef7e1cb6ffa9a2aa082798b7a18ac2a6fdb4379082df3f942d767a27fd3915c7a4d2cb1af6f502a8cde3c1c98557c42d4c0ef60be7bdad78d8931035e0 SHA512 f6019fbfc056e4c7176222ccaca1cf638bd1f52323de54fcddc618129aeb778674f6e305de60e7d17b69505ad65439445ee6b5e368afdf0a6fbace7407acb495
27
28 diff --git a/www-apps/gitea/gitea-1.8.3.ebuild b/www-apps/gitea/gitea-1.8.3.ebuild
29 new file mode 100644
30 index 00000000000..bdefa9b6352
31 --- /dev/null
32 +++ b/www-apps/gitea/gitea-1.8.3.ebuild
33 @@ -0,0 +1,104 @@
34 +# Copyright 1999-2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +inherit golang-vcs-snapshot systemd user
39 +
40 +EGO_PN="code.gitea.io/gitea"
41 +
42 +DESCRIPTION="A painless self-hosted Git service"
43 +HOMEPAGE="https://gitea.io"
44 +SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +LICENSE="MIT"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~arm64"
49 +IUSE="pam sqlite"
50 +
51 +COMMON_DEPEND="pam? ( sys-libs/pam )"
52 +DEPEND="${COMMON_DEPEND}
53 + dev-go/go-bindata"
54 +RDEPEND="${COMMON_DEPEND}
55 + dev-vcs/git"
56 +
57 +DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
58 +S="${WORKDIR}/${P}/src/${EGO_PN}"
59 +
60 +pkg_setup() {
61 + enewgroup git
62 + enewuser git -1 /bin/bash /var/lib/gitea git
63 +}
64 +
65 +gitea_make() {
66 + local my_tags=(
67 + bindata
68 + $(usev pam)
69 + $(usex sqlite 'sqlite sqlite_unlock_notify' '')
70 + )
71 + local my_makeopt=(
72 + DRONE_TAG=${PV}
73 + TAGS="${my_tags[@]}"
74 + )
75 + GOPATH=${WORKDIR}/${P}:$(get_golibdir_gopath) emake "${my_makeopt[@]}" "$@"
76 +}
77 +
78 +src_prepare() {
79 + default
80 + sed -i \
81 + -e "s#^RUN_MODE = dev#RUN_MODE = prod#" \
82 + -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#" \
83 + -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#" \
84 + -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#" \
85 + -e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#" \
86 + -e "s#^MODE = console#MODE = file#" \
87 + -e "s#^LEVEL = Trace#LEVEL = Info#" \
88 + -e "s#^LOG_SQL = true#LOG_SQL = false#" \
89 + -e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#" \
90 + -e "s#^APP_ID =#;APP_ID =#" \
91 + -e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#" \
92 + custom/conf/app.ini.sample || die
93 + if use sqlite ; then
94 + sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
95 + fi
96 +
97 + gitea_make generate
98 +}
99 +
100 +src_compile() {
101 + gitea_make build
102 +}
103 +
104 +src_test() {
105 + gitea_make test
106 +}
107 +
108 +src_install() {
109 + dobin gitea
110 +
111 + einstalldocs
112 +
113 + newconfd "${FILESDIR}"/gitea.confd-r1 gitea
114 + newinitd "${FILESDIR}"/gitea.initd-r3 gitea
115 + systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
116 +
117 + insinto /etc/gitea
118 + newins custom/conf/app.ini.sample app.ini
119 + fowners root:git /etc/gitea/{,app.ini}
120 + fperms g+w,o-rwx /etc/gitea/{,app.ini}
121 +
122 + diropts -m0750 -o git -g git
123 + keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
124 + keepdir /var/log/gitea
125 +}
126 +
127 +pkg_postinst() {
128 + if [[ -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
129 + ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini."
130 + ewarn "Please move your configuration from ${EROOT}/var/lib/gitea/conf/app.ini"
131 + ewarn "and adapt the gitea-repositories hooks and ssh authorized_keys."
132 + ewarn "Depending on your configuration you should run something like:"
133 + ewarn "sed -i -e 's#${EROOT}/var/lib/gitea/conf/app.ini#${EROOT}/etc/gitea/app.ini#' \\"
134 + ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\"
135 + ewarn " /var/lib/gitea/.ssh/authorized_keys"
136 + fi
137 +}