1 |
commit: 8ad2c3433d3cea830c12a124c8755c576d54d23c |
2 |
Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re> |
3 |
AuthorDate: Tue Apr 23 10:32:38 2019 +0000 |
4 |
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 23 15:19:45 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ad2c343 |
7 |
|
8 |
www-apps/gitea: bump to 1.8.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
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.8.0.ebuild | 85 +++++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 86 insertions(+) |
17 |
|
18 |
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest |
19 |
index 9cdebf87da2..2d8c7032299 100644 |
20 |
--- a/www-apps/gitea/Manifest |
21 |
+++ b/www-apps/gitea/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST gitea-1.7.4.tar.gz 20858340 BLAKE2B 81d896d313abe25bc1a5becd16249c2ce39ab45d9f40ccf3a565b6777847c7256d5b131f597be237df57513a207978e23480ad3c6087bbc588afe8bbcd46d5c9 SHA512 eede6d410529b1facf65061256e48fee7d459aa12d8c55346d3ad78004a45b7bf667536979fe92270a85901102fd9cddb8183490e16f912b742e799ca912e370 |
24 |
DIST gitea-1.7.6.tar.gz 20868421 BLAKE2B bdd623c09f628a56df9e2c36958d94582707ffeaeb45960fd1ea0d50a8083458683f28ab2c398ac1e939ba6b011ba6a83cc02abd98e9b9ff131bda8fd224c66c SHA512 ad39969b5f1246875c006c72f2ea711772f29bfb9c687510efbd2089c9f88e9d218d14b03111715179b2e0f72f85731f22dd46fc022e224be73b7e73e798236b |
25 |
+DIST gitea-1.8.0.tar.gz 24268907 BLAKE2B b46a17733fc7bd0f228620bdfadf0d596ea56fca6e685afab7734e794c1f87c5e004529ca3d69e907d516bcb83563565b1d8c32501f1c2c0f9295ca028d96ad0 SHA512 eebbe2f77ed2e4c3562f48a6fa647e6f2a0492c5b6ea4f13542a5ef82e94a357a8d53897aa013107b5f735d2aff9d719893b5724de44831c43998c2e9c6e78d7 |
26 |
|
27 |
diff --git a/www-apps/gitea/gitea-1.8.0.ebuild b/www-apps/gitea/gitea-1.8.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..f62591346a4 |
30 |
--- /dev/null |
31 |
+++ b/www-apps/gitea/gitea-1.8.0.ebuild |
32 |
@@ -0,0 +1,85 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+inherit golang-vcs-snapshot systemd user |
38 |
+ |
39 |
+EGO_PN="code.gitea.io/gitea" |
40 |
+KEYWORDS="~amd64 ~arm" |
41 |
+ |
42 |
+DESCRIPTION="A painless self-hosted Git service" |
43 |
+HOMEPAGE="https://gitea.io" |
44 |
+SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="MIT" |
47 |
+SLOT="0" |
48 |
+IUSE="pam sqlite" |
49 |
+ |
50 |
+COMMON_DEPEND="pam? ( sys-libs/pam )" |
51 |
+DEPEND="${COMMON_DEPEND} |
52 |
+ dev-go/go-bindata" |
53 |
+RDEPEND="${COMMON_DEPEND} |
54 |
+ dev-vcs/git" |
55 |
+ |
56 |
+DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md ) |
57 |
+S="${WORKDIR}/${P}/src/${EGO_PN}" |
58 |
+ |
59 |
+pkg_setup() { |
60 |
+ enewgroup git |
61 |
+ enewuser git -1 /bin/bash /var/lib/gitea git |
62 |
+} |
63 |
+ |
64 |
+gitea_make() { |
65 |
+ local my_tags=( |
66 |
+ bindata |
67 |
+ $(usev pam) |
68 |
+ $(usex sqlite 'sqlite sqlite_unlock_notify' '') |
69 |
+ ) |
70 |
+ local my_makeopt=( |
71 |
+ DRONE_TAG=${PV} |
72 |
+ TAGS="${my_tags[@]}" |
73 |
+ ) |
74 |
+ GOPATH=${WORKDIR}/${P}:$(get_golibdir_gopath) emake "${my_makeopt[@]}" "$1" |
75 |
+} |
76 |
+ |
77 |
+src_compile() { |
78 |
+ gitea_make generate |
79 |
+ gitea_make build |
80 |
+} |
81 |
+ |
82 |
+src_test() { |
83 |
+ gitea_make test |
84 |
+} |
85 |
+ |
86 |
+src_install() { |
87 |
+ einstalldocs |
88 |
+ dobin gitea |
89 |
+ newconfd "${FILESDIR}"/gitea.confd-r1 gitea |
90 |
+ newinitd "${FILESDIR}"/gitea.initd-r2 gitea |
91 |
+ systemd_newunit "${FILESDIR}"/gitea.service-r1 gitea.service |
92 |
+ diropts -m0750 -o git -g git |
93 |
+ keepdir /etc/gitea |
94 |
+ keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data |
95 |
+ keepdir /var/log/gitea |
96 |
+} |
97 |
+ |
98 |
+pkg_postinst() { |
99 |
+ ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini." |
100 |
+ ewarn "Please adapt the gitea-repositories hooks and ssh authorized_keys." |
101 |
+ ewarn "Depending on your configuration you should run something like:" |
102 |
+ ewarn "sed -i -e 's#/var/lib/gitea/conf/app.ini#/etc/gitea/app.ini#' \\" |
103 |
+ ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\" |
104 |
+ ewarn " /var/lib/gitea/.ssh/authorized_keys" |
105 |
+ |
106 |
+ if [[ ! -e "${EROOT}/etc/gitea/app.ini" ]]; then |
107 |
+ elog "No app.ini found, copying initial config over" |
108 |
+ cp "${FILESDIR}"/app.ini "${EROOT}"/etc/gitea/ || die |
109 |
+ chown git:git "${EROOT}"/etc/gitea/app.ini || die |
110 |
+ elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitea)." |
111 |
+ else |
112 |
+ elog "app.ini found, please check the sample file for possible changes" |
113 |
+ ewarn "Please note that environment variables have been changed:" |
114 |
+ ewarn "GITEA_WORK_DIR is set to /var/lib/gitea (previous value: unset)" |
115 |
+ ewarn "GITEA_CUSTOM is set to '\$GITEA_WORK_DIR/custom' (previous: /var/lib/gitea)" |
116 |
+ fi |
117 |
+} |