Gentoo Archives: gentoo-commits

From: Karl-Johan Karlsson <creideiki+gentoo-guru@×××××××××××.se>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-video/owncast/
Date: Sat, 31 Jul 2021 17:06:43
Message-Id: 1627751159.b972665f5d480793448d8e323914a26f17698302.creideiki+gentoo-guru@gentoo
1 commit: b972665f5d480793448d8e323914a26f17698302
2 Author: Karl-Johan Karlsson <creideiki+gentoo-guru <AT> lysator <DOT> liu <DOT> se>
3 AuthorDate: Sat Jul 31 17:05:59 2021 +0000
4 Commit: Karl-Johan Karlsson <creideiki+gentoo-guru <AT> lysator <DOT> liu <DOT> se>
5 CommitDate: Sat Jul 31 17:05:59 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b972665f
7
8 media-video/owncast: tidy ebuild
9
10 Move to EAPI 8 (with no changes).
11
12 Add GitHub project to HOMEPAGE.
13
14 Expand PN in SRC_URI to plaintext.
15
16 Use WORKDIR and S variables to locate the prebuilt CSS file.
17
18 Remove defensive quotes around expansions of PN.
19
20 Use REPLACING_VERSIONS to determine if we are upgrading.
21
22 Package-Manager: Portage-3.0.20, Repoman-3.0.3
23 Signed-off-by: Karl-Johan Karlsson <creideiki+gentoo-guru <AT> lysator.liu.se>
24
25 media-video/owncast/owncast-0.0.7.ebuild | 33 +++++++++++++-------------------
26 1 file changed, 13 insertions(+), 20 deletions(-)
27
28 diff --git a/media-video/owncast/owncast-0.0.7.ebuild b/media-video/owncast/owncast-0.0.7.ebuild
29 index d9bba20fa..442707f89 100644
30 --- a/media-video/owncast/owncast-0.0.7.ebuild
31 +++ b/media-video/owncast/owncast-0.0.7.ebuild
32 @@ -1,16 +1,16 @@
33 # Copyright 1999-2021 Gentoo Authors
34 # Distributed under the terms of the GNU General Public License v2
35
36 -EAPI=7
37 +EAPI=8
38
39 inherit go-module
40
41 DESCRIPTION="A self-hosted live video and web chat server"
42 -HOMEPAGE="https://owncast.online"
43 +HOMEPAGE="https://owncast.online/ https://github.com/owncast/owncast"
44
45 LICENSE="MIT Apache-2.0 ISC BSD"
46 SLOT="0"
47 -KEYWORDS="~amd64 ~arm ~arm64 ~x86"
48 +KEYWORDS="~amd64"
49
50 RDEPEND="
51 acct-user/owncast
52 @@ -138,9 +138,8 @@ EGO_SUM=(
53
54 go-module_set_globals
55
56 -SRC_URI="
57 - https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
58 - https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}-linux-64bit.zip
59 +SRC_URI="https://github.com/owncast/owncast/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
60 + https://github.com/owncast/owncast/releases/download/v${PV}/${P}-linux-64bit.zip
61 ${EGO_SUM_SRC_URI}"
62
63 src_unpack() {
64 @@ -151,41 +150,35 @@ src_unpack() {
65 # place, but that's hopefully survivable. We need the binary
66 # package to get the minified CSS file, which is generated using
67 # NPM by upstream.
68 - cd "${S}"
69 - cp webroot/js/web_modules/tailwindcss/dist/tailwind.min.css "${P}"/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css
70 + cp "${WORKDIR}"/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css "${S}"/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css || die
71 }
72
73 src_compile() {
74 go build -v -work -x -ldflags \
75 "-s -w -X main.BuildVersion=${PV} -X main.BuildPlatform=gentoo" \
76 - -o "${PN}" \
77 - "github.com/${PN}/${PN}" || die
78 + -o ${PN} \
79 + github.com/${PN}/${PN} || die
80 }
81
82 src_install() {
83 - dobin "${PN}"
84 + dobin ${PN}
85
86 dodoc README.md
87
88 - newinitd "${FILESDIR}"/"${PN}".initd "${PN}"
89 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
90
91 diropts -m 0755 -o owncast -g owncast
92 insopts -m 0644 -o owncast -g owncast
93
94 - insinto "/var/lib/${PN}"
95 + dodir /var/lib/${PN}
96 + insinto /var/lib/${PN}
97 doins -r static webroot
98 }
99
100 -pkg_preinst() {
101 - if has_version "${CATEGORY}/${PN}" ; then
102 - upgrading=1
103 - fi
104 -}
105 -
106 pkg_postinst() {
107 go-module_pkg_postinst
108
109 - if [[ "${upgrading}" != "1" ]] ; then
110 + if [[ -z "${REPLACING_VERSIONS}" ]] ; then
111 einfo "The admin interface at http://localhost:8080/admin/"
112 einfo "has default username 'admin' and password 'abc123'."
113 einfo "The default stream key is 'abc123'."