2
0
Forka 0
This commit is contained in:
Rafal Kupiec 2019-10-17 13:55:11 +02:00
parent 6520754fdd
commit abbd54b5b3
Firmato da: belliash
ID Chiave GPG: 4E829243E0CFE6B4
2 ha cambiato i file con 113 aggiunte e 0 eliminazioni

Vedi File

@ -18,3 +18,4 @@ DIST gitea-1.9.0.tar.gz 24304805 BLAKE2B 4300125da2116218c0609bb8974b2abea225931
DIST gitea-1.9.1.tar.gz 24074441 BLAKE2B 597463b8fcaff0b4b4edbf69ba2ab48cdce5e79ae113fab8b36bb614c1226a5e5513e9e165ae4189efe100c8acfff2f4598f10999d974ed39eb7810403b108db SHA512 6be868415eeb82722c9b3a1341ddc432bc20acba247839b81c38ebb27642b8e8089b6a285042e8e386dfc909c4716194cd17f44598efed25b26773524630458e
DIST gitea-1.9.2.tar.gz 24073823 BLAKE2B ca465a9825ee3fbf90255a529311d899c5d068062f5bd928ea9b24a5af6f1f45ffbd9539d9fd157776282a7b020ac182f3f3be57b5f3c33c8ec13ad3bebca22a SHA512 00c91032948feb76899835e874c5d11828b24d1e112b90d5bc645d6acc9965744123f879562629c8af02285d73e42dda54689697523bd16a5acce69bbed9b989
DIST gitea-1.9.3.tar.gz 24064564 BLAKE2B f65c10d335735e107a8bc24e102c6e3e979516f3c557483af83a49358be7441b12e948b04a540c2981f71eb2424f8205488816251782ab0f132a549ee22c3349 SHA512 331a719cfec73f64650525c17d035c3df1ff23703196a8b0d4495693eecac7cced1f103012b694e8b37b9ee4ebf16f252f303a7525c06512c3124bed66043e27
DIST gitea-1.9.4.tar.gz 25355645 BLAKE2B 69a7237f7bc2d6d90054e67faef110c2750cbca927c149f6c6b3394bef113494cda8f670809c4977c6c5e3c4ea7f609240952b262ea6c4a818c11d58945bc5d8 SHA512 a885567ffcc21ef821348be0b698b5f101bfc46b746603679441bee4c6abe34ea062bd0a2d5fb5c029ce26caa3b70a51c6d9088fdccebb44be74f1e523faf711

Vedi File

@ -0,0 +1,112 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps golang-vcs-snapshot systemd user
EGO_PN="code.gitea.io/gitea"
DESCRIPTION="A painless self-hosted Git service"
HOMEPAGE="https://gitea.io/"
SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64"
IUSE="pam sqlite"
COMMON_DEPEND="pam? ( sys-libs/pam )"
DEPEND="
${COMMON_DEPEND}
dev-go/go-bindata
"
RDEPEND="
${COMMON_DEPEND}
dev-vcs/git[curl,threads]
"
FILECAPS=( cap_net_bind_service+ep usr/bin/gitea )
DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
S="${WORKDIR}/${P}/src/${EGO_PN}"
PATCHES=( "${FILESDIR}/gitea-mod-vendor.patch" )
pkg_setup() {
enewgroup git
enewuser git -1 /bin/bash /var/lib/gitea git
}
gitea_make() {
local my_tags=(
bindata
$(usev pam)
$(usex sqlite 'sqlite sqlite_unlock_notify' '')
)
local my_makeopt=(
DRONE_TAG=${PV}
TAGS="${my_tags[@]}"
)
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" LDFLAGS="-X main.Version=${PV}" emake "${my_makeopt[@]}" "$@"
}
src_prepare() {
default
sed -i \
-e "s#^RUN_MODE = dev#RUN_MODE = prod#" \
-e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#" \
-e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#" \
-e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#" \
-e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#" \
-e "s#^MODE = console#MODE = file#" \
-e "s#^LEVEL = Trace#LEVEL = Info#" \
-e "s#^LOG_SQL = true#LOG_SQL = false#" \
-e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#" \
-e "s#^APP_ID =#;APP_ID =#" \
-e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#" \
custom/conf/app.ini.sample || die
if use sqlite ; then
sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
fi
gitea_make generate
}
src_compile() {
gitea_make build
}
src_test() {
gitea_make test
}
src_install() {
dobin gitea
einstalldocs
newconfd "${FILESDIR}"/gitea.confd-r1 gitea
newinitd "${FILESDIR}"/gitea.initd-r1 gitea
systemd_newunit "${FILESDIR}"/gitea.service-r1 gitea.service
insinto /etc/gitea
newins custom/conf/app.ini.sample app.ini
fowners root:git /etc/gitea/{,app.ini}
fperms g+w,o-rwx /etc/gitea/{,app.ini}
diropts -m0750 -o git -g git
keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
keepdir /var/log/gitea
}
pkg_postinst() {
fcaps_pkg_postinst
if [[ -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini."
ewarn "Please move your configuration from ${EROOT}/var/lib/gitea/conf/app.ini"
ewarn "and adapt the gitea-repositories hooks and ssh authorized_keys."
ewarn "Depending on your configuration you should run something like:"
ewarn "sed -i -e 's#${EROOT}/var/lib/gitea/conf/app.ini#${EROOT}/etc/gitea/app.ini#' \\"
ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\"
ewarn " /var/lib/gitea/.ssh/authorized_keys"
fi
}