commit:     1170ad2757725598c9780f6aafae6f31434d4e99
Author:     Artemis Everfree <artemis <AT> artemis <DOT> sh>
AuthorDate: Sun Aug 17 06:09:47 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Sun Aug 17 06:09:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1170ad27

www-apps/forgejo: add 12.0.1

Signed-off-by: Artemis Everfree <artemis <AT> artemis.sh>

 www-apps/forgejo/Manifest              |   1 +
 www-apps/forgejo/forgejo-12.0.1.ebuild | 124 +++++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git a/www-apps/forgejo/Manifest b/www-apps/forgejo/Manifest
index 5b16fa21c4..3b5e8a8ce8 100644
--- a/www-apps/forgejo/Manifest
+++ b/www-apps/forgejo/Manifest
@@ -1,3 +1,4 @@
 DIST forgejo-10.0.1.tar.gz 56997906 BLAKE2B 
b87c9d7532557aa9a48a2a41562b1d6b90c8ca55f610f5eca459f8ad4a36a46e75b5cd149dfc6fcad92d27178a2a509e54bd32e483b7754f75a2e9ae68189fa3
 SHA512 
33b512c3ee8428eafbf6e730e9b550d49187b90665a90b9629bade47fd06b1e918eea29ff89141f0c580ffb000a39d6562f4741af31ffb4bf7a1a2a48e460bdf
 DIST forgejo-10.0.3.tar.gz 57115818 BLAKE2B 
0cee1cbcb6ef97f79891b1f5a3733c6d603a6d5c9db855c6e86b939739927901cc1e9a1a211ac004b73a9868da29b97f54f0f9e70183056f92b5c1f5b4955970
 SHA512 
fb771d5b1105da540ddea08e3d27b0e8e16eddfddaab1688a56c5b488f972b17e150c783b8b8d5d83f90500a0f7a32dbefa3b7d8bb103650c30719a3ed997a8f
 DIST forgejo-11.0.3.tar.gz 55567487 BLAKE2B 
9aecc51d4c81e51686fd780a1c4e0850306d34f4e7d81bf97f8a705a10116edde6fa2b1f818d504477f9a39de65250234d7750033214bec97cae2fd689ac501e
 SHA512 
7b1bb9cea2d6c8c0a1d44ab08ac64efead8773d8243a9e67aa0dded6a27dee38dcb232324e5215649f41f49008bb70163af4b2ac5c492678b69dbf12676088f2
+DIST forgejo-12.0.1.tar.gz 54105467 BLAKE2B 
78641b313e6c0831dbebd1a352a5aa229f9577d119c08f1ae623e015d01053e222134108162d25011e718878c909db820e538e4d3ee8241336dbf2d6b7691fec
 SHA512 
4004475eb3d7cbb8747ffdb977e05c6d83c130feebc0701d00ea926e3835bbbaeeb34c477dcecc465dd0e2b43947228e654f1c791f74ead39401d58c89735eea

diff --git a/www-apps/forgejo/forgejo-12.0.1.ebuild 
b/www-apps/forgejo/forgejo-12.0.1.ebuild
new file mode 100644
index 0000000000..cf169df2ca
--- /dev/null
+++ b/www-apps/forgejo/forgejo-12.0.1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 2016-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fcaps go-module tmpfiles systemd flag-o-matic
+
+DESCRIPTION="A self-hosted lightweight software forge"
+HOMEPAGE="https://forgejo.org/ https://codeberg.org/forgejo/forgejo";
+
+SRC_URI="https://codeberg.org/forgejo/forgejo/releases/download/v${PV}/forgejo-src-${PV}.tar.gz
 -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-src-${PV}"
+LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
+SLOT="0"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+
+IUSE="+acct pam sqlite pie"
+
+DEPEND="
+       acct? (
+               acct-group/git
+               acct-user/git[gitea] )
+       pam? ( sys-libs/pam )"
+RDEPEND="${DEPEND}
+       dev-vcs/git
+       !www-apps/gitea" # until acct-user/git[forgejo]
+
+DOCS=(
+       custom/conf/app.example.ini CONTRIBUTING.md README.md
+)
+FILECAPS=(
+       -m 711 cap_net_bind_service+ep usr/bin/forgejo
+)
+
+RESTRICT="test"
+
+src_prepare() {
+       default
+
+       local sedcmds=(
+               -e "s#^ROOT =#ROOT = 
${EPREFIX}/var/lib/gitea/gitea-repositories#"
+               -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/forgejo#"
+               -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#"
+       )
+
+       sed -i "${sedcmds[@]}" custom/conf/app.example.ini || die
+       if use sqlite ; then
+               sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" 
custom/conf/app.example.ini || die
+       fi
+}
+
+src_configure() {
+       # bug 832756 - PIE build issues
+       filter-flags -fPIE
+       filter-ldflags -fPIE -pie
+}
+
+src_compile() {
+       local forgejo_tags=(
+               bindata
+               $(usev pam)
+               $(usex sqlite 'sqlite sqlite_unlock_notify' '')
+       )
+       local forgejo_settings=(
+               "-X 
forgejo.org/modules/setting.CustomConf=${EPREFIX}/etc/forgejo/app.ini"
+               "-X 
forgejo.org/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom"
+               "-X 
forgejo.org/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea"
+       )
+       local makeenv=(
+               DRONE_TAG="${PV}"
+               LDFLAGS="-extldflags \"${LDFLAGS}\" ${forgejo_settings[*]}"
+               TAGS="${forgejo_tags[*]}"
+       )
+
+       GOFLAGS=""
+       if use pie ; then
+               GOFLAGS+="-buildmode=pie"
+       fi
+
+       # need to set -j1 or build fails due to a race condition between MAKE 
jobs.
+       # this does not actually impact build parallelism, because the go 
compiler
+       # will still build everything in parallel when it's invoked.
+       env "${makeenv[@]}" emake -j1 EXTRA_GOFLAGS="${GOFLAGS}" backend
+}
+
+src_install() {
+       cp gitea forgejo
+       dobin forgejo
+
+       einstalldocs
+
+       newconfd "${FILESDIR}/forgejo.confd-r1" forgejo
+       newinitd "${FILESDIR}/forgejo.initd-r3" forgejo
+       newtmpfiles - forgejo.conf <<-EOF
+               d /run/forgejo 0755 git git
+       EOF
+       systemd_newunit "${FILESDIR}"/forgejo.service-r3 forgejo.service
+
+       insinto /etc/forgejo
+       newins custom/conf/app.example.ini app.ini
+       if use acct; then
+               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/gitea /var/lib/gitea/custom /var/lib/gitea/data
+               keepdir /var/log/forgejo
+       fi
+}
+
+pkg_postinst() {
+       fcaps_pkg_postinst
+       tmpfiles_process forgejo.conf
+
+       ewarn "${PN} ${PV} will continue to use /var/lib/gitea as the default 
home,"
+       ewarn "as acct-user/git[gitea] depends on it, and acct-user[forgejo] 
does not"
+       ewarn "exist yet."
+}

Reply via email to