www-apps/invidious: add 2025.03.14.0

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova 2025-03-18 20:06:45 +05:00
parent 306e33a2f3
commit d1f1b2c5c7
No known key found for this signature in database
GPG Key ID: E7B76EDC50864BB1
2 changed files with 165 additions and 0 deletions

View File

@ -1,4 +1,5 @@
DIST invidious-2024.11.10.0.tar.gz 3310536 BLAKE2B 8e122fb5c4ed250e049a3e8fdd6d3d5c41e443c3916ca36e8edb455d9fa8d32e3231d6f5e8af2226ff7340972eed26acf8d00b32bea75f7bafb20ce2251ffa05 SHA512 3ed9d47c520736d9df95541f6a85cc456c4b9ce03bd8f38905f7a11542ba0875d9d1736be82bee8d56039937b0321188ce0228d760ad616e6cc2d0aa7cbd8535
DIST invidious-2025.03.14.0.tar.gz 3326031 BLAKE2B 6a8de85038cd7ee8e0ed0ed79a401e8ce9a8db6ee8887c55e7ca9065960b9c6419128d5031828c725372981b27c5c1349458cef8dce0c4582a87944ad741dd97 SHA512 21da63fdbc078485cdb1a2d43cdc7398e66764d6ec14941de3246a069980f9524a52c66c42a6570f7e9acb6a60d9dad55e2c4e17faf2b17420985ab40648ba17
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

View File

@ -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.2-r1
<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}
}