Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/
Date: Wed, 31 Mar 2021 07:40:41
Message-Id: 1617176417.4409b74a56c8a351b643d7fdb407ac557d2494b6.juippis@gentoo
1 commit: 4409b74a56c8a351b643d7fdb407ac557d2494b6
2 Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
3 AuthorDate: Thu Mar 25 09:37:24 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 31 07:40:17 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4409b74a
7
8 www-apps/gitea: bump to 1.13.6
9
10 Package-Manager: Portage-3.0.13, Repoman-3.0.2
11 Signed-off-by: Pierre-Olivier Mercier <nemunaire <AT> nemunai.re>
12 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
13
14 www-apps/gitea/Manifest | 1 +
15 www-apps/gitea/gitea-1.13.6.ebuild | 129 +++++++++++++++++++++++++++++++++++++
16 2 files changed, 130 insertions(+)
17
18 diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
19 index 4088ae9d3ca..97f9a4319ab 100644
20 --- a/www-apps/gitea/Manifest
21 +++ b/www-apps/gitea/Manifest
22 @@ -1 +1,2 @@
23 DIST gitea-1.13.4.tar.gz 150805886 BLAKE2B c639043cc5afe6f35015b8c5d44f3b46222cf6c418d80f27257bd697d12f1315f126d9406c953047e4d595284649fac0c057fc6e96a210906e839aa76da05b3b SHA512 bfa740214f22fd4e74a236510a8ccafc6369c293e409260ccc598df835c8a7ef552713c6760f4bf4f1b8ba2321ff1e5c7686b010d7bb307da3ff9901147cbea5
24 +DIST gitea-1.13.6.tar.gz 150821162 BLAKE2B ac000b26c8c125874fa6b2d93510d530da4ed446d93ff724e9e9af0e4467d22a3377b4484e2eb846dd0a163a0a9bbfc429d9fea56352c0ff59291403f90dac60 SHA512 bcdf7906649ba1e7ee2519819c899e441fc8169cbf38f4ee0b66191586ae566e542889616f328bae5bb0be80c3b3eab2d120152bc515783209cfb0080795113a
25
26 diff --git a/www-apps/gitea/gitea-1.13.6.ebuild b/www-apps/gitea/gitea-1.13.6.ebuild
27 new file mode 100644
28 index 00000000000..a68755728ea
29 --- /dev/null
30 +++ b/www-apps/gitea/gitea-1.13.6.ebuild
31 @@ -0,0 +1,129 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +inherit fcaps go-module tmpfiles systemd
37 +MY_PV="${PV/_rc/-rc}"
38 +
39 +DESCRIPTION="A painless self-hosted Git service"
40 +HOMEPAGE="https://gitea.io"
41 +
42 +if [[ ${PV} != 9999* ]] ; then
43 + SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${MY_PV}/gitea-src-${MY_PV}.tar.gz -> ${P}.tar.gz"
44 + KEYWORDS="~amd64 ~arm ~arm64"
45 + S="${WORKDIR}"
46 +else
47 + EGIT_REPO_URI="https://github.com/go-gitea/gitea"
48 + inherit git-r3
49 + S="${WORKDIR}/${P}"
50 +fi
51 +
52 +LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
53 +SLOT="0"
54 +IUSE="+acct build-client pam sqlite"
55 +
56 +BDEPEND="build-client? ( >=net-libs/nodejs-10[npm] )"
57 +COMMON_DEPEND="
58 + acct? (
59 + acct-group/git
60 + acct-user/git[gitea] )
61 + pam? ( sys-libs/pam )"
62 +DEPEND="${COMMON_DEPEND}"
63 +RDEPEND="${COMMON_DEPEND}
64 + dev-vcs/git"
65 +
66 +DOCS=(
67 + custom/conf/app.example.ini CONTRIBUTING.md README.md
68 +)
69 +FILECAPS=(
70 + cap_net_bind_service+ep usr/bin/gitea
71 +)
72 +
73 +RESTRICT="test"
74 +QA_PRESTRIPPED="usr/bin/gitea"
75 +
76 +src_prepare() {
77 + default
78 +
79 + local sedcmds=(
80 + -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
81 + -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
82 + -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#"
83 + -e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#"
84 + -e "s#^MODE = console#MODE = file#"
85 + -e "s#^LEVEL = Trace#LEVEL = Info#"
86 + -e "s#^LOG_SQL = true#LOG_SQL = false#"
87 + -e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#"
88 + )
89 +
90 + sed -i "${sedcmds[@]}" custom/conf/app.example.ini || die
91 + if use sqlite ; then
92 + sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.example.ini || die
93 + fi
94 +
95 + einfo "Remove tests which are known to fail with network-sandbox enabled."
96 + rm ./modules/migrations/github_test.go || die
97 +
98 + einfo "Remove tests which depend on gitea git-repo."
99 + rm ./modules/git/blob_test.go || die
100 + rm ./modules/git/repo_test.go || die
101 +
102 + # Remove already build assets (like frontend part)
103 + use build-client && emake clean-all
104 +}
105 +
106 +src_compile() {
107 + local gitea_tags=(
108 + bindata
109 + $(usev pam)
110 + $(usex sqlite 'sqlite sqlite_unlock_notify' '')
111 + )
112 + local gitea_settings=(
113 + "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini"
114 + "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom"
115 + "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea"
116 + )
117 + local makeenv=(
118 + TAGS="${gitea_tags[*]}"
119 + LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[*]}"
120 + )
121 + [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${MY_PV}")
122 +
123 + if use build-client; then
124 + # -j1 as Makefile doesn't handle dependancy correctly, and is not
125 + # useful as golang compiler don't use this info.
126 + env "${makeenv[@]}" emake -j1 build
127 + else
128 + env "${makeenv[@]}" emake backend
129 + fi
130 +}
131 +
132 +src_install() {
133 + dobin gitea
134 +
135 + einstalldocs
136 +
137 + newconfd "${FILESDIR}/gitea.confd-r1" gitea
138 + newinitd "${FILESDIR}/gitea.initd-r3" gitea
139 + newtmpfiles - gitea.conf <<-EOF
140 + d /run/gitea 0755 git git
141 + EOF
142 + systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
143 +
144 + insinto /etc/gitea
145 + newins custom/conf/app.example.ini app.ini
146 + if use acct ; then
147 + fowners root:git /etc/gitea/{,app.ini}
148 + fperms g+w,o-rwx /etc/gitea/{,app.ini}
149 +
150 + diropts -m0750 -o git -g git
151 + keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
152 + keepdir /var/log/gitea
153 + fi
154 +}
155 +
156 +pkg_postinst() {
157 + fcaps_pkg_postinst
158 + go-module_pkg_postinst
159 + tmpfiles_process gitea.conf
160 +}