Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 60 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions deployment/cli/aur-major/.SRCINFO
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions deployment/cli/aur-major/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
23 changes: 23 additions & 0 deletions deployment/cli/aur-major/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Maintainer: Bono Fox <tiny4linux@bono-fox.de>

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"
}
13 changes: 13 additions & 0 deletions deployment/gui/aur-major/.SRCINFO
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions deployment/gui/aur-major/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
27 changes: 27 additions & 0 deletions deployment/gui/aur-major/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Maintainer: Bono Fox <tiny4linux@bono-fox.de>

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"
}