summaryrefslogtreecommitdiff
path: root/www-apps/gitea
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
commitdeba8115d2c2af26df42966b91ef04ff4dd79cde (patch)
tree9a48f42594e1a9e6b2020d5535a784314434d7a7 /www-apps/gitea
parent38423c67c8a23f6a1bc42038193182e2da3116eb (diff)
gentoo resync : 14.05.2020
Diffstat (limited to 'www-apps/gitea')
-rw-r--r--www-apps/gitea/Manifest6
-rw-r--r--www-apps/gitea/gitea-1.11.5.ebuild141
-rw-r--r--www-apps/gitea/gitea-9999.ebuild17
-rw-r--r--www-apps/gitea/metadata.xml1
4 files changed, 157 insertions, 8 deletions
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index b9f0b420efb3..76bba6468d34 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -3,6 +3,8 @@ AUX gitea.confd-r1 243 BLAKE2B 87caa8371f53f52b0a85f720342f9f358dedec9240ab78998
AUX gitea.initd-r3 802 BLAKE2B 2e33e95f7d2762986184d45b0bbb250cc5e04fffc4e4b006233b28e5b57be69eef1d83441adebe2b94681585edaf77f9da4eb97930f91e75c1b1a5cd8d137633 SHA512 5ff2e653180a0601734fcd055dfffdfdc12363736ed2e56c8576c802398b90f4025b44002cbb9a3fd1e0c2d4c169f62d460381c6c549746d3390e55fc1c677d1
AUX gitea.service-r2 734 BLAKE2B 84825b8198e9495e2803ca3702e6a631fb269c5c8fb4ff4246465a5bd7f7d796b0c3eaea72d0a25cef4f5d38d27a6c99a1b6d41f489749bef322a4ac93cfdd12 SHA512 287670f196bf6353dbdeb6ac37b4ac73693e16a6a3a83f57e7179ccb64364d1d85950a2ddd0a77238a3d218afdaacc8ba849c2810a7ba1238c7277074d1ebe39
DIST gitea-1.10.6.tar.gz 30147860 BLAKE2B e41e226be820eb0a436783f49bf90a1149eef4e0dde00edc09bc76bb086ea53ff2856563e31ab261e1529a03753785e04c1fe8a02f72eef01a6de173df82098d SHA512 be64f73eb0819c28e444b9dae8d4baecd910aad790efeb515a981542125679257f48a5f4ab1c8453b5372a0c8b1e9b84275e61c89dcd2137d7f7cfe8c71f917b
+DIST gitea-src-1.11.5.tar.gz 68923871 BLAKE2B 99e189b4a95e9ef6079a5e8455c05209da742499ff1b18e9f5edab2620ff8deb64ca3b7cb59d456b6fe25558602be8e1f8376ec234229c6af7baf24cc6d15023 SHA512 b12bfb2fc13bd0ca5799d52c37b5d2988879041892aa1e160546f7c80e2faef086f76cd753de90f2468fe9f87af6eca64ca21df394db160fc347137fc9a0fd52
EBUILD gitea-1.10.6.ebuild 3427 BLAKE2B bbbeac7a2b28d7cd601d9a3a2c8ef88165238933544ab95a9e7acf915b86164afc7f97b93a8e1f3f94b8bf526bf318e1d19eead4ca81c5e779e50c4b074b9d4f SHA512 8d09ae65094ab6403b61e7ef3fb045ac54d7f5e27184ea98b1a8da1618ef546bfec0787949faeb3b8c598d8868bcc08a62c3ed2a7288aaa696832478dec1c0ea
-EBUILD gitea-9999.ebuild 3379 BLAKE2B 02f80718715f55e172ac372e3d15aea4112c7043ace30d8441bdc9822f8c617e1a3d0109ed640904b9baf8d80a085c390ec2d008aaca03cd14b6d62b1a72bddf SHA512 d3c7b02a3000c23ce3ed491e63737e3bdd59b5008019b7459927b042a926a72f2a4756714d8347d15cce6b5a26d0c91839166a54bd1440a00cd33f3061f80eb1
-MISC metadata.xml 546 BLAKE2B 7b28ca7beb4fec57e6d4fc942b30afe505dc3b1f7c9034509bb9980d15429565220421d5edfcab76608386fb8cfbc086486beffcf53c814cfb0c09bf29e753ee SHA512 aaaca41cb5e43f8d382087760352e09e7fe0c18c6474399c4d6cd228ea0e2982b876f2f3d9c1c1bd11de1495679d3458bfb2a092c1f35df7ab8d5950bdfeadb2
+EBUILD gitea-1.11.5.ebuild 3690 BLAKE2B 0ff7475081d352a4e7877639633d19e3ae9705a5c5525589d3e7168ce2a5b65cf88f5ee21e49158ae8d65a16020f3f437490a7227aed319dea62225e59390c24 SHA512 8e8fd381a2a47e204b3b5f1d60cb9c5b16550ee5b3e2a2e225332e8e6e55fbd21e45e2388560ca42135a40e0ccf862defdc2ad3a7610841dba751a2279411469
+EBUILD gitea-9999.ebuild 3579 BLAKE2B 8bd251e0fe851dc894dbb49aa476f20760f74c245de2df7d9bd026da36115a3f5fabaf7af00f0137ffb363566a2f35b93c2276f1bf6b9c69a2d821f439c79500 SHA512 75836046d9d6e04a438e9128bf5b2cb997ec12edb1f3be9591ceea89374b550317b185e8d5b4bf125de824b25a1e5dbde136521f4b17531f1e97084b0eaf8451
+MISC metadata.xml 639 BLAKE2B ded4337596780b55640ce8db682ac7fcd8b6624147d6f9cf6190d41212b98f77d752b98eb4f6af7e6bbc5472bff5f3eb6ab016325e68e3f2b2284c5b4294d5a3 SHA512 5e6a76f08e5d2161192c35371caeb38f8dc972f478aca0f3f1025852c482f54be9b7ca30dbb1365ac5c7a9902534d74b05d7dc0f21109a752f0446ff5b4191e1
diff --git a/www-apps/gitea/gitea-1.11.5.ebuild b/www-apps/gitea/gitea-1.11.5.ebuild
new file mode 100644
index 000000000000..44802e089f92
--- /dev/null
+++ b/www-apps/gitea/gitea-1.11.5.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2020 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 fcaps 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/releases/download/v${PV}/gitea-src-${PV}.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 build-client pam sqlite"
+
+BDEPEND="dev-lang/go
+ build-client? ( >=net-libs/nodejs-10[npm] )"
+DEPEND="pam? ( sys-libs/pam )"
+RDEPEND="${DEPEND}
+ acct? (
+ acct-group/git
+ acct-user/git[gitea]
+ )
+ dev-vcs/git"
+
+DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
+FILECAPS=( cap_net_bind_service+ep usr/bin/gitea )
+S="${WORKDIR}/${P}/src/${EGO_PN}"
+
+PATCHES=( "${FILESDIR}/gitea-logflags.patch" )
+
+gitea_make() {
+ local gitea_tags=(
+ bindata
+ $(usev pam)
+ $(usex sqlite 'sqlite sqlite_unlock_notify' '')
+ )
+ local gitea_settings=(
+ "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini"
+ "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom"
+ "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea"
+ )
+ local makeenv=(
+ TAGS="${gitea_tags[@]}"
+ LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[@]}"
+ GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)"
+ )
+ [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${PV}")
+
+ env "${makeenv[@]}" emake -j1 "$@"
+}
+
+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
+
+ # Remove already build assets (like frontend part)
+ use build-client && gitea_make clean-all
+}
+
+src_compile() {
+ if use build-client ; then
+ gitea_make build
+ else
+ gitea_make backend
+ fi
+}
+
+src_test() {
+ if has network-sandbox ${FEATURES}; then
+ einfo "Remove tests which are known to fail with network-sandbox enabled."
+ rm ./modules/migrations/github_test.go || die
+ fi
+
+ if [[ ${PV} != 9999* ]] ; then
+ einfo "Remove tests which depend on gitea git-repo."
+ rm ./modules/git/blob_test.go || die
+ rm ./modules/git/repo_test.go || die
+ 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
+}
diff --git a/www-apps/gitea/gitea-9999.ebuild b/www-apps/gitea/gitea-9999.ebuild
index 9e8bcf9c6054..0d1559ca4a39 100644
--- a/www-apps/gitea/gitea-9999.ebuild
+++ b/www-apps/gitea/gitea-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -9,7 +9,7 @@ else
SCM="git-r3"
fi
-inherit golang-base tmpfiles systemd ${SCM}
+inherit fcaps golang-base tmpfiles systemd ${SCM}
unset SCM
EGO_PN="code.gitea.io/gitea"
@@ -18,7 +18,7 @@ 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"
+ SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64"
else
EGIT_REPO_URI="https://github.com/go-gitea/gitea"
@@ -30,7 +30,8 @@ LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
SLOT="0"
IUSE="+acct pam sqlite"
-BDEPEND="dev-lang/go"
+BDEPEND="dev-lang/go
+ >=net-libs/nodejs-10[npm]"
DEPEND="pam? ( sys-libs/pam )"
RDEPEND="${DEPEND}
acct? (
@@ -40,8 +41,11 @@ RDEPEND="${DEPEND}
dev-vcs/git"
DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
+FILECAPS=( cap_net_bind_service+ep usr/bin/gitea )
S="${WORKDIR}/${P}/src/${EGO_PN}"
+PATCHES=( "${FILESDIR}/gitea-logflags.patch" )
+
gitea_make() {
local gitea_tags=(
bindata
@@ -60,7 +64,7 @@ gitea_make() {
)
[[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${PV}")
- env "${makeenv[@]}" emake "$@"
+ env "${makeenv[@]}" emake -j1 "$@"
}
src_prepare() {
@@ -85,7 +89,8 @@ src_prepare() {
sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
fi
- gitea_make generate
+ # Remove already build assets (like frontend part)
+ gitea_make clean-all
}
src_compile() {
diff --git a/www-apps/gitea/metadata.xml b/www-apps/gitea/metadata.xml
index f492ced05e45..666bf0ff6e3e 100644
--- a/www-apps/gitea/metadata.xml
+++ b/www-apps/gitea/metadata.xml
@@ -14,5 +14,6 @@
</upstream>
<use>
<flag name="acct">User and group management via acct-*/git packages</flag>
+ <flag name="build-client">Build the client code, instead of using a precompiled one</flag>
</use>
</pkgmetadata>