diff options
author | Julien Roy <julien@jroy.ca> | 2024-11-12 17:26:37 -0500 |
---|---|---|
committer | Julien Roy <julien@jroy.ca> | 2024-11-12 19:02:22 -0500 |
commit | 5d871c5b6e0a8de53944b45ad273196f7d2e8523 (patch) | |
tree | 6de2ecf783b445c7b001531e9f17587c0d63fe1d /www-apps | |
parent | dev-crystal/http_proxy: new package, add 0.12.0 (diff) | |
download | guru-5d871c5b6e0a8de53944b45ad273196f7d2e8523.tar.gz guru-5d871c5b6e0a8de53944b45ad273196f7d2e8523.tar.bz2 guru-5d871c5b6e0a8de53944b45ad273196f7d2e8523.zip |
www-apps/invidious: add 2024.11.10.0
Signed-off-by: Julien Roy <julien@jroy.ca>
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/invidious/Manifest | 2 | ||||
-rw-r--r-- | www-apps/invidious/files/fix-targets-in-shards.patch | 15 | ||||
-rw-r--r-- | www-apps/invidious/invidious-2024.11.10.0.ebuild | 164 |
3 files changed, 181 insertions, 0 deletions
diff --git a/www-apps/invidious/Manifest b/www-apps/invidious/Manifest index a5ae2f4ed..c48234b27 100644 --- a/www-apps/invidious/Manifest +++ b/www-apps/invidious/Manifest @@ -1,6 +1,8 @@ DIST invidious-2024.04.27.tar.gz 3286563 BLAKE2B cdbf50dcd56e5cb70384069698322c3dff3d197a7ea7e652d27ca74a37799bc808f3e57a31d8ded1ee2e4ab661151bcdb4493fcb7794e4b40a52038a163155ac SHA512 39e0a3eb44da30a6d8f862ad82f2a9f12701918ee1b7b9fca9a7a21c1e9f14e0e3cc09ce7aba5e7633774df1e813502bb946a3fb4211480ba0a99368ba43b24a DIST invidious-2024.08.25.1.tar.gz 3301626 BLAKE2B 63f1e82eb1ec0f90fc6157a47872c733145aefd275fdee79f8de9b6ce07a2a01e8a73c20a08e3302ca35aa1bb5ae5da95b9218001cb2327d215f135e56aaa1f7 SHA512 e34e934b8e60a726838a7d3341f0c766c7233a1fdff17a68e42b2ae72ed008b582da619a5c460f8b1c3d072f12e344d295de488f442e2e43036c19335dc714e9 +DIST invidious-2024.11.10.0.tar.gz 3310536 BLAKE2B 8e122fb5c4ed250e049a3e8fdd6d3d5c41e443c3916ca36e8edb455d9fa8d32e3231d6f5e8af2226ff7340972eed26acf8d00b32bea75f7bafb20ce2251ffa05 SHA512 3ed9d47c520736d9df95541f6a85cc456c4b9ce03bd8f38905f7a11542ba0875d9d1736be82bee8d56039937b0321188ce0228d760ad616e6cc2d0aa7cbd8535 DIST invidious-mocks-11ec372.tar.gz 180392 BLAKE2B 899db54d4efdfc231d588155d52784d70a364c7382bd1652a3c384dc618435d646a50e957c1407f6ac7ade410e811438b23a16d9949e63f7791e34960bba1fc6 SHA512 7bc1aa17f555babaceca15fe51061400a6c8a9cb01ad15c5d22c155f3164aca7c6e49c8dcdbd894e1593c2c69d3ddaa201544b068510281e910b90a11a407e59 +DIST invidious-mocks-b55d58d.tar.gz 222861 BLAKE2B 3391b290be5e869610d8dfc31307fd046aa2fe726d6fe98323a5509da1ffcc838668ba3f6aaecce04cf1eee9c90f029a7b49b560b2c49a5905570117fc7f2cf0 SHA512 c19deb047baa570f16194ca26ca7e5eab3538b21db8e6139f404e6f3bcbe5f4f8aff9b45e7e5e9a3b525581da403e6d5bef10ac55a654e5b8f031565d472d625 DIST video.js-7.12.1.tgz 3511060 BLAKE2B 9ae5b1f6a0afab918b7dc3555fff2708963d4abb6c7903e13145b2d5393fb80e4ab6302c423b0ba15c805a624a23c25dd3db7865f1510c44cfc5d1d5ab1dbf54 SHA512 d0ec25eeae196e6e981d7f783fd595a90daf9e97de3723ad4cdc2e4c41282a8bd9a20a2a57631c3949ac40633811db60e2f19388fef816fe8755ad55e857917e DIST videojs-contrib-quality-levels-2.1.0.tgz 18770 BLAKE2B f6c4789835379380bde941d032bb0afbc49d093eb9407308094afd0b9c1f25781f57d8f8db928e318eb270927574a5fd505f08af13f0baf55897723ec489b769 SHA512 76a19019b2fd00586e731922ed9874737908847d0f00f707121ea351d47268509578ebaa9c9ace62cff7c0db6ca240dd05d45fd83bb66a79e9bb86765da49946 DIST videojs-http-source-selector-1.1.6.tgz 14270 BLAKE2B 232148058ced6926a6da669b443124a00489a5241c98d2b76a3e04dff818993a14a0edb1950db1adf86589fd3841e073b8cac23c142a7f276301c52b3b324359 SHA512 e9be4c98a4d3d9c567ae3b5d363e33d553bdd6e75b5e46644d803a2e50fc58dd9a1e51b6aea1539ad31a6f834ae279649246d19e6ddcdaad8875d2f78df7cb9a diff --git a/www-apps/invidious/files/fix-targets-in-shards.patch b/www-apps/invidious/files/fix-targets-in-shards.patch new file mode 100644 index 000000000..8ac5a208a --- /dev/null +++ b/www-apps/invidious/files/fix-targets-in-shards.patch @@ -0,0 +1,15 @@ +diff --git a/shard.yml b/shard.yml +index 2e4df045..e59fa733 100644 +--- a/shard.yml ++++ b/shard.yml +@@ -5,6 +5,10 @@ authors: + - Invidious team <contact@invidious.io> + - Contributors! + ++targets: ++ invidious: ++ main: src/invidious.cr ++ + description: | + Invidious is an alternative front-end to YouTube + diff --git a/www-apps/invidious/invidious-2024.11.10.0.ebuild b/www-apps/invidious/invidious-2024.11.10.0.ebuild new file mode 100644 index 000000000..88ed39969 --- /dev/null +++ b/www-apps/invidious/invidious-2024.11.10.0.ebuild @@ -0,0 +1,164 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs shards systemd + +MY_PV="2.$(ver_rs 1-2 '')" +MOCKS_COMMIT="b55d58dea94f7144ff0205857dfa70ec14eaa872" +MOCKS_P="${PN}-mocks-${MOCKS_COMMIT:0:7}" +DESCRIPTION="Invidious is an alternative front-end to YouTube" +HOMEPAGE=" + https://invidious.io/ + https://github.com/iv-org/invidious +" +IV_ORG="https://github.com/iv-org" +NPM="https://registry.npmjs.org" +SRC_URI=" + ${IV_ORG}/${PN}/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz + ${NPM}/video.js/-/video.js-7.12.1.tgz + ${NPM}/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-2.1.0.tgz + ${NPM}/videojs-http-source-selector/-/videojs-http-source-selector-1.1.6.tgz + ${NPM}/videojs-markers/-/videojs-markers-1.0.1.tgz + ${NPM}/videojs-mobile-ui/-/videojs-mobile-ui-0.6.1.tgz + ${NPM}/videojs-overlay/-/videojs-overlay-2.1.4.tgz + ${NPM}/videojs-share/-/videojs-share-3.2.1.tgz + ${NPM}/videojs-vr/-/videojs-vr-1.8.0.tgz + ${NPM}/videojs-vtt-thumbnails/-/videojs-vtt-thumbnails-0.0.13.tgz + test? ( + ${IV_ORG}/mocks/archive/${MOCKS_COMMIT}.tar.gz -> ${MOCKS_P}.tar.gz + ) +" +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="AGPL-3 Apache-2.0 MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + dev-db/sqlite:3 + dev-libs/boehm-gc + dev-libs/libevent:= + dev-libs/libpcre2:= + dev-libs/libxml2:2 + dev-libs/libyaml + dev-libs/openssl:= + sys-libs/zlib:= +" +RDEPEND="${COMMON_DEPEND} + acct-user/invidious + gnome-base/librsvg + net-misc/inv_sig_helper +" +DEPEND="${COMMON_DEPEND} + dev-crystal/athena-negotiation + dev-crystal/http_proxy + >=dev-crystal/kemal-1.1.0 + <dev-crystal/kemal-1.2.0 + dev-crystal/kilt + >=dev-crystal/protodec-0.1.5 + virtual/crystal-db[postgres,sqlite] + test? ( + dev-crystal/spectator + ) +" + +DOCS=( {CHANGELOG,README}.md TRANSLATION ) + +CHECKREQS_MEMORY="2G" + +CRYSTAL_DEFINES=( -Dskip_videojs_download ) + +PATCHES=( + "${FILESDIR}"/fix-targets-in-shards.patch +) + +src_unpack() { + local src depname destname js css + + for src in ${A}; do + if [[ ${src} == "${P}.tar.gz" ]]; then + unpack ${src} + elif [[ ${src} == "${MOCKS_P}.tar.gz" ]]; then + unpack "${src}" + mkdir -p "${S}"/mocks || die + rmdir "${S}"/mocks || die + mv mocks-${MOCKS_COMMIT} "${S}"/mocks || die + else + depname="${src%-*}" + + case ${depname} in + video.js) + js="video.js" ;; + *) + js="${depname}.js" ;; + esac + + case ${depname} in + video.js) + css="video-js.css" ;; + videojs-markers) + css="videojs.markers.css" ;; + *) + css="${depname}.css" ;; + esac + + # Create the destination directory + destname="${S}/assets/videojs/${depname}" + mkdir -p "${destname}" || die + + # Create a temporary directory + mkdir -p "${WORKDIR}"/${depname} || die + cd "${WORKDIR}"/${depname} || die + + # Copy assets + unpack ${src} + cd package/dist || die + mv ${js} ${destname} || die + if [[ -f ${css} ]]; then + mv ${css} ${destname} || die + fi + + cd "${WORKDIR}" || die + fi + done +} + +src_prepare() { + default + + local datadir="${EPREFIX}/usr/share/invidious" + sed -i src/invidious.cr \ + -e 's/\(CURRENT_BRANCH \) = .*/\1 = "master"/' \ + -e "s/\(CURRENT_COMMIT \) = .*/\1 = \"${COMMIT:0:7}\"/" \ + -e "s/\(CURRENT_VERSION\) = .*/\1 = \"${PV}\"/" \ + -e "s/\(ASSET_COMMIT\) = .*/\1 = \"${COMMIT:0:7}\"/" || die + + # fix paths + sed -i src/invidious.cr \ + -e "s|\(public_folder\) \"assets\"|\1 \"${datadir}/assets\"|" || die + sed -i src/invidious/helpers/i18n.cr \ + -e "s|File.read(\"locales/|File.read(\"${datadir}/locales/|" || die + sed -i src/invidious/database/base.cr \ + -e "s|config/sql|${datadir}/\0|g" || die + + rm shard.lock || die +} + +src_install() { + dobin invidious + einstalldocs + + insinto /usr/share/invidious + doins -r assets config locales + + insinto /etc/invidious + newins config/config.example.yml config.yml + + systemd_dounit "${FILESDIR}"/invidious.service + newinitd "${FILESDIR}"/invidious.initd ${PN} + newconfd "${FILESDIR}"/invidious.confd ${PN} +} |