From fc6501345a7d30f2bd515393a50f342fdff5fe73 Mon Sep 17 00:00:00 2001 From: Bono Fox Date: Sun, 7 Dec 2025 23:16:16 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20#120:=20Major-Repo-Deploy=20upda?= =?UTF-8?q?tes=20an=20own=20pkgbuild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 64 +++++++++++++++++++++++++++++-- deployment/cli/aur-major/.SRCINFO | 13 +++++++ deployment/cli/aur-major/LICENSE | 12 ++++++ deployment/cli/aur-major/PKGBUILD | 23 +++++++++++ deployment/gui/aur-major/.SRCINFO | 13 +++++++ deployment/gui/aur-major/LICENSE | 12 ++++++ deployment/gui/aur-major/PKGBUILD | 27 +++++++++++++ 7 files changed, 160 insertions(+), 4 deletions(-) create mode 100644 deployment/cli/aur-major/.SRCINFO create mode 100644 deployment/cli/aur-major/LICENSE create mode 100644 deployment/cli/aur-major/PKGBUILD create mode 100644 deployment/gui/aur-major/.SRCINFO create mode 100644 deployment/gui/aur-major/LICENSE create mode 100644 deployment/gui/aur-major/PKGBUILD diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f635050..19cfaa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,14 +99,45 @@ jobs: git archive --format=tar.gz -o tiny4linux-${VERSION}.tar.gz HEAD git archive --format=zip -o tiny4linux-${VERSION}.zip HEAD - - name: Update PKGBUILD & SRCINFO for the GUI with new version and SHA - if: ${{ github.event.inputs.deployment-aur-gui == 'true' }} + - name: Extract major version + id: vars + run: | + VERSION="${{ github.event.inputs.version }}" + echo "major=${VERSION%%.*}" >> $GITHUB_OUTPUT + + - name: Update PKGBUILD & SRCINFO for the GUI (Latest-Repo) with new version and SHA + if: ${{ github.event.inputs.deployment-aur-gui == 'true' && github.event.inputs.deploy-latest-version == 'true' }} + run: | + VERSION=${{ github.event.inputs.version }} + sha=$(sha256sum tiny4linux-${VERSION}.tar.gz | cut -d' ' -f1) + + cd deployment/gui/aur-major + + sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD + sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD + sed -i "s/^sha256sums=.*/sha256sums=('${sha}')/" PKGBUILD + + # Write-Permissions for Container-User + chmod -R 777 . + + docker run --rm -v $PWD:/pkg archlinux:latest bash -c " + pacman -Sy --noconfirm --needed base-devel shadow && + useradd -m builder || true && + chown -R builder:builder /pkg && + cd /pkg && + su - builder -c 'cd /pkg && makepkg --printsrcinfo > .SRCINFO' + " + + - name: Update PKGBUILD & SRCINFO for the GUI (Major-Repo) with new version and SHA + if: ${{ github.event.inputs.deployment-aur-gui == 'true' && github.event.inputs.deploy-major-version == 'true' }} run: | VERSION=${{ github.event.inputs.version }} + MAJOR=${{ steps.vars.outputs.major }} sha=$(sha256sum tiny4linux-${VERSION}.tar.gz | cut -d' ' -f1) cd deployment/gui/aur + sed -i "s/^pkgname=.*/pkgname=tiny4linux-gui-v${MAJOR}/" PKGBUILD sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD sed -i "s/^sha256sums=.*/sha256sums=('${sha}')/" PKGBUILD @@ -122,8 +153,8 @@ jobs: su - builder -c 'cd /pkg && makepkg --printsrcinfo > .SRCINFO' " - - name: Update PKGBUILD & SRCINFO for the CLI with new version and SHA - if: ${{ github.event.inputs.deployment-aur-cli == 'true' }} + - name: Update PKGBUILD & SRCINFO for the CLI (Latest-Repo) with new version and SHA + if: ${{ github.event.inputs.deployment-aur-cli == 'true' && github.event.inputs.deploy-latest-version == 'true' }} run: | VERSION=${{ github.event.inputs.version }} sha=$(sha256sum tiny4linux-${VERSION}.tar.gz | cut -d' ' -f1) @@ -145,6 +176,31 @@ jobs: su - builder -c 'cd /pkg && makepkg --printsrcinfo > .SRCINFO' " + - name: Update PKGBUILD & SRCINFO for the CLI (Major-Repo) with new version and SHA + if: ${{ github.event.inputs.deployment-aur-cli == 'true' && github.event.inputs.deploy-major-version == 'true' }} + run: | + VERSION=${{ github.event.inputs.version }} + MAJOR=${{ steps.vars.outputs.major }} + sha=$(sha256sum tiny4linux-${VERSION}.tar.gz | cut -d' ' -f1) + + cd deployment/cli/aur-major + + sed -i "s/^pkgname=.*/pkgname=tiny4linux-cli-v${MAJOR}/" PKGBUILD + sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD + sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD + sed -i "s/^sha256sums=.*/sha256sums=('${sha}')/" PKGBUILD + + # Write-Permissions for Container-User + chmod -R 777 . + + docker run --rm -v $PWD:/pkg archlinux:latest bash -c " + pacman -Sy --noconfirm --needed base-devel shadow && + useradd -m builder || true && + chown -R builder:builder /pkg && + cd /pkg && + su - builder -c 'cd /pkg && makepkg --printsrcinfo > .SRCINFO' + " + - name: Upload tarballs and metadata uses: actions/upload-artifact@v5 with: diff --git a/deployment/cli/aur-major/.SRCINFO b/deployment/cli/aur-major/.SRCINFO new file mode 100644 index 0000000..4902551 --- /dev/null +++ b/deployment/cli/aur-major/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = tiny4linux-cli + pkgdesc = A command line interface for controlling the OBSBOT Tiny series. + pkgver = 2.2.1 + pkgrel = 1 + url = https://github.com/OpenFoxes/Tiny4Linux + arch = x86_64 + license = EUPL + makedepends = rust + makedepends = cargo + source = https://github.com/OpenFoxes/Tiny4Linux/releases/download/v2.2.1/tiny4linux-2.2.1.tar.gz + sha256sums = 82e2935583068aa0586cf100c8650ea6078644d39fee8bb343a9dda8677fa198 + +pkgname = tiny4linux-cli diff --git a/deployment/cli/aur-major/LICENSE b/deployment/cli/aur-major/LICENSE new file mode 100644 index 0000000..b87c5e4 --- /dev/null +++ b/deployment/cli/aur-major/LICENSE @@ -0,0 +1,12 @@ +Copyright Arch Linux Contributors + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deployment/cli/aur-major/PKGBUILD b/deployment/cli/aur-major/PKGBUILD new file mode 100644 index 0000000..ae24f99 --- /dev/null +++ b/deployment/cli/aur-major/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Bono Fox + +pkgname=tiny4linux-cli-v2 +pkgver=2.2.1 +pkgrel=1 +pkgdesc="A command line interface for controlling the OBSBOT Tiny series." +arch=('x86_64') +url="https://github.com/OpenFoxes/Tiny4Linux" +license=('EUPL') +categories=('Utility') +depends=() +makedepends=('rust' 'cargo') +source=("$url/releases/download/v$pkgver/tiny4linux-$pkgver.tar.gz") +sha256sums=('82e2935583068aa0586cf100c8650ea6078644d39fee8bb343a9dda8677fa198') + +build() { + cargo build --release --features cli --locked +} + +package() { + install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname" + ln -s "/usr/bin/$pkgname" "$pkgdir/usr/bin/t4l" +} \ No newline at end of file diff --git a/deployment/gui/aur-major/.SRCINFO b/deployment/gui/aur-major/.SRCINFO new file mode 100644 index 0000000..570b5b4 --- /dev/null +++ b/deployment/gui/aur-major/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = tiny4linux-gui + pkgdesc = A graphical interface for controlling the OBSBOT Tiny series. + pkgver = 2.2.1 + pkgrel = 1 + url = https://github.com/OpenFoxes/Tiny4Linux + arch = x86_64 + license = EUPL + makedepends = rust + makedepends = cargo + source = https://github.com/OpenFoxes/Tiny4Linux/releases/download/v2.2.1/tiny4linux-2.2.1.tar.gz + sha256sums = 82e2935583068aa0586cf100c8650ea6078644d39fee8bb343a9dda8677fa198 + +pkgname = tiny4linux-gui diff --git a/deployment/gui/aur-major/LICENSE b/deployment/gui/aur-major/LICENSE new file mode 100644 index 0000000..b87c5e4 --- /dev/null +++ b/deployment/gui/aur-major/LICENSE @@ -0,0 +1,12 @@ +Copyright Arch Linux Contributors + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deployment/gui/aur-major/PKGBUILD b/deployment/gui/aur-major/PKGBUILD new file mode 100644 index 0000000..e0bcf0e --- /dev/null +++ b/deployment/gui/aur-major/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Bono Fox + +pkgname=tiny4linux-gui-v2 +pkgver=2.2.1 +pkgrel=1 +pkgdesc="A graphical interface for controlling the OBSBOT Tiny series." +arch=('x86_64') +url="https://github.com/OpenFoxes/Tiny4Linux" +license=('EUPL') +categories=('Utility') +depends=() +makedepends=('rust' 'cargo') +source=("$url/releases/download/v$pkgver/tiny4linux-$pkgver.tar.gz") +sha256sums=('82e2935583068aa0586cf100c8650ea6078644d39fee8bb343a9dda8677fa198') + +build() { + cargo build --release --features gui --locked +} + +package() { + install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname" + + install -Dm755 "target/release/assets/icon.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/tiny4linux.png" + install -Dm755 "target/release/assets/icon-widget.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/tiny4linux-widget.png" + install -Dm755 "src/gui/tiny4linux-dashboard.desktop" "$pkgdir/usr/share/applications/tiny4linux-dashboard.desktop" + install -Dm755 "src/gui/tiny4linux-widget.desktop" "$pkgdir/usr/share/applications/tiny4linux-widget.desktop" +} \ No newline at end of file