Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: FreeTube-0.17.1
@ 2022-09-01  4:57 chloris-pale-green
  2022-09-01  5:05 ` [PR PATCH] [Updated] " chloris-pale-green
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: chloris-pale-green @ 2022-09-01  4:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]

There is a new pull request by chloris-pale-green against master on the void-packages repository

https://github.com/chloris-pale-green/void-packages FreeTube
https://github.com/void-linux/void-packages/pull/39019

New package: FreeTube-0.17.1
FreeTube is a privacy-focused desktop application for watching YouTube videos allowing for locally-stored history and subscriptions. Sadly, it is an Electron app, but has no real alternatives when privacy is a requirement.

This PR is also answering requests in #13420. The template is based on the AUR package [`freetube`](https://aur.archlinux.org/packages/freetube).

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl (masterdir, VM)
  - ARM architectures were not tested since Electron can not be cross-compiled

A patch file from https://github.com/void-linux/void-packages/pull/39019.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-FreeTube-39019.patch --]
[-- Type: text/x-diff, Size: 5063 bytes --]

From 832bf41ea5ff40f4cce749f9dd844e564b025545 Mon Sep 17 00:00:00 2001
From: Chloris <chloris@freedommail.ch>
Date: Thu, 1 Sep 2022 06:50:50 +0200
Subject: [PATCH] New package: FreeTube-0.17.1

---
 srcpkgs/FreeTube/files/FreeTube.desktop       | 10 ++++
 srcpkgs/FreeTube/files/FreeTube.sh            |  3 ++
 .../patches/do-not-download-electron.diff     | 10 ++++
 srcpkgs/FreeTube/patches/package-to-dir.diff  | 20 ++++++++
 srcpkgs/FreeTube/template                     | 51 +++++++++++++++++++
 5 files changed, 94 insertions(+)
 create mode 100644 srcpkgs/FreeTube/files/FreeTube.desktop
 create mode 100644 srcpkgs/FreeTube/files/FreeTube.sh
 create mode 100644 srcpkgs/FreeTube/patches/do-not-download-electron.diff
 create mode 100644 srcpkgs/FreeTube/patches/package-to-dir.diff
 create mode 100644 srcpkgs/FreeTube/template

diff --git a/srcpkgs/FreeTube/files/FreeTube.desktop b/srcpkgs/FreeTube/files/FreeTube.desktop
new file mode 100644
index 000000000000..c7625f4b0a2c
--- /dev/null
+++ b/srcpkgs/FreeTube/files/FreeTube.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=FreeTube
+GenericName=YouTube Player
+Comment=Open source desktop YouTube player built with privacy in mind
+Exec=FreeTube %U
+Terminal=false
+Type=Application
+Icon=FreeTube
+MimeType=x-scheme-handler/freetube;
+Categories=Network;
diff --git a/srcpkgs/FreeTube/files/FreeTube.sh b/srcpkgs/FreeTube/files/FreeTube.sh
new file mode 100644
index 000000000000..369291853a94
--- /dev/null
+++ b/srcpkgs/FreeTube/files/FreeTube.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec electron19 /usr/lib/FreeTube/app.asar "$@"
diff --git a/srcpkgs/FreeTube/patches/do-not-download-electron.diff b/srcpkgs/FreeTube/patches/do-not-download-electron.diff
new file mode 100644
index 000000000000..2c2fe847d9f3
--- /dev/null
+++ b/srcpkgs/FreeTube/patches/do-not-download-electron.diff
@@ -0,0 +1,10 @@
+--- a/_scripts/build.js	2022-08-12 04:09:42.000000000 +0200
++++ b/_scripts/build.js	2022-08-31 21:07:40.837066904 +0200
+@@ -39,6 +39,7 @@
+ const config = {
+   appId: `io.freetubeapp.${name}`,
+   copyright: 'Copyleft © 2020-2021 freetubeapp@protonmail.com',
++  electronDist: '/usr/lib/non-existent-electron',
+   // asar: false,
+   // compression: 'store',
+   productName,
diff --git a/srcpkgs/FreeTube/patches/package-to-dir.diff b/srcpkgs/FreeTube/patches/package-to-dir.diff
new file mode 100644
index 000000000000..f92d50d82432
--- /dev/null
+++ b/srcpkgs/FreeTube/patches/package-to-dir.diff
@@ -0,0 +1,20 @@
+--- a/_scripts/build.js	2022-08-12 04:09:42.000000000 +0200
++++ b/_scripts/build.js	2022-08-31 21:06:38.025503775 +0200
+@@ -33,7 +33,7 @@
+     arch = Arch.armv7l
+   }
+ 
+-  targets = Platform.LINUX.createTarget(['deb', 'zip', 'apk', 'rpm', 'AppImage', 'pacman'], arch)
++  targets = Platform.LINUX.createTarget(['dir'], arch)
+ }
+ 
+ const config = {
+@@ -97,7 +97,7 @@
+   linux: {
+     category: 'Network',
+     icon: '_icons/icon.svg',
+-    target: ['deb', 'zip', 'apk', 'rpm', 'AppImage', 'pacman'],
++    target: ['dir'],
+   },
+   // See the following issues for more information
+   // https://github.com/jordansissel/fpm/issues/1503
diff --git a/srcpkgs/FreeTube/template b/srcpkgs/FreeTube/template
new file mode 100644
index 000000000000..46656c2bfd91
--- /dev/null
+++ b/srcpkgs/FreeTube/template
@@ -0,0 +1,51 @@
+# Template file for 'FreeTube'
+pkgname=FreeTube
+version=0.17.1
+revision=1
+wrksrc="${pkgname}-${version}-beta"
+hostmakedepends="git nodejs yarn"
+depends="electron19 gtk+3 nss"
+short_desc="Open source desktop YouTube player built with privacy in mind"
+maintainer="Chloris <chloris@freedommail.ch>"
+license="AGPL-3.0-or-later"
+homepage="https://freetubeapp.io/"
+changelog="https://github.com/FreeTubeApp/FreeTube/releases"
+distfiles="https://github.com/FreeTubeApp/FreeTube/archive/refs/tags/v${version}-beta.tar.gz"
+checksum=7ae2e27d38b200c3b9a421bb1b794ef330d21c3e2f1550e50e27ff02a10a7d07
+
+do_build() {
+	yarn --cache-folder './yarn-cache' install
+	npm --cache './npm-cache' run build
+}
+
+do_install() {
+	vmkdir "usr/lib/${pkgname}"
+	vinstall 'build/linux-unpacked/resources/app.asar' 644 "usr/lib/${pkgname}"
+
+	vdoc 'README.md'
+	vlicense 'LICENSE'
+
+	vinstall '_icons/icon.svg' 644 'usr/share/pixmaps' "${pkgname}.svg"
+	vinstall "${FILESDIR}/${pkgname}.desktop" 644 'usr/share/applications'
+	vbin "${FILESDIR}/${pkgname}.sh" "${pkgname}"
+}
+
+#
+# BUILD PROCESS NOTE
+#
+# npm will try to either download Electron or copy local Electron into into the
+# build dir. Since one of the patches directs it to use an unexistent local
+# installation of Electron, the 'copying Electron' step will fail with error
+# 'Error: ENOENT: no such file or directory'.
+#
+# This error can be safely ignored - the only needed product of the build
+# process is 'app.asar'. Once installed, system installation of Electron will
+# be used to run the app.
+#
+
+#
+# DEPENDENCIES NOTE
+#
+# npm packages the app with Electron 16 by default. This version is not
+# available in Void repos, so the package uses Electron 19 instead.
+#

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-01-25 10:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01  4:57 [PR PATCH] New package: FreeTube-0.17.1 chloris-pale-green
2022-09-01  5:05 ` [PR PATCH] [Updated] " chloris-pale-green
2022-09-01  5:10 ` chloris-pale-green
2022-09-01  5:10 ` chloris-pale-green
2022-09-01  5:11 ` chloris-pale-green
2022-09-01  7:59 ` paper42
2022-09-01  8:11 ` chloris-pale-green
2022-09-01  8:13 ` [PR PATCH] [Updated] " chloris-pale-green
2022-10-15  4:13 ` autoteelar
2022-10-15  4:14 ` autoteelar
2022-10-15  8:41 ` paper42
2022-10-17 14:40 ` autoteelar
2022-11-03  7:43 ` [PR PATCH] [Updated] " chloris-pale-green
2023-01-25 10:18 ` chloris-pale-green
2023-01-25 10:20 ` [PR PATCH] [Closed]: " chloris-pale-green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).