commit:     bc61f69c72a610a3703f7a0035b3f922fc735ffb
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Dec 12 12:17:18 2022 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Dec 12 20:25:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bc61f69c

www-apps/gotosocial: add 0.6.0

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 www-apps/gotosocial/Manifest                |  2 +
 www-apps/gotosocial/gotosocial-0.6.0.ebuild | 92 +++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git a/www-apps/gotosocial/Manifest b/www-apps/gotosocial/Manifest
index 2fc71ad07..186db0ac2 100644
--- a/www-apps/gotosocial/Manifest
+++ b/www-apps/gotosocial/Manifest
@@ -1,2 +1,4 @@
 DIST gotosocial-0.5.2-source-code.tar.gz 52861407 BLAKE2B 
9e80373fe66a05e57d98b3c241f10d46d66000fab388a2e4622212c0b2d615f0ece877fbc0a9d64164784f4d04e97b422de7a3a7cd3facbd1bf99bef2d6200d5
 SHA512 
fa6be579f34084708f6101a2ff36f0b009819d5c3955ebe3801a97a159e64776134346e06f9403e188de01b7fd82ea475eecd016692a102146acba6a6a68e660
+DIST gotosocial-0.6.0-source-code.tar.gz 43407289 BLAKE2B 
5b04c28170adb410ebe65a4841adf703b3ac28f9b91ab8c3f4a6f92383948743e6aa4e0a1e5a678a6de3ffd7782b90790361a74eec27fe3b7f06e8a20e28eabf
 SHA512 
de66f5701d666f917428353904ac51d2e5271c826e52bd1fc72cd3544dd052adbe4bb3ca635c170e8eae8ddb15226229922da3ab12d5f2ac74a4ec0b86bbb238
 DIST gotosocial_0.5.2_web-assets.tar.gz 1603916 BLAKE2B 
9fc36982e83100a6566afc0bb7e78cf5bae2a979a7798b898fb5a6ab65ecdfdcde92c73a6f91ca2291a3ea2198f4f0638d6ae8c83b227b4a33f5f9fd5e9df472
 SHA512 
e7798f2f80968f5007328adce1b00038f2aaae7b6cf1f24c7961065b1c96a2891b867cf69cf0a6c851bcd60cd57c736f0ca60e6707a07f4336b2445f53cf922e
+DIST gotosocial_0.6.0_web-assets.tar.gz 1630400 BLAKE2B 
09e4b12de2cc4b0fcb8839ce3fbdb335bbcce6006bffae3b10032775248daaef629a5bb102b1c79c2ad1fd291c7f43947efe542f44a8dbf6d7737fb65cf6e7aa
 SHA512 
6f137d9fedffe35d80155f7cf647286ba031851a07e9d9b3e8b244399d0222e6fb728155c9fc451dc18ecf328ad458130a3eb7ab3be92071dcfb9b7b590122cd

diff --git a/www-apps/gotosocial/gotosocial-0.6.0.ebuild 
b/www-apps/gotosocial/gotosocial-0.6.0.ebuild
new file mode 100644
index 000000000..e847209b8
--- /dev/null
+++ b/www-apps/gotosocial/gotosocial-0.6.0.ebuild
@@ -0,0 +1,92 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DOCS_BUILDER="mkdocs"
+DOCS_DEPEND="dev-python/mkdocs-render-swagger-plugin"
+PYTHON_COMPAT=( python3_{8..11} )
+inherit python-any-r1 docs go-module systemd tmpfiles
+
+DESCRIPTION="Fast, fun, ActivityPub server, powered by Go"
+HOMEPAGE="
+       https://gotosocial.org/
+       https://github.com/superseriousbusiness/gotosocial
+"
+GH="https://github.com/superseriousbusiness/${PN}";
+SRC_URI="
+       ${GH}/releases/download/v${PV}/${P}-source-code.tar.gz
+       ${GH}/releases/download/v${PV}/${PN}_${PV}_web-assets.tar.gz
+"
+S="${WORKDIR}"
+
+LICENSE="|| ( WTFPL CC0-1.0 ) AGPL-3 BSD BSD-2 CC0-1.0 GPL-3 MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="acct-user/gotosocial"
+
+DOCS=( archive {CONTRIBUTING,README,ROADMAP}.md )
+
+src_unpack() {
+       # source code
+       unpack ${P}-source-code.tar.gz
+       rm -r web || die
+
+       # prebuilt web assets
+       unpack ${PN}_${PV}_web-assets.tar.gz
+}
+
+src_prepare() {
+       default
+
+       sed -i example/config.yaml \
+               -e 
"s|./web/template/|${EPREFIX}/usr/share/gotosocial/web/template/|g" \
+               -e 
"s|./web/assets/|${EPREFIX}/usr/share/gotosocial/web/assets/|g" \
+               -e 
"s|/gotosocial/storage|${EPREFIX}/var/lib/gotosocial/storage|g" \
+               || die
+}
+
+src_compile() {
+       local myargs=(
+               -trimpath
+               -ldflags "-X main.Version=${PV}"
+               -tags netgo,osusergo,static_build,kvformat
+       )
+
+       local -x CGO_ENABLED=0
+       ego build "${myargs[@]}" ./cmd/gotosocial
+
+       use doc && docs_compile
+}
+
+src_test() {
+       local -x GTS_DB_TYPE="sqlite"
+       local -x GTS_DB_ADDRESS=":memory:"
+       local -x CGO_ENABLED=0
+
+       local myargs=(
+               -tags netgo,osusergo,static_build,kvformat
+               -count 1
+       )
+       ego test "${myargs[@]}" ./...
+}
+
+src_install() {
+       dobin gotosocial
+
+       newinitd "${FILESDIR}"/gotosocial.initd ${PN}
+       newconfd "${FILESDIR}"/gotosocial.confd ${PN}
+       systemd_dounit "${FILESDIR}"/gotosocial.service
+       newtmpfiles "${FILESDIR}"/gotosocial.tmpfiles ${PN}.conf
+
+       insinto /usr/share/gotosocial
+       doins -r web
+
+       insinto /etc/gotosocial
+       doins example/config.yaml
+}
+
+pkg_postinst() {
+       tmpfiles_process ${PN}.conf
+}

Reply via email to