Browse Source

Bump gitea

master
Rafal Kupiec 9 months ago
parent
commit
adc3dce90c
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.7.3.ebuild

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

@@ -10,3 +10,4 @@ DIST gitea-1.6.2.tar.gz 19505163 BLAKE2B e1385fc2757928d3ac1f484bba14939bfe5dbb5
DIST gitea-1.7.0.tar.gz 20829587 BLAKE2B c7450886981e416ccc5a7976ff8d7ffb76d53e6c8238e5bcabdfa66d3493038b5343cce04b2fd3f822db0e9d1fdb4a14943ac63f893a0e0a2a6ad930359e10bf SHA512 ee9cc316572c8a2330ca3b06c0a288c29d86898874e9a6b6e6608c62064c5dc8324f96433ccfe160c07301e5dbdb170a5e01a31f1317881712b8e26bc407ccac
DIST gitea-1.7.1.tar.gz 20834721 BLAKE2B 576d107bbfc495b41b52dad93565010ea8634e3b8907f5ebbbf7f8f404d0b0ab2264777587b9c3258049a31fdfaea585ed51b81a2834a486381563decfeee808 SHA512 b8e9fba09d34c8929d3ad04417a106a0c3b4b4d0982a7d4c92c764113d29a2e2016a9bee378955dbb9d3839850e481cdad0e94ed1b700c9eda85f63a0ada8e78
DIST gitea-1.7.2.tar.gz 20841049 BLAKE2B 1f39cf039dec3a76d3df8cf75905ab03bcde83b74bdd1f3c2249065633bd8b3de52ae8adb543b68d65dca35dfb16659120d04b0472ed11798551889851df1dab SHA512 8472effb58cc0c416b229ae3724c4e914afd81f058b06ce0c6ea68667a77eaa122a78b928fd5d4cb2e1b00eac15ec76825cd800c769fdc88796a535206a4dff6
DIST gitea-1.7.3.tar.gz 20859030 BLAKE2B 9db5fb7961c97dc20e93bb0800618acfd9715695bd31baa2368d44e69b4e1a369d06ae1b59095ddc51aa42913a2af99b8e1a89d80cfa81827ce66de2663f1350 SHA512 802d4b7c60810a22c0625cb69d2cc83fbb2ff4e0b520c20e2119403d6cfdcdda7ee95bd3a8ab39f3668a259fc0ee5aefdbead80876023a3f6095a37d482ee442

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

@@ -0,0 +1,65 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
inherit user systemd golang-build golang-vcs-snapshot

EGO_PN="code.gitea.io/gitea"
KEYWORDS="~amd64 ~arm"

DESCRIPTION="A painless self-hosted Git service, written in Go"
HOMEPAGE="https://github.com/go-gitea/gitea"
SRC_URI="https://github.com/go-gitea/gitea/archive/v1.7.3.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
IUSE=""

DEPEND="dev-go/go-bindata"
RDEPEND="dev-vcs/git"

pkg_setup() {
enewgroup git
enewuser git -1 /bin/bash /var/lib/gitea git
}

src_prepare() {
default
sed -i -e "s/\"main.Version.*$/\"main.Version=${PV}\"/"\
-e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN}/Makefile || die
}

src_compile() {
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} generate
TAGS="bindata pam sqlite" LDFLAGS="" CGO_LDFLAGS="-fno-PIC" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} build
}

src_install() {
mkdir -p ${D}/var/lib/gitea/custom
pushd src/${EGO_PN} || die
cp -apr options ${D}/var/lib/gitea/custom/
cp -apr public ${D}/var/lib/gitea/custom/
cp -apr templates ${D}/var/lib/gitea/custom/
dobin gitea
insinto /var/lib/gitea/conf
newins custom/conf/app.ini.sample app.ini.example
popd || die
newinitd "${FILESDIR}"/gitea.initd-r1 gitea
newconfd "${FILESDIR}"/gitea.confd gitea
keepdir /var/log/gitea /var/lib/gitea/data
fowners -R git:git /var/log/gitea /var/lib/gitea/
systemd_dounit "${FILESDIR}/gitea.service"
}

pkg_postinst() {
if [[ ! -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
elog "No app.ini found, copying initial config over"
cp "${FILESDIR}"/app.ini "${EROOT}"/var/lib/gitea/conf/ || die
chown git:git /var/lib/gitea/conf/app.ini
else
elog "app.ini found, please check example file for possible changes"
ewarn "Please note that environment variables have been changed:"
ewarn "GITEA_WORK_DIR is set to /var/lib/gitea (previous value: unset)"
ewarn "GITEA_CUSTOM is set to '\$GITEA_WORK_DIR/custom' (previous: /var/lib/gitea)"
fi
}

Loading…
Cancel
Save