commit:     b972665f5d480793448d8e323914a26f17698302
Author:     Karl-Johan Karlsson <creideiki+gentoo-guru <AT> lysator <DOT> liu 
<DOT> se>
AuthorDate: Sat Jul 31 17:05:59 2021 +0000
Commit:     Karl-Johan Karlsson <creideiki+gentoo-guru <AT> lysator <DOT> liu 
<DOT> se>
CommitDate: Sat Jul 31 17:05:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b972665f

media-video/owncast: tidy ebuild

Move to EAPI 8 (with no changes).

Add GitHub project to HOMEPAGE.

Expand PN in SRC_URI to plaintext.

Use WORKDIR and S variables to locate the prebuilt CSS file.

Remove defensive quotes around expansions of PN.

Use REPLACING_VERSIONS to determine if we are upgrading.

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Karl-Johan Karlsson <creideiki+gentoo-guru <AT> lysator.liu.se>

 media-video/owncast/owncast-0.0.7.ebuild | 33 +++++++++++++-------------------
 1 file changed, 13 insertions(+), 20 deletions(-)

diff --git a/media-video/owncast/owncast-0.0.7.ebuild 
b/media-video/owncast/owncast-0.0.7.ebuild
index d9bba20fa..442707f89 100644
--- a/media-video/owncast/owncast-0.0.7.ebuild
+++ b/media-video/owncast/owncast-0.0.7.ebuild
@@ -1,16 +1,16 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit go-module
 
 DESCRIPTION="A self-hosted live video and web chat server"
-HOMEPAGE="https://owncast.online";
+HOMEPAGE="https://owncast.online/ https://github.com/owncast/owncast";
 
 LICENSE="MIT Apache-2.0 ISC BSD"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+KEYWORDS="~amd64"
 
 RDEPEND="
        acct-user/owncast
@@ -138,9 +138,8 @@ EGO_SUM=(
 
 go-module_set_globals
 
-SRC_URI="
-       https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz
-       
https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}-linux-64bit.zip
+SRC_URI="https://github.com/owncast/owncast/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz
+       
https://github.com/owncast/owncast/releases/download/v${PV}/${P}-linux-64bit.zip
        ${EGO_SUM_SRC_URI}"
 
 src_unpack() {
@@ -151,41 +150,35 @@ src_unpack() {
        # place, but that's hopefully survivable. We need the binary
        # package to get the minified CSS file, which is generated using
        # NPM by upstream.
-       cd "${S}"
-       cp webroot/js/web_modules/tailwindcss/dist/tailwind.min.css 
"${P}"/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css
+       cp 
"${WORKDIR}"/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css 
"${S}"/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css || die
 }
 
 src_compile() {
        go build -v -work -x -ldflags \
           "-s -w -X main.BuildVersion=${PV} -X main.BuildPlatform=gentoo" \
-          -o "${PN}" \
-          "github.com/${PN}/${PN}" || die
+          -o ${PN} \
+          github.com/${PN}/${PN} || die
 }
 
 src_install() {
-       dobin "${PN}"
+       dobin ${PN}
 
        dodoc README.md
 
-       newinitd "${FILESDIR}"/"${PN}".initd "${PN}"
+       newinitd "${FILESDIR}"/${PN}.initd ${PN}
 
        diropts -m 0755 -o owncast -g owncast
        insopts -m 0644 -o owncast -g owncast
 
-       insinto "/var/lib/${PN}"
+       dodir /var/lib/${PN}
+       insinto /var/lib/${PN}
        doins -r static webroot
 }
 
-pkg_preinst() {
-       if has_version "${CATEGORY}/${PN}" ; then
-               upgrading=1
-       fi
-}
-
 pkg_postinst() {
        go-module_pkg_postinst
 
-       if [[ "${upgrading}" != "1" ]] ; then
+       if [[ -z "${REPLACING_VERSIONS}" ]] ; then
                einfo "The admin interface at http://localhost:8080/admin/";
                einfo "has default username 'admin' and password 'abc123'."
                einfo "The default stream key is 'abc123'."

Reply via email to