commit:     1d43088d0247a081b37138b29295f5318fe187b3
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun Jul 23 21:35:06 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Jul 23 21:43:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1d43088d

www-apps/gotosocial: add 0.10.0

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

 www-apps/gotosocial/Manifest                 |  2 +
 www-apps/gotosocial/gotosocial-0.10.0.ebuild | 88 ++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/www-apps/gotosocial/Manifest b/www-apps/gotosocial/Manifest
index 234c4529a..0153a5c1a 100644
--- a/www-apps/gotosocial/Manifest
+++ b/www-apps/gotosocial/Manifest
@@ -1,2 +1,4 @@
+DIST gotosocial-0.10.0-source-code.tar.gz 55714610 BLAKE2B 
5db1bb11d799cc85e7667c205a19df88b901598dfa64cb2b10c58ee6ea327cf5d2e74cba58312d5b7444200ca8a6866b6305008e41775f2906db8faddb078b92
 SHA512 
fc647e6fb35ef8a9969014d4e785f868e5c85fb2305f7ac204ba830d0774cf4fa7cbb25b7a47fed0b8f592e45299cb2bdbbf5f4a6ae45915a540e9c3ab92f3c4
 DIST gotosocial-0.9.0-source-code.tar.gz 55117728 BLAKE2B 
e9a02e3d6b27d242db3a239e95653973a498b67e606824d8a2ff141498b8bbf6be0f434d96abad2129e7ca4dab379b815ac04749e036caf0963d6160508768bd
 SHA512 
7638a069a47d615264baa74d838052f913b6c71497396c2d2b877a870a5ad1639d218dd9877fb6b37c347d4e243524527260f48f983a68bb29c4b76ec3ce8c7c
+DIST gotosocial_0.10.0_web-assets.tar.gz 1362405 BLAKE2B 
78168bcffbc5081cfb81ddcba314d3aa58e41fd115303997306495ad79c5d6fa3d2540b1d4da87e43cf7c4f62e737a859c5bdf2959d60371e25125dd21567f9e
 SHA512 
4a6b2248969e9e254764e4b03fa6d7d884d74da8b25665feebca117eeeeae3aa3dc8fca995ca7c939f6437aa35b7d09dbd824727c7d0a7a4745db29916ab74be
 DIST gotosocial_0.9.0_web-assets.tar.gz 1357671 BLAKE2B 
aeab657eb72db5178287afd75b6c1d06238f8c769f3bfc21cf6249b8eed468b7009b2401c64aca22964ebd7a6554066a2c38d9d441a39789c731faa6e9c17c29
 SHA512 
0d83b093ab8f45ae8ed3eebcf1aed66b27a5d996e5c0dc30e16cc99a881b7e2b333ba4cf4fd78486c42b3bef9245d1ba89743a87ae0f969e8be6a756cf1dcfc6

diff --git a/www-apps/gotosocial/gotosocial-0.10.0.ebuild 
b/www-apps/gotosocial/gotosocial-0.10.0.ebuild
new file mode 100644
index 000000000..6318d2cc0
--- /dev/null
+++ b/www-apps/gotosocial/gotosocial-0.10.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd tmpfiles
+
+DESCRIPTION="Fast, fun, ActivityPub server, powered by Go"
+HOMEPAGE="
+       https://gotosocial.org/
+       https://github.com/superseriousbusiness/gotosocial
+"
+GH_RELEASE="https://github.com/superseriousbusiness/${PN}/releases/download/v${PV}";
+SRC_URI="
+       ${GH_RELEASE}/${P}-source-code.tar.gz
+       ${GH_RELEASE}/${PN}_${PV}_web-assets.tar.gz
+"
+S="${WORKDIR}"
+
+LICENSE="|| ( WTFPL-2 CC0-1.0 ) AGPL-3 Apache-2.0 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_configure() {
+       GOFLAGS+=" -tags=netgo,osusergo,static_build,kvformat"
+}
+
+src_compile() {
+       local myargs=(
+               -trimpath
+               -ldflags "-X main.Version=${PV}"
+       )
+
+       ego build "${myargs[@]}" ./cmd/gotosocial
+}
+
+src_test() {
+       local -x GTS_DB_TYPE="sqlite"
+       local -x GTS_DB_ADDRESS=":memory:"
+
+       local -x GOFLAGS
+       GOFLAGS="${GOFLAGS//-v/}"
+       GOFLAGS="${GOFLAGS//-x/}"
+
+       ego test -vet off ./...
+}
+
+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