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