Skip to content
Open
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/forgejo/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ DIST forgejo-15.0.1-mark-go-bundle.tar.xz 463310236 BLAKE2B 88766e78ff7415794f8f
DIST forgejo-15.0.1.tar.gz 11274538 BLAKE2B 23d53f4830f9122c0ce870f5515c10c525cb852118c174c8bb0f183341f2a5236d912a83c9364a11094b1463526061f0ba7718ceac783fd805e775fadb296eed SHA512 0c168ccd5aa6378ecb1dcdcd425774ba630f25770f18a4ae7c1f7d176d694bcb9809c95143736927b34ec7d84a588f1ea526353d4c99c11bd7904f478b702ae0
DIST forgejo-15.0.2-mark-go-bundle.tar.xz 463322260 BLAKE2B 10dc589a4813e000fb164ed0353234758c19ec32932bf2e7ee7812175e1a6b829b0cd9ef6b4ab3cc78802ed3f0fa8881d7841807c1a57602d799c9091b147894 SHA512 547a2c4d2606879c4cba8feaf0ee98c26b607f6494271ccbb3e1aa78696917fb15261652e0ddf11dc7a1bb2774cf5b16c584bf56ed14ccb0f77b91f71bf0a253
DIST forgejo-15.0.2.tar.gz 11290059 BLAKE2B c1d4be4b765c548aedd2a61074a7c966cb030bb8cfbddaa4a76624aa515dce9729275d3a92db858a76c6dc52d2c4e5b1b2f0657c94c1cae32d947693893153d9 SHA512 2c8b31598afb7db693440c37bbf8909937794e8200130e360e2aa9dea2878b260102e06be7840bd412a8d6a50e3388bbe4ed800d011a9f40d03c506c4f90f2e5
DIST forgejo-15.0.4-mark-go-bundle.tar.xz 418937084 BLAKE2B 31272ab9f2dc726ac3816813049ec8f1ac8977ba1cb8c2164943c4597bda177cd616f19b98033397d584da7aa106225fa4ed1c379f51300f36f11491e3aab22a SHA512 e6bea47d69c92da2bcfaaced38c11e5bb0cf33d3c96b875434fef0254a9c1aecc7e05c539a635a7154d92db250c2c22422a29644f32f9a17e446075cd89cb41e
DIST forgejo-15.0.4.tar.gz 11350352 BLAKE2B c73486e4fb1bf18aac20b3ae6bf341e7d216296dff390a1a523f65f6ec1f8013cc96b9a8062f6fcd61257ff32be8ba81055c14cc006d5f1cfe03b3db8c75c183 SHA512 0cb927ea975cb2afb29b1bc19c16897c47d0d2063eb41e55248edeb2f30344c9968205834fef7da75b4178dc98288aea42189440e1b8416203e01f29099a9ccd
99 changes: 99 additions & 0 deletions www-apps/forgejo/forgejo-15.0.4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Distributed under the terms of the GNU General Public License v2
# Autogen by MARK Devkit

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

DESCRIPTION="A painless self-hosted Git service"
HOMEPAGE="https://forgejo.org/"
SRC_URI="
https://codeberg.org/forgejo/forgejo/archive/v15.0.4.tar.gz -> forgejo-15.0.4.tar.gz
mirror://macaroni/forgejo-15.0.4-mark-go-bundle.tar.xz -> forgejo-15.0.4-mark-go-bundle.tar.xz"
SLOT="0"
KEYWORDS="*"
DOCS=(
custom/conf/app.example.ini
CONTRIBUTING.md
README.md
)
IUSE="systemd"
RESTRICT="network-sandbox"
# Commons depends
CDEPEND="sys-libs/pam
"
BDEPEND="dev-lang/go
net-libs/nodejs

"
RDEPEND="${CDEPEND}
dev-vcs/git

"
DEPEND="${CDEPEND}
"
S="${WORKDIR}/${PN}"
pkg_setup() {
enewgroup git
enewuser git -1 /bin/bash /var/lib/forgejo 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
# PAM tags die for this error:
# transaction.go:409:55: could not determine what C.RTLD_NEXT refers to
gitea_tags="bindata sqlite sqlite_unlock_notify"
gitea_settings=(
"-X forgejo.org/modules/setting.CustomConf=/etc/forgejo/app.ini"
"-X forgejo.org/modules/setting.CustomPath=/var/lib/forgejo/custom"
"-X forgejo.org/modules/setting.AppWorkPath=/var/lib/forgejo"
)
export FORGEJO_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="" )
# We need frontend for assets
env "${makeenv[@]}" emake -j1 frontend
env "${makeenv[@]}" emake -j1 backend
}
src_install() {
newbin gitea forgejo
einstalldocs
newconfd "${FILESDIR}/forgejo.confd" forgejo
if use systemd ; then
systemd_newunit "${FILESDIR}"/forgejo.service forgejo.service
else
newinitd "${FILESDIR}/forgejo.initd" forgejo
fi
newtmpfiles - forgejo.conf <<-EOF
d /run/forgejo 0755 git git
EOF
insinto /etc/forgejo
newins custom/conf/app.example.ini app.ini
fowners root:git /etc/forgejo/{,app.ini}
fperms g+w,o-rwx /etc/forgejo/{,app.ini}
diropts -m0750 -o git -g git
keepdir /var/lib/forgejo /var/lib/forgejo/custom /var/lib/forgejo/data
keepdir /var/log/forgejo
}
pkg_postinst() {
fcaps_pkg_postinst
tmpfiles_process forgejo.conf
}


# vim: filetype=ebuild