Browse Source

Bump Gitea version.

master
Rafal Kupiec 3 months ago
parent
commit
8ada92f791
Signed by: belliash <belliash@codingworkshop.eu.org> GPG Key ID: 4E829243E0CFE6B4
2 changed files with 66 additions and 0 deletions
  1. 1
    0
      www-apps/gitea/Manifest
  2. 65
    0
      www-apps/gitea/gitea-1.8.1.ebuild

+ 1
- 0
www-apps/gitea/Manifest View File

@@ -12,3 +12,4 @@ DIST gitea-1.7.1.tar.gz 20834721 BLAKE2B 576d107bbfc495b41b52dad93565010ea8634e3
12 12
 DIST gitea-1.7.2.tar.gz 20841049 BLAKE2B 1f39cf039dec3a76d3df8cf75905ab03bcde83b74bdd1f3c2249065633bd8b3de52ae8adb543b68d65dca35dfb16659120d04b0472ed11798551889851df1dab SHA512 8472effb58cc0c416b229ae3724c4e914afd81f058b06ce0c6ea68667a77eaa122a78b928fd5d4cb2e1b00eac15ec76825cd800c769fdc88796a535206a4dff6
13 13
 DIST gitea-1.7.3.tar.gz 20859030 BLAKE2B 9db5fb7961c97dc20e93bb0800618acfd9715695bd31baa2368d44e69b4e1a369d06ae1b59095ddc51aa42913a2af99b8e1a89d80cfa81827ce66de2663f1350 SHA512 802d4b7c60810a22c0625cb69d2cc83fbb2ff4e0b520c20e2119403d6cfdcdda7ee95bd3a8ab39f3668a259fc0ee5aefdbead80876023a3f6095a37d482ee442
14 14
 DIST gitea-1.8.0.tar.gz 24268907 BLAKE2B b46a17733fc7bd0f228620bdfadf0d596ea56fca6e685afab7734e794c1f87c5e004529ca3d69e907d516bcb83563565b1d8c32501f1c2c0f9295ca028d96ad0 SHA512 eebbe2f77ed2e4c3562f48a6fa647e6f2a0492c5b6ea4f13542a5ef82e94a357a8d53897aa013107b5f735d2aff9d719893b5724de44831c43998c2e9c6e78d7
15
+DIST gitea-1.8.1.tar.gz 24304805 BLAKE2B 4300125da2116218c0609bb8974b2abea22593161dd60e12390eea7e60865df40a089126748b3f5c9e856b2c59fdb6a4b9997c6d0bb9743ceb0c413c41caa903 SHA512 b583ba21ae9c896d527d299d5a14f7b99e40b474da7ca40521487f0459c877da9c21825b40dc0f981af7813bcabca11f62d8076cc1e401adda57d0e0505b96ce

+ 65
- 0
www-apps/gitea/gitea-1.8.1.ebuild View File

@@ -0,0 +1,65 @@
1
+# Copyright 1999-2018 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+
4
+EAPI=6
5
+inherit user systemd golang-build golang-vcs-snapshot
6
+
7
+EGO_PN="code.gitea.io/gitea"
8
+KEYWORDS="~amd64 ~arm"
9
+
10
+DESCRIPTION="A painless self-hosted Git service, written in Go"
11
+HOMEPAGE="https://github.com/go-gitea/gitea"
12
+SRC_URI="https://github.com/go-gitea/gitea/archive/v1.8.1.tar.gz -> ${P}.tar.gz"
13
+
14
+LICENSE="MIT"
15
+SLOT="0"
16
+IUSE=""
17
+
18
+DEPEND="dev-go/go-bindata"
19
+RDEPEND="dev-vcs/git"
20
+
21
+pkg_setup() {
22
+	enewgroup git
23
+	enewuser git -1 /bin/bash /var/lib/gitea git
24
+}
25
+
26
+src_prepare() {
27
+	default
28
+	sed -i -e "s/\"main.Version.*$/\"main.Version=${PV}\"/"\
29
+		-e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN}/Makefile || die
30
+}
31
+
32
+src_compile() {
33
+	GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} generate
34
+	TAGS="bindata pam sqlite" LDFLAGS="" CGO_LDFLAGS="-fno-PIC" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} build
35
+}
36
+
37
+src_install() {
38
+	mkdir -p ${D}/var/lib/gitea/custom
39
+	pushd src/${EGO_PN} || die
40
+	cp -apr options ${D}/var/lib/gitea/custom/
41
+	cp -apr public ${D}/var/lib/gitea/custom/
42
+	cp -apr templates ${D}/var/lib/gitea/custom/
43
+	dobin gitea
44
+	insinto /var/lib/gitea/conf
45
+	newins custom/conf/app.ini.sample app.ini.example
46
+	popd || die
47
+	newinitd "${FILESDIR}"/gitea.initd-r1 gitea
48
+	newconfd "${FILESDIR}"/gitea.confd gitea
49
+	keepdir /var/log/gitea /var/lib/gitea/data
50
+	fowners -R git:git /var/log/gitea /var/lib/gitea/
51
+	systemd_dounit "${FILESDIR}/gitea.service"
52
+}
53
+
54
+pkg_postinst() {
55
+	if [[ ! -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
56
+		elog "No app.ini found, copying initial config over"
57
+		cp "${FILESDIR}"/app.ini "${EROOT}"/var/lib/gitea/conf/ || die
58
+		chown git:git /var/lib/gitea/conf/app.ini
59
+	else
60
+		elog "app.ini found, please check example file for possible changes"
61
+		ewarn "Please note that environment variables have been changed:"
62
+		ewarn "GITEA_WORK_DIR is set to /var/lib/gitea (previous value: unset)"
63
+		ewarn "GITEA_CUSTOM is set to '\$GITEA_WORK_DIR/custom' (previous: /var/lib/gitea)"
64
+	fi
65
+}

Loading…
Cancel
Save