Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions www-apps/gitea/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ DIST gitea-1.26.2-2c749ce.tar.gz 6839482 BLAKE2B 21f135856a384144f864f919da2271a
DIST gitea-1.26.2-mark-go-bundle-2c749ce.tar.xz 538031472 BLAKE2B cc3a7ca97cf3a16a4ac56983993602320f3e50eeee3250f81aabccaa29208ee3080cef09e7e8740b213f9eeeba351553962d7d8a6fa5b881d33ca3fb9bf8dacf SHA512 e03ea030632cb7ce676cec257eb2c9967ec43e01482079a982360e56f7fcf2b194a7872a7ec0dfe5ee350f468cbb425d7abdb0bf17fbd137d28028eaf17bdbfd
DIST gitea-1.26.4-95ba37d.tar.gz 6861254 BLAKE2B 3227e006be14badb6e0fd1b0d669a995b47a26312b0df986f983dbc008db3e1baeb835c21bf50e6342bb46666d75be32acdc355ef1242c84bbd6ca14bf08d712 SHA512 02421939cf56b362e507db98525f7ef6bcc44fa0aec4064840c2474b86e614a38bbcb2586eea12cde72d1029e65f4db977dd809f8b2436a5bc9f5ba38e11f4b6
DIST gitea-1.26.4-mark-go-bundle-95ba37d.tar.xz 537763988 BLAKE2B 3d507039fb020e8f9e71d1a07221950841d40690bc16ec272febd8f05f5cfd733ca4e389d0816e5f2ddb9eeffcce2a96fe00c4ff2bc34113cb45e11ee377d555 SHA512 0dbafa2b929503a66fcc5af70b5e026d9a53d9604647ea312d958e153d4f3035a8e82b424f9482b18514aeab935513894f1c8aeac6f61a3f86e77283e70be3f5
DIST gitea-1.27.0-b969123.tar.gz 7248141 BLAKE2B dc1e920b9488b3819bd9c24613c228d9a87a3061bd1159aaaf698526457b129cae9f9f5109bee23c2387dd21b36bcbbc2be4fb33b1915e4f63014610d6a459b5 SHA512 967dba377b31e8d5dfd8702b09ccc5f0944aa5a8c6490fb74d688da5bc70a215ef7bc03814e2c3e1ec0c122d29ed1c2d7de37d6847a0dc25043192429d4e272b
DIST gitea-1.27.0-mark-go-bundle-b969123.tar.xz 511557620 BLAKE2B cec964f7837f8a987f1ea0b0ac6f2bc1d571f930377ec40e1f227fb98bf929f676d41e940a07c19d838a29d7b4023433efa21518fef8d1d78e795a16c323b761 SHA512 5b308ea75d7f71b5f2dc07d607c21144f6ac9726f7436943dceb1ad8437ea6deca1701f94c5a08bfddbc09c9efb705db633877fd6afa6086c545f27714f76e3e
103 changes: 103 additions & 0 deletions www-apps/gitea/gitea-1.27.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Distributed under the terms of the GNU General Public License v2
# Autogen by MARK Devkit

EAPI=7
FILECAPS=( -m 711 cap_net_bind_service+ep usr/bin/gitea )
inherit fcaps go-module tmpfiles systemd flag-o-matic user

DESCRIPTION="A painless self-hosted Git service"
HOMEPAGE="https://gitea.com https://github.com/go-gitea/gitea"
SRC_URI="
https://api.github.com/repos/go-gitea/gitea/tarball/v1.27.0 -> gitea-1.27.0-b969123.tar.gz
mirror://macaroni/gitea-1.27.0-mark-go-bundle-b969123.tar.xz -> gitea-1.27.0-mark-go-bundle-b969123.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="*"
DOCS=(
custom/conf/app.example.ini
CHANGELOG.md
CONTRIBUTING.md
README.md
)
IUSE="systemd"
RESTRICT="network-sandbox"
# Commons depends
CDEPEND="sys-libs/pam
"
BDEPEND="dev-lang/go
"
RDEPEND="${CDEPEND}
dev-vcs/git

"
DEPEND="${CDEPEND}
dev-util/pnpm-bin

"

post_src_unpack() {
mv go-gitea-gitea-* ${S}
}


pkg_setup() {
enewgroup git
enewuser git -1 /bin/bash /var/lib/gitea git
}
src_prepare() {
sed -i -e "s#^MODE = console#MODE = file#" custom/conf/app.example.ini || die
go-module_src_prepare
}
src_configure() {
# bug 832756 - PIE build issues
filter-flags -fPIE
filter-ldflags -fPIE -pie
}
src_compile() {
local gitea_tags
local -a gitea_settings makeenv
gitea_tags="bindata pam sqlite sqlite_unlock_notify"
gitea_settings=(
"-X code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/app.ini"
"-X code.gitea.io/gitea/modules/setting.CustomPath=/var/lib/gitea/custom"
"-X code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea"
)
export GITEA_VERSION="${PV}"
makeenv=(
LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[*]}"
TAGS="${gitea_tags}"
)
# Use variable STORED_VERSION_FILE (the "${S}/VERSION" file) to set version,
# and prevent executing git command when it's not a live version.
makeenv+=( GITHUB_REF_NAME="" )
env "${makeenv[@]}" emake -j1 frontend
env "${makeenv[@]}" emake backend
}
src_install() {
dobin gitea
einstalldocs
newconfd "${FILESDIR}/gitea.confd-r1" gitea
if use systemd ; then
systemd_newunit "${FILESDIR}"/gitea.service-r4 gitea.service
else
newinitd "${FILESDIR}/gitea.initd-r3" gitea
fi
newtmpfiles - gitea.conf <<-EOF
d /run/gitea 0755 git git
EOF
insinto /etc/gitea
newins custom/conf/app.example.ini 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
tmpfiles_process gitea.conf
}



# vim: filetype=ebuild