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