diff options
Diffstat (limited to 'opentubex/PKGBUILD')
| -rw-r--r-- | opentubex/PKGBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/opentubex/PKGBUILD b/opentubex/PKGBUILD new file mode 100644 index 0000000..34a9a20 --- /dev/null +++ b/opentubex/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: severaltranscats <severaltranscats at cleo dot nyc> +# Contributor: <d3sox at protonmail dot com> + +pkgname=opentubex +_pkgname=OpenTubeX +_ghurl="https://github.com/OpenTubeX/OpenTubeX" +pkgver=0.34.1 +_pkgver="$pkgver-beta" +pkgrel=1 +pkgdesc='A highly customizable, privacy-focused desktop YouTube client' +arch=('any') +url="https://opentubex.org" +license=('AGPL-3.0-or-later') +depends=('electron43') +optdepends=('ffmpeg: Use the system FFmpeg when installed before first launch; configurable later in Settings' + 'yt-dlp: Use the system yt-dlp when installed before first launch; configurable later in Settings') +makedepends=('git' 'npm' 'pnpm') +source=("$pkgname-$pkgver.tar.gz::${_ghurl}/archive/refs/tags/v${pkgver}-beta.tar.gz" + opentubex.desktop + opentubex.sh) +sha256sums=('f6c3b3cac88ebdedaa6ac85c63bd6a22ea916e639d6f37b037a4e18d1f7eddf7' + '03448152a98649991bc6a1f1c74fa20fb43d729f5aa7d2a17d0b2074b22a08f2' + 'ed9c3c54f5604389cac2e53df7f917ce6952a870abc409464e5b8ba590ca3d07') + +prepare() { + sed -i "/^export default {/a\\ electronDist: '/usr/lib/electron43'," \ + "$srcdir/$_pkgname-$_pkgver/_scripts/ebuilder.config.mjs" + sed -i "/Platform\\.LINUX\\.createTarget/s/\\[[^]]*\\]/['dir']/" \ + "$srcdir/$_pkgname-$_pkgver/_scripts/build.mjs" + grep -Fq "Platform.LINUX.createTarget(['dir'], arch)" \ + "$srcdir/$_pkgname-$_pkgver/_scripts/build.mjs" || { + printf '%s\n' 'Failed to restrict the OpenTubeX build to the unpacked directory' >&2 + return 1 + } +} + +build() { + cd "$srcdir/$_pkgname-$_pkgver" + pnpm install --frozen-lockfile + pnpm build +} + +package() { + install -d "${pkgdir}"/{usr/bin,usr/lib/opentubex} + cp -R "./$_pkgname-$_pkgver/build/linux-unpacked/resources/app.asar" "$pkgdir/usr/lib/$pkgname" + install -Dm755 "./opentubex.sh" "$pkgdir/usr/bin/opentubex" + + cd "$_pkgname-$_pkgver" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "./_icons/icon.svg" "$pkgdir/usr/share/pixmaps/opentubex.svg" + cd .. + install -Dm644 "opentubex.desktop" "$pkgdir/usr/share/applications/opentubex.desktop" +} |