1 |
commit: 83193116fe1109bf7fe52f8d0f5ba78a4af82d40 |
2 |
Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re> |
3 |
AuthorDate: Sun May 31 12:46:49 2020 +0000 |
4 |
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 2 04:35:20 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83193116 |
7 |
|
8 |
www-apps/gitea: bump to 1.11.6 |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Pierre-Olivier Mercier <nemunaire <AT> nemunai.re> |
12 |
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org> |
13 |
|
14 |
www-apps/gitea/Manifest | 1 + |
15 |
www-apps/gitea/gitea-1.11.6.ebuild | 141 +++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 142 insertions(+) |
17 |
|
18 |
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest |
19 |
index 490bacf759c..f868988d0ed 100644 |
20 |
--- a/www-apps/gitea/Manifest |
21 |
+++ b/www-apps/gitea/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST gitea-1.10.6.tar.gz 30147860 BLAKE2B e41e226be820eb0a436783f49bf90a1149eef4e0dde00edc09bc76bb086ea53ff2856563e31ab261e1529a03753785e04c1fe8a02f72eef01a6de173df82098d SHA512 be64f73eb0819c28e444b9dae8d4baecd910aad790efeb515a981542125679257f48a5f4ab1c8453b5372a0c8b1e9b84275e61c89dcd2137d7f7cfe8c71f917b |
24 |
DIST gitea-src-1.11.5.tar.gz 68923871 BLAKE2B 99e189b4a95e9ef6079a5e8455c05209da742499ff1b18e9f5edab2620ff8deb64ca3b7cb59d456b6fe25558602be8e1f8376ec234229c6af7baf24cc6d15023 SHA512 b12bfb2fc13bd0ca5799d52c37b5d2988879041892aa1e160546f7c80e2faef086f76cd753de90f2468fe9f87af6eca64ca21df394db160fc347137fc9a0fd52 |
25 |
+DIST gitea-src-1.11.6.tar.gz 68915319 BLAKE2B 8d8fd34fe38e153aa4af932a83933d0b5ad81a63bf7b7b5be59e64dd82db3282072686979a41fafa3ac2e523f79d6926ed057b2ed18645040bf1c446c6ab04b2 SHA512 57d5214a5e05581c134d42e00ec29fe15f3245a75440fca26c7162937570affc5a2e4ba8e903cb7f15fcb271144183ce5aa473457245f36d52686ea9f1cc93b3 |
26 |
|
27 |
diff --git a/www-apps/gitea/gitea-1.11.6.ebuild b/www-apps/gitea/gitea-1.11.6.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..44802e089f9 |
30 |
--- /dev/null |
31 |
+++ b/www-apps/gitea/gitea-1.11.6.ebuild |
32 |
@@ -0,0 +1,141 @@ |
33 |
+# Copyright 1999-2020 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+if [[ ${PV} != 9999* ]] ; then |
39 |
+ SCM="golang-vcs-snapshot" |
40 |
+else |
41 |
+ SCM="git-r3" |
42 |
+fi |
43 |
+ |
44 |
+inherit fcaps golang-base tmpfiles systemd ${SCM} |
45 |
+unset SCM |
46 |
+ |
47 |
+EGO_PN="code.gitea.io/gitea" |
48 |
+ |
49 |
+DESCRIPTION="A painless self-hosted Git service" |
50 |
+HOMEPAGE="https://gitea.io" |
51 |
+ |
52 |
+if [[ ${PV} != 9999* ]] ; then |
53 |
+ SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz" |
54 |
+ KEYWORDS="~amd64 ~arm ~arm64" |
55 |
+else |
56 |
+ EGIT_REPO_URI="https://github.com/go-gitea/gitea" |
57 |
+ EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}" |
58 |
+ has test ${FEATURES} && EGIT_MIN_CLONE_TYPE="mirror" |
59 |
+fi |
60 |
+ |
61 |
+LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0" |
62 |
+SLOT="0" |
63 |
+IUSE="+acct build-client pam sqlite" |
64 |
+ |
65 |
+BDEPEND="dev-lang/go |
66 |
+ build-client? ( >=net-libs/nodejs-10[npm] )" |
67 |
+DEPEND="pam? ( sys-libs/pam )" |
68 |
+RDEPEND="${DEPEND} |
69 |
+ acct? ( |
70 |
+ acct-group/git |
71 |
+ acct-user/git[gitea] |
72 |
+ ) |
73 |
+ dev-vcs/git" |
74 |
+ |
75 |
+DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md ) |
76 |
+FILECAPS=( cap_net_bind_service+ep usr/bin/gitea ) |
77 |
+S="${WORKDIR}/${P}/src/${EGO_PN}" |
78 |
+ |
79 |
+PATCHES=( "${FILESDIR}/gitea-logflags.patch" ) |
80 |
+ |
81 |
+gitea_make() { |
82 |
+ local gitea_tags=( |
83 |
+ bindata |
84 |
+ $(usev pam) |
85 |
+ $(usex sqlite 'sqlite sqlite_unlock_notify' '') |
86 |
+ ) |
87 |
+ local gitea_settings=( |
88 |
+ "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini" |
89 |
+ "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom" |
90 |
+ "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea" |
91 |
+ ) |
92 |
+ local makeenv=( |
93 |
+ TAGS="${gitea_tags[@]}" |
94 |
+ LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[@]}" |
95 |
+ GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" |
96 |
+ ) |
97 |
+ [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${PV}") |
98 |
+ |
99 |
+ env "${makeenv[@]}" emake -j1 "$@" |
100 |
+} |
101 |
+ |
102 |
+src_prepare() { |
103 |
+ default |
104 |
+ |
105 |
+ local sedcmds=( |
106 |
+ -e "s#^RUN_MODE = dev#RUN_MODE = prod#" |
107 |
+ -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#" |
108 |
+ -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#" |
109 |
+ -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#" |
110 |
+ -e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#" |
111 |
+ -e "s#^MODE = console#MODE = file#" |
112 |
+ -e "s#^LEVEL = Trace#LEVEL = Info#" |
113 |
+ -e "s#^LOG_SQL = true#LOG_SQL = false#" |
114 |
+ -e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#" |
115 |
+ -e "s#^APP_ID =#;APP_ID =#" |
116 |
+ -e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#" |
117 |
+ ) |
118 |
+ |
119 |
+ sed -i "${sedcmds[@]}" custom/conf/app.ini.sample || die |
120 |
+ if use sqlite ; then |
121 |
+ sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die |
122 |
+ fi |
123 |
+ |
124 |
+ # Remove already build assets (like frontend part) |
125 |
+ use build-client && gitea_make clean-all |
126 |
+} |
127 |
+ |
128 |
+src_compile() { |
129 |
+ if use build-client ; then |
130 |
+ gitea_make build |
131 |
+ else |
132 |
+ gitea_make backend |
133 |
+ fi |
134 |
+} |
135 |
+ |
136 |
+src_test() { |
137 |
+ if has network-sandbox ${FEATURES}; then |
138 |
+ einfo "Remove tests which are known to fail with network-sandbox enabled." |
139 |
+ rm ./modules/migrations/github_test.go || die |
140 |
+ fi |
141 |
+ |
142 |
+ if [[ ${PV} != 9999* ]] ; then |
143 |
+ einfo "Remove tests which depend on gitea git-repo." |
144 |
+ rm ./modules/git/blob_test.go || die |
145 |
+ rm ./modules/git/repo_test.go || die |
146 |
+ fi |
147 |
+ |
148 |
+ default |
149 |
+} |
150 |
+ |
151 |
+src_install() { |
152 |
+ dobin gitea |
153 |
+ |
154 |
+ einstalldocs |
155 |
+ |
156 |
+ newconfd "${FILESDIR}/gitea.confd-r1" gitea |
157 |
+ newinitd "${FILESDIR}/gitea.initd-r3" gitea |
158 |
+ newtmpfiles - gitea.conf <<-EOF |
159 |
+ d /run/gitea 0755 git git |
160 |
+ EOF |
161 |
+ systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service |
162 |
+ |
163 |
+ insinto /etc/gitea |
164 |
+ newins custom/conf/app.ini.sample app.ini |
165 |
+ if use acct ; then |
166 |
+ fowners root:git /etc/gitea/{,app.ini} |
167 |
+ fperms g+w,o-rwx /etc/gitea/{,app.ini} |
168 |
+ |
169 |
+ diropts -m0750 -o git -g git |
170 |
+ keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data |
171 |
+ keepdir /var/log/gitea |
172 |
+ fi |
173 |
+} |