1 |
commit: 008396f37bda1955855bb58d340da35984d23df7 |
2 |
Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re> |
3 |
AuthorDate: Mon Jun 22 15:41:53 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 16 14:38:41 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=008396f3 |
7 |
|
8 |
www-apps/gitea: bump to 1.11.8 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/727648 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Pierre-Olivier Mercier <nemunaire <AT> nemunai.re> |
13 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
|
15 |
www-apps/gitea/Manifest | 1 + |
16 |
www-apps/gitea/gitea-1.11.8.ebuild | 141 +++++++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 142 insertions(+) |
18 |
|
19 |
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest |
20 |
index 0caedd3fa4b..03f07b0b5f8 100644 |
21 |
--- a/www-apps/gitea/Manifest |
22 |
+++ b/www-apps/gitea/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST gitea-src-1.11.6.tar.gz 68915319 BLAKE2B 8d8fd34fe38e153aa4af932a83933d0b5ad81a63bf7b7b5be59e64dd82db3282072686979a41fafa3ac2e523f79d6926ed057b2ed18645040bf1c446c6ab04b2 SHA512 57d5214a5e05581c134d42e00ec29fe15f3245a75440fca26c7162937570affc5a2e4ba8e903cb7f15fcb271144183ce5aa473457245f36d52686ea9f1cc93b3 |
25 |
+DIST gitea-src-1.11.8.tar.gz 68927493 BLAKE2B 4e1b1d201848227bd5d5bfac5bbddc291e2f14d7262bb2f8353131b6284520ecda3f844e81c23e95c5cd4ef17a6414e0b3c6adf6e6be5c59f7367c19a2e549d8 SHA512 13216a4d98211eb1a5c319992c9c253ce6f7a7a343ebfdca18802eb599f7300a3c23adbba94784f70ca604751ced5aac7d663a210885554c61a24857de79b6e6 |
26 |
|
27 |
diff --git a/www-apps/gitea/gitea-1.11.8.ebuild b/www-apps/gitea/gitea-1.11.8.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..555b0028a9e |
30 |
--- /dev/null |
31 |
+++ b/www-apps/gitea/gitea-1.11.8.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-1.14.0 |
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 |
+} |