From 410a3f2a34f62501af013cf9063e66cb0dc30079 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Fri, 10 Apr 2026 15:25:26 +0200 Subject: [PATCH] first commit --- .SRCINFO | 12 ++++--- .gitignore | 6 ++-- LICENSE | 21 +++++++++++ PKGBUILD | 40 ++++++++++----------- README.md | 2 ++ push.sh | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 155 insertions(+), 27 deletions(-) create mode 100644 LICENSE create mode 100644 README.md create mode 100755 push.sh diff --git a/.SRCINFO b/.SRCINFO index 43f9460..124258b 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,13 +1,17 @@ pkgbase = open-video-downloader pkgdesc = A cross-platform GUI for youtube-dl made in Rust with Tauri and Vue + Typescript - pkgver = 3.1.1 + pkgver = 3.2.0 pkgrel = 1 url = https://github.com/jely2002/youtube-dl-gui arch = x86_64 license = AGPL3 depends = gtk3 - depends = webkit2gtk - source = open-video-downloader-3.1.1.deb::https://github.com/jely2002/youtube-dl-gui/releases/download/app-v3.1.1/Open.Video.Downloader_3.1.1_amd64.deb - sha256sums = 2ed12d3b2260b5253b96676c6ec33b5348fcc6cbe32df5f5dffc8ad340f6007d + depends = webkit2gtk-4.1 + provides = open-video-downloader + conflicts = open-video-downloader + options = !strip + options = !debug + source = open-video-downloader-3.2.0.deb::https://github.com/jely2002/youtube-dl-gui/releases/download/app-v3.2.0/Open.Video.Downloader_3.2.0_amd64.deb + sha256sums = 2a0190508c5b80d2801765073385439bf6dac7749473c19f842fbd5067f18e15 pkgname = open-video-downloader diff --git a/.gitignore b/.gitignore index 67eca15..6545585 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -pkg/ -src/ -*.pkg.tar.zst +# Sources *.deb +# built packages +*.pkg.tar.zst diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..04f030a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Bryan Joshua Pedini + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PKGBUILD b/PKGBUILD index e6d0367..0b913ff 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,25 +1,25 @@ -# Maintainer: Your Name -pkgname=open-video-downloader -pkgver=3.1.1 -pkgrel=1 +# Maintainer: Bryan Joshua Pedini + +_pkgname="open-video-downloader" +_srcname="youtube-dl-gui" +_srcmntr="jely2002" + +pkgname="${_pkgname}" +pkgver="3.2.0" +pkgrel="1" pkgdesc="A cross-platform GUI for youtube-dl made in Rust with Tauri and Vue + Typescript" -arch=('x86_64') -url="https://github.com/jely2002/youtube-dl-gui" -license=('AGPL3') -depends=('gtk3' 'webkit2gtk') -optdepends=() -source=("${pkgname}-${pkgver}.deb::https://github.com/jely2002/youtube-dl-gui/releases/download/app-v${pkgver}/Open.Video.Downloader_${pkgver}_amd64.deb") -sha256sums=('2ed12d3b2260b5253b96676c6ec33b5348fcc6cbe32df5f5dffc8ad340f6007d') +url="https://github.com/${_srcmntr}/${_srcname}" +arch=("x86_64") +license=("AGPL3") +options=("!strip" "!debug") +depends=("gtk3" "webkit2gtk-4.1") +_archive="${_pkgname}-${pkgver}.deb" +source=("${_archive}::https://github.com/${_srcmntr}/${_srcname}/releases/download/app-v${pkgver}/Open.Video.Downloader_${pkgver}_amd64.deb") +conflicts=("open-video-downloader") +provides=("open-video-downloader") + +sha256sums=("2a0190508c5b80d2801765073385439bf6dac7749473c19f842fbd5067f18e15") package() { - # Extract the .deb package bsdtar -xf "${srcdir}/data.tar.gz" -C "${pkgdir}" - - # Fix permissions - chmod -R u=rwX,go=rX "${pkgdir}" - - # Remove unnecessary files if present - if [ -d "${pkgdir}/usr/share/doc" ]; then - rm -rf "${pkgdir}/usr/share/doc" - fi } diff --git a/README.md b/README.md new file mode 100644 index 0000000..aef927f --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# open-video-downloader +PKGBUILD script for Arch Linux for `open-video-downloader` package diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..c2dd774 --- /dev/null +++ b/push.sh @@ -0,0 +1,101 @@ +#!/usr/bin/env bash + +# Variables +gui=false +desktop="Open Video Downloader.desktop" +icon="open-video-downloader.png" + +# Get version +oldver=$(grep -E "^pkgver=" PKGBUILD | sed 's/pkgver="//;s/"//') +if [ $# -eq 1 ]; then + pkgver="${1}" +else + echo "Old version: ${oldver}" + read -p "New version: " pkgver +fi + +# Check version +if [ "${pkgver}" = "${oldver}" ] && [ -z "${FORCE_REBUILD}" ]; then + echo >/dev/stderr "Error: same (old) version specified - update aborted" + exit 1 +fi + +# Get variables from PKGBUILD +url=$(sed -n '/^source=(/,/)/p' PKGBUILD | grep -oE 'https?://[^"]+') +pkgname=$(grep -E "^pkgname=" PKGBUILD | sed 's/pkgname="//;s/"//') +_pkgname=$(grep -E "^_pkgname=" PKGBUILD | sed 's/_pkgname="//;s/"//') +_srcname=$(grep -E "^_srcname=" PKGBUILD | sed 's/_srcname="//;s/"//') +_srcmntr=$(grep -E "^_srcmntr=" PKGBUILD | sed 's/_srcmntr="//;s/"//') +_archive=$(grep -E "^_archive=" PKGBUILD | sed 's/_archive="//;s/"//') +pkgrel=$(grep -E "^pkgrel=" PKGBUILD | sed 's/pkgrel="//;s/"//') +aur_url="ssh://aur@aur.archlinux.org/${pkgname}.git" +if [ "${gui}" = "true" ] && [ -n "${_pkgname}" ]; then + newdesktop="${_pkgname}.desktop" + newicon="${_pkgname}.png" +else + newdesktop="${package}.desktop" + newicon="${package}.png" +fi + +# Perform variable substitution +url="${url//\$\{pkgname\}/$pkgname}" +url="${url//\$\{_pkgname\}/$_pkgname}" +url="${url//\$\{_srcname\}/$_srcname}" +url="${url//\$\{_srcmntr\}/$_srcmntr}" +url="${url//\$\{pkgver\}/$pkgver}" +_archive="${_archive//\$\{pkgname\}/$pkgname}" +_archive="${_archive//\$\{_pkgname\}/$_pkgname}" +_archive="${_archive//\$\{pkgver\}/$pkgver}" +aur_url="${aur_url//\$\{_pkgname\}/$_pkgname}" + +# Download archive +wget -O ${_archive} "${url}" +# Extract icon / .desktop files if appimage +if printf '%s' "${_archive,,}" | grep -qi "appimage"; then + chmod +x "${_archive}" + "./${_archive}" --appimage-extract + cp "squashfs-root/${desktop}" "${newdesktop}" + cp "squashfs-root/${icon}" "${newicon}" + if [ -L "squashfs-root" ]; then + rm -rf $(readlink -f squashfs-root) squashfs-root + fi +fi +# Calculate checksums +sha256bin=$(sha256sum ${_archive} | awk '{print $1}') +if [ "${gui}" = "true" ]; then + sha256dsk=$(sha256sum ${newdesktop} | awk '{print $1}') + sha256ico=$(sha256sum ${newicon} | awk '{print $1}') +fi +# Yoink the archive - unnecessary anymore +rm -f ${_archive} + +# Update PKGBUILD with new values +sed -i -E "s/^pkgver=\"[^\"]+\"/pkgver=\"$pkgver\"/" PKGBUILD +if [ "${gui}" = "true" ]; then + sed -i '/^sha256sums=(/,/^)/c\ +sha256sums=(\ + "'"$sha256bin"'"\ + "'"$sha256dsk"'"\ + "'"$sha256ico"'"\ +)' PKGBUILD +else + sed -i -E "s|^sha256sums=.*|sha256sums=(\"$sha256bin\")|" PKGBUILD +fi +# Update .SRCINFO +makepkg --printsrcinfo > .SRCINFO + +# Create git message with correct variable +if [ -n "$_pkgname" ]; then + commit_msg="Updated ${pkgname//\$\{_pkgname\}/_pkgname} to ${pkgver}-${pkgrel}" +else + commit_msg="Updated ${pkgname} to ${pkgver}-${pkgrel}" +fi + +if [ -z "${NO_GIT_PUSH}" ]; then + # In case of fire, git commit, git push, leave building + git add . + git commit -m "Updated ${pkgname} to ${pkgver}-${pkgrel}" + git remote add aur ${aur_url} + git push origin main + git push aur main:master +fi