diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-10-09 12:09:44 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-10-09 12:10:30 +0200 |
commit | 87a1f27eea7dfc9f8574c6c11061480841c173df (patch) | |
tree | c9159f135fe85a5cbab465319f44d617dc972570 /apks/invidious/APKBUILD | |
parent | b813b1aa521468551ffb2ba80d03e820cbd6a8eb (diff) | |
download | apkbuilds-87a1f27eea7dfc9f8574c6c11061480841c173df.tar.gz apkbuilds-87a1f27eea7dfc9f8574c6c11061480841c173df.tar.bz2 apkbuilds-87a1f27eea7dfc9f8574c6c11061480841c173df.zip |
chore: Add invidious
Diffstat (limited to 'apks/invidious/APKBUILD')
-rw-r--r-- | apks/invidious/APKBUILD | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/apks/invidious/APKBUILD b/apks/invidious/APKBUILD new file mode 100644 index 0000000..79d5ec1 --- /dev/null +++ b/apks/invidious/APKBUILD @@ -0,0 +1,74 @@ +# Maintainer: Francesco Camuffo <dev@fmac.xyz> +pkgname=invidious +pkgver=0_git20231007 +_commit=60fae015d8b5e4b0bfac8306065db07f93c4c661 +pkgrel=0 +pkgdesc="Alternative front-end to YouTube" +url="https://github.com/iv-org/invidious" +arch="x86_64" +license="AGPL-3.0-or-later" +depends=" + rsvg-convert +" +options="!check" # testing breaks for now fixing later +makedepends=" + crystal + git + libxml2-dev + openssl-dev + shards + sqlite-dev + yaml-dev + zlib-dev +" +install="$pkgname.pre-install" +pkgusers="$pkgname" +pkggroups="$pkgname" +subpackages="$pkgname-openrc" +_mocks_commit=cb16e0343c8f94182615610bfe3c503db89717a7 +source=" + $pkgname-$_commit.tar.gz::https://github.com/iv-org/invidious/archive/$_commit.tar.gz + $pkgname.initd +" +builddir="$srcdir/invidious-$_commit" + +prepare() { + sed -i src/invidious.cr \ + -e 's/\(CURRENT_BRANCH \) = .*/\1 = "master"/' \ + -e "s/\(CURRENT_COMMIT \) = .*/\1 = \"${_commit:0:7}\"/" \ + -e "s/\(CURRENT_VERSION\) = .*/\1 = \"$pkgver\"/" \ + -e "s/\(ASSET_COMMIT\) = .*/\1 = \"${_commit:0:7}\"/" + + datadir=/usr/share/webapps/invidious + # fix paths + sed -i src/invidious.cr \ + -e "s|\(public_folder\) \"assets\"|\1 \"$datadir/assets\"|" + sed -i src/invidious/helpers/i18n.cr \ + -e "s|File.read(\"locales/|File.read(\"$datadir/locales/|" + sed -i src/invidious/database/base.cr \ + -e "s|config/sql|/etc/$pkgname/\0|g" + + default_prepare +} + +build() { + shards install + crystal build \ + --release \ + -Ddisable_quic \ + src/invidious.cr +} + +package() { + install -Dm755 "$pkgname" "$pkgdir"/usr/bin/invidious + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + mkdir -p "$pkgdir"/usr/share/webapps/invidious + cp -r "$builddir"/assets "$builddir"/locales \ + "$pkgdir"/usr/share/webapps/invidious + install -Dm644 "$builddir"/config/config.example.yml \ + "$pkgdir"/etc/"$pkgname"/config.yml +} +sha512sums=" +bc2295d5d43ac3b793914e4baa0bdd6c4d6ff1746629b3db0b81a22ca057acb5cc28a7af984573ace936acaabedc2ce134d9ecf76386101893af408976f8f44c invidious-60fae015d8b5e4b0bfac8306065db07f93c4c661.tar.gz +ed0a2e498751927c1ad82619395a07c169f7353a9c1453381ad288ad501b915010df5b799e4f102e034f0483b9101b9a8ae40d150b3d7db80605f87b9ca6f596 invidious.initd +" |