-
-
Notifications
You must be signed in to change notification settings - Fork 180
add: youplaytx
#8861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ProfP30
wants to merge
6
commits into
pacstall:master
Choose a base branch
from
ProfP30:add-youplaytx
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+92
−0
Open
add: youplaytx
#8861
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
44879f0
add: youplaytx
ProfP30 af3102d
add: youplaytx
ProfP30 d79a8fd
Merge branch 'master' into add-youplaytx
Elsie19 f0e84d7
Apply suggestion from @Elsie19
ProfP30 b68e617
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c0e2fa8
Merge branch 'master' into add-youplaytx
ProfP30 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| pkgbase = youplaytx | ||
| pkgver = 0.4.4 | ||
| pkgrel = 1 | ||
| pkgdesc = Full-screen, dual-pane YouTube audio player for the terminal | ||
| url = https://codeberg.org/ProfP303/youplaytx | ||
| arch = any | ||
| depends = python3 | ||
| depends = python3-venv | ||
| depends = mpv | ||
| license = GPL-3.0-or-later | ||
| maintainer = ProfP303 <prof.p@gmx.net> | ||
| source = youplaytx-0.4.4.tar.gz::https://codeberg.org/ProfP303/youplaytx/archive/v0.4.4.tar.gz | ||
| sha256sums = 21b66bd0c4c59620a4a9a7aa8ae6bd89dc7461657eb12e2d7ae415d7a6574b40 | ||
|
|
||
| pkgname = youplaytx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| pkgname="youplaytx" | ||
| pkgver="0.4.4" | ||
| pkgrel="1" | ||
| pkgdesc="Full-screen, dual-pane YouTube audio player for the terminal" | ||
| arch=("any") | ||
| url="https://codeberg.org/ProfP303/youplaytx" | ||
| license=("GPL-3.0-or-later") | ||
| maintainer=("ProfP303 <prof.p@gmx.net>") | ||
|
|
||
| # Apt only provides system-level deps; Python deps (textual, python-mpv, | ||
| # yt-dlp, pyperclip, platformdirs, tomli-w) come from PyPI into a venv, | ||
| # because Ubuntu's python3-textual is far too old for this app. | ||
| depends=("python3" "python3-venv" "mpv") | ||
|
|
||
| # REQUIRED: pacstall builds inside a bubblewrap sandbox without network | ||
| # access unless this is set. pip needs it to reach PyPI. | ||
| external_connection=true | ||
|
|
||
| source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") | ||
| sha256sums=("21b66bd0c4c59620a4a9a7aa8ae6bd89dc7461657eb12e2d7ae415d7a6574b40") | ||
|
|
||
| package() { | ||
| # Do not rely on auto-cd: enter the extracted source explicitly. | ||
| # Forgejo/Codeberg tag tarballs extract to "<reponame>/" (no version). | ||
| cd "${srcdir}/${pkgname}" | ||
|
|
||
| local appdir="/opt/${pkgname}" | ||
| local stagedir="${pkgdir}${appdir}" | ||
|
|
||
| # 1) Self-contained venv inside the staged package. | ||
| python3 -m venv "${stagedir}" | ||
|
|
||
| # 2) Install the app + its PyPI deps. Calling pip as `python -m pip` | ||
| # (instead of the `pip` script) avoids the kernel's shebang length | ||
| # limit, which the long ${pkgdir} staging path can exceed. | ||
| # --no-compile: bytecode is generated in step 4 with clean paths. | ||
| "${stagedir}/bin/python" -m pip install --no-cache-dir --no-compile . | ||
|
|
||
| # 3) Strip the staging prefix from every *text* file that embeds it: | ||
| # console-script shebangs, activate scripts, pyvenv.cfg (its | ||
| # "command =" line records ${pkgdir} on Python 3.11+), and pip's | ||
| # RECORD/direct_url.json metadata. --binary-files=without-match | ||
| # guarantees sed never touches a binary file. | ||
| grep -rlZ --binary-files=without-match "${pkgdir}" "${stagedir}" \ | ||
| | xargs -0r sed -i "s|${pkgdir}||g" | ||
|
|
||
| # 4) Pre-compile bytecode with the staging prefix stripped (-s), so | ||
| # .pyc files and tracebacks reference /opt/... — and Python never | ||
| # needs to write into the root-owned /opt at runtime. | ||
| "${stagedir}/bin/python" -m compileall -q -s "${pkgdir}" "${stagedir}/lib" | ||
|
|
||
| # 5) Launcher on PATH. The symlink target must be the FINAL path, | ||
| # never ${pkgdir} — pkgdir is a temporary staging root that is | ||
| # deleted after the .deb is built. | ||
| mkdir -p "${pkgdir}/usr/bin" | ||
| ln -sf "${appdir}/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" | ||
|
|
||
| # 6) License. | ||
| install -Dm644 LICENSE -t "${pkgdir}/usr/share/doc/${pkgname}" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.