-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
www-apps/gitea: bump to 1.10 + add live ebuild
Package-Manager: Portage-2.3.76, Repoman-2.3.18 Signed-off-by: Felix Neumärker <xdch47@posteo.de>
- Loading branch information
Showing
4 changed files
with
386 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DIST gitea-1.10.0.tar.gz 28905929 BLAKE2B ddf45483784ebf2d300d7f957e355f20c56e0e31825b3a290935ef9d8b7a2b0b154769b44eb270c9bb3165b8297cc1d8b51e9e660828eb95ab019b4857f8c37a SHA512 3bd99ee7289b6a0035d0a6da868562692fa9941a4f14d7555044c06efc7165615dc95547713e352d5cfcd7817596a9f4b24c5fa28c90066f4586ccb44a637d08 | ||
DIST gitea-1.8.3.tar.gz 24320679 BLAKE2B 9ef901ef7e1cb6ffa9a2aa082798b7a18ac2a6fdb4379082df3f942d767a27fd3915c7a4d2cb1af6f502a8cde3c1c98557c42d4c0ef60be7bdad78d8931035e0 SHA512 f6019fbfc056e4c7176222ccaca1cf638bd1f52323de54fcddc618129aeb778674f6e305de60e7d17b69505ad65439445ee6b5e368afdf0a6fbace7407acb495 | ||
DIST gitea-1.9.5.tar.gz 25355286 BLAKE2B 8b733651de64fcafa7b41a6fc812fcad8ac7311a7e7acc679ec7dab759175ec13a096902aece209a3fef31eefd3a99493e13f7c9792e1e41b5a1c3376680d3ca SHA512 f7a04d3bb37a33da15290355f3f02ff4c1b737e8458cf65f731c870ac9e452243b1fdacc5f74accf963fb00cdd200dd31191058eb1d6dda8b1033846a961c7d3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Copyright 1999-2019 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
if [[ ${PV} != 9999* ]] ; then | ||
SCM="golang-vcs-snapshot" | ||
else | ||
SCM="git-r3" | ||
fi | ||
|
||
inherit golang-base tmpfiles systemd ${SCM} | ||
unset SCM | ||
|
||
EGO_PN="code.gitea.io/gitea" | ||
|
||
DESCRIPTION="A painless self-hosted Git service" | ||
HOMEPAGE="https://gitea.io" | ||
|
||
if [[ ${PV} != 9999* ]] ; then | ||
SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
KEYWORDS="~amd64 ~arm ~arm64" | ||
else | ||
EGIT_REPO_URI="https://github.com/go-gitea/gitea" | ||
EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}" | ||
has test ${FEATURES} && EGIT_MIN_CLONE_TYPE="mirror" | ||
fi | ||
|
||
LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0" | ||
SLOT="0" | ||
IUSE="+acct pam sqlite" | ||
|
||
BDEPEND="dev-lang/go" | ||
COMMON_DEPEND=" | ||
acct? ( | ||
acct-group/git | ||
acct-user/git[gitea] | ||
) | ||
pam? ( sys-libs/pam )" | ||
DEPEND="${COMMON_DEPEND}" | ||
RDEPEND="${COMMON_DEPEND} | ||
dev-vcs/git" | ||
|
||
DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md ) | ||
S="${WORKDIR}/${P}/src/${EGO_PN}" | ||
|
||
PATCHES=( "${FILESDIR}/gitea-logflags.patch" ) | ||
|
||
gitea_make() { | ||
local my_tags=( | ||
bindata | ||
$(usev pam) | ||
$(usex sqlite 'sqlite sqlite_unlock_notify' '') | ||
) | ||
local my_makeopt=( | ||
TAGS="${my_tags[@]}" | ||
LDFLAGS="-extldflags \"${LDFLAGS}\"" | ||
) | ||
[[ ${PV} != 9999* ]] && my_makeopt+=("DRONE_TAG=${PV}") | ||
GOPATH=${WORKDIR}/${P}:$(get_golibdir_gopath) emake "${my_makeopt[@]}" "$@" | ||
} | ||
|
||
src_prepare() { | ||
default | ||
|
||
local sedcmds=( | ||
-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 =#" | ||
) | ||
|
||
sed -i "${sedcmds[@]}" 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() { | ||
if has network-sandbox ${FEATURES}; then | ||
einfo "Remove tests which are known to fail with network-sandbox enabled." | ||
rm -rf ./modules/migrations/github_test.go | ||
fi | ||
|
||
if [[ ${PV} != 9999* ]] ; then | ||
einfo "Remove tests which depend on gitea git-repo." | ||
rm -rf ./modules/git/blob_test.go | ||
rm -rf ./modules/git/repo_test.go | ||
fi | ||
|
||
default | ||
} | ||
|
||
src_install() { | ||
dobin gitea | ||
|
||
einstalldocs | ||
|
||
newconfd "${FILESDIR}/gitea.confd-r1" gitea | ||
newinitd "${FILESDIR}/gitea.initd-r3" gitea | ||
newtmpfiles - gitea.conf <<-EOF | ||
d /run/gitea 0755 git git | ||
EOF | ||
systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service | ||
|
||
insinto /etc/gitea | ||
newins custom/conf/app.ini.sample app.ini | ||
if use acct ; then | ||
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 | ||
fi | ||
} |
Oops, something went wrong.