You are not logged in.
Hello guys, I have been using this application for quite some time but haven't found a PKGBUILD for it so I wrote my own. I am hooping someone can review it to see if anything can be improved.
Thankyou
# Maintainer: InvisibleRasta
pkgname=extreme-infinitv
pkgver=1.6.0
pkgrel=1
pkgdesc="Cross-platform IPTV player for Xtream Codes and M3U/M3U8 playlists"
arch=('x86_64')
url="https://github.com/infinitel8p/Extreme-InfiniTV"
license=('GPL-3.0-or-later')
depends=('gtk3' 'webkit2gtk' 'libnm' 'perl' 'nodejs' 'libsecret' 'mpv' 'nasm')
makedepends=('rustup' 'pnpm' 'git' 'base-devel' 'nasm' 'mold' 'clang')
source=("${pkgname}::git+${url}.git#tag=v1.6.0")
sha256sums=('SKIP')
prepare() {
cd "${srcdir}/${pkgname}"
pnpm install
cd src-tauri
cargo clean
cargo update -p ring
}
build() {
cd "$srcdir/extreme-infinitv"
# Workaround for GNU Binutils 2.46 bug
export RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold -C lto=off"
unset LDFLAGS
unset CFLAGS
unset CXXFLAGS
pnpm tauri build --no-bundle
}
package() {
cd "$srcdir/extreme-infinitv"
# Install compiled binary
install -Dm755 "src-tauri/target/release/extreme-infinitv" "$pkgdir/usr/bin/extreme-infinitv-bin"
# Wrapper script that fixes Wayland GPU/rendering issues
install -Dm755 /dev/stdin "$pkgdir/usr/bin/extreme-infinitv" <<'EOF'
#!/bin/sh
mkdir -p /tmp/extreme-infinitv-egl
cp /usr/share/glvnd/egl_vendor.d/50_mesa.json /tmp/extreme-infinitv-egl/ 2>/dev/null || true
exec env \
__EGL_VENDOR_LIBRARY_DIRS=/tmp/extreme-infinitv-egl \
LIBGL_ALWAYS_SOFTWARE=1 \
GALLIUM_DRIVER=llvmpipe \
GDK_BACKEND=x11 \
DISPLAY="${DISPLAY:-:0}" \
/usr/bin/extreme-infinitv-bin "$@"
EOF
#Desktop entry
install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/extreme-infinitv.desktop" <<'EOF'
[Desktop Entry]
Name=Extreme InfiniTV
Exec=extreme-infinitv %U
Icon=extreme-infinitv
Type=Application
Categories=AudioVideo;Video;Player;
EOF
#Icon
install -Dm644 "src-tauri/icons/128x128.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/extreme-infinitv.png"
}Offline
I figured out there might be a better way of building the package starting directly from the deb file release:
What do you guys think? Which is the correct route?
# Maintainer: InvisibleRasta
pkgname=extreme-infinitv-bin
pkgver=1.6.0
pkgrel=1
pkgdesc="Cross-platform IPTV player for Xtream Codes and M3U/M3U8 playlists"
arch=('x86_64')
url="https://github.com/infinitel8p/Extreme-InfiniTV"
license=('MIT')
depends=('gtk3' 'webkit2gtk-4.1' 'libappindicator-gtk3' 'hicolor-icon-theme')
provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}")
# Fetch both the .deb and the missing LICENSE file from upstream main branch
source=("${pkgname}-${pkgver}.deb::${url}/releases/download/v${pkgver}/Extreme.InfiniTV_${pkgver}_amd64.deb"
"LICENSE::https://raw.githubusercontent.com/infinitel8p/Extreme-InfiniTV/main/LICENSE")
sha256sums=('0af49b1495da708ee3934fb03b0bd64fb214323407a37e6dc06986d4ef53037a'
'3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986')
package() {
# 1. Extract the application files safely into the packaging directory
if [ -f "$srcdir/data.tar.xz" ]; then
bsdtar -xf "$srcdir/data.tar.xz" -C "$pkgdir"
elif [ -f "$srcdir/data.tar.gz" ]; then
bsdtar -xf "$srcdir/data.tar.gz" -C "$pkgdir"
elif [ -d "$srcdir/usr" ]; then
cp -r "$srcdir/usr" "$pkgdir/"
fi
# 2. Place the standalone GitHub license into the official Arch directory structure
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# 3. Rename the original binary so my wrapper can call it safely
mv "$pkgdir/usr/bin/extreme-infinitv" "$pkgdir/usr/bin/extreme-infinitv-bin"
# 4. Create the execution wrapper script
install -Dm755 /dev/stdin "$pkgdir/usr/bin/extreme-infinitv" <<'EOF'
#!/bin/sh
mkdir -p /tmp/extreme-infinitv-egl
cp /usr/share/glvnd/egl_vendor.d/50_mesa.json /tmp/extreme-infinitv-egl/ 2>/dev/null || true
exec env \
__EGL_VENDOR_LIBRARY_DIRS=/tmp/extreme-infinitv-egl \
LIBGL_ALWAYS_SOFTWARE=1 \
GALLIUM_DRIVER=llvmpipe \
GDK_BACKEND=x11 \
DISPLAY="${DISPLAY:-:0}" \
/usr/bin/extreme-infinitv-bin "$@"
EOF
}Offline
depends=('gtk3' 'webkit2gtk' 'libnm' 'perl' 'nodejs' 'libsecret' 'mpv' 'nasm')tauri version 2 switched to webkit2gtk-4.1.
makedepends=('rustup' 'pnpm' 'git' 'base-devel' 'nasm' 'mold' 'clang')Is an implicit dependency for base-devel all PKGBUILDs and should not be included.
sha256sums=('SKIP')Pinned git sources can be check summed.
RUSTUP_TOOLCHAIN is not set and exported so the cargo calls will all fail in a clean chroot. Please see Rust package guidelines Prepare.
Offline
What do you guys think? Which is the correct route?
Both can be present in AUR addressing different needs.
Offline
Does it look better now?
# Maintainer: InvisibleRasta
pkgname=extreme-infinitv-bin
pkgver=1.6.0
pkgrel=1
pkgdesc="Cross-platform IPTV player for Xtream Codes and M3U/M3U8 playlists"
arch=('x86_64')
url="https://github.com/infinitel8p/Extreme-InfiniTV"
license=('GPL-3.0-or-later')
depends=('gtk3' 'webkit2gtk-4.1' 'libappindicator-gtk3' 'hicolor-icon-theme')
provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}")
# Fetch both the .deb and the missing LICENSE file from upstream main branch
source=("${pkgname}-${pkgver}.deb::${url}/releases/download/v${pkgver}/Extreme.InfiniTV_${pkgver}_amd64.deb"
"LICENSE::https://raw.githubusercontent.com/infinitel8p/Extreme-InfiniTV/main/LICENSE")
sha256sums=('0af49b1495da708ee3934fb03b0bd64fb214323407a37e6dc06986d4ef53037a'
'3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986')
package() {
# 1. Extract the application files safely into the packaging directory
if [ -f "$srcdir/data.tar.xz" ]; then
bsdtar -xf "$srcdir/data.tar.xz" -C "$pkgdir"
elif [ -f "$srcdir/data.tar.gz" ]; then
bsdtar -xf "$srcdir/data.tar.gz" -C "$pkgdir"
elif [ -d "$srcdir/usr" ]; then
cp -r "$srcdir/usr" "$pkgdir/"
fi
# 2. Place the standalone GitHub license into the official Arch directory structure
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# 3. Rename the original binary so my wrapper can call it safely
mv "$pkgdir/usr/bin/extreme-infinitv" "$pkgdir/usr/bin/extreme-infinitv-bin"
# 4. Create the execution wrapper script
install -Dm755 /dev/stdin "$pkgdir/usr/bin/extreme-infinitv" <<'EOF'
#!/bin/sh
mkdir -p /tmp/extreme-infinitv-egl
cp /usr/share/glvnd/egl_vendor.d/50_mesa.json /tmp/extreme-infinitv-egl/ 2>/dev/null || true
exec env \
__EGL_VENDOR_LIBRARY_DIRS=/tmp/extreme-infinitv-egl \
LIBGL_ALWAYS_SOFTWARE=1 \
GALLIUM_DRIVER=llvmpipe \
GDK_BACKEND=x11 \
DISPLAY="${DISPLAY:-:0}" \
/usr/bin/extreme-infinitv-bin "$@"
EOF
}# Maintainer: InvisibleRasta
pkgname=extreme-infinitv
pkgver=1.6.0
pkgrel=2
pkgdesc="Cross-platform IPTV player for Xtream Codes and M3U/M3U8 playlists"
arch=('x86_64')
url="https://github.com/infinitel8p/Extreme-InfiniTV"
license=('GPL-3.0-or-later')
depends=('gtk3' 'webkit2gtk-4.1' 'libnm' 'perl' 'nodejs' 'libsecret' 'mpv' 'nasm')
# Changed rustup to rust, added standard build variables
makedepends=('rust' 'pnpm' 'git' 'nasm' 'mold' 'clang')
source=("${pkgname}::git+${url}.git#tag=v1.6.0")
sha256sums=('c151181d0c3fe382cd095809752f0bfbd4d90343c34cbbe0b184a436b4b1ceba')
prepare() {
cd "${srcdir}/${pkgname}"
# Set up isolated environments for Node and Rust cache
export PNPM_HOME="${srcdir}/pnpm-cache"
export CARGO_HOME="${srcdir}/cargo-cache"
# Fetch all dependencies while network is available in prepare()
pnpm install
cd src-tauri
# Forces cargo to use the system stable toolchain instead of looking for rustup
export RUSTUP_TOOLCHAIN=stable
cargo update -p ring
}
build() {
cd "${srcdir}/${pkgname}"
# Re-export environments to use the cached dependencies fetched in prepare()
export PNPM_HOME="${srcdir}/pnpm-cache"
export CARGO_HOME="${srcdir}/cargo-cache"
export RUSTUP_TOOLCHAIN=stable
# FIX 1: Prevent rustc from stack-overflowing/segfaulting on complex macros
export RUST_MIN_STACK=16777216
# FIX 2: Target the custom linker cleanly without breaking proc-macro plugins
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER="clang"
export RUSTFLAGS="-C link-arg=-fuse-ld=mold -C lto=off"
unset LDFLAGS
unset CFLAGS
unset CXXFLAGS
# Build offline using cached assets
pnpm tauri build --no-bundle
}
package() {
cd "${srcdir}/${pkgname}"
# Install compiled binary
install -Dm755 "src-tauri/target/release/extreme-infinitv" "$pkgdir/usr/bin/extreme-infinitv-bin"
# Wrapper script that fixes Wayland GPU/rendering issues
install -Dm755 /dev/stdin "$pkgdir/usr/bin/extreme-infinitv" <<'EOF'
#!/bin/sh
mkdir -p /tmp/extreme-infinitv-egl
cp /usr/share/glvnd/egl_vendor.d/50_mesa.json /tmp/extreme-infinitv-egl/ 2>/dev/null || true
exec env \
__EGL_VENDOR_LIBRARY_DIRS=/tmp/extreme-infinitv-egl \
LIBGL_ALWAYS_SOFTWARE=1 \
GALLIUM_DRIVER=llvmpipe \
GDK_BACKEND=x11 \
DISPLAY="${DISPLAY:-:0}" \
/usr/bin/extreme-infinitv-bin "$@"
EOF
# Desktop entry
install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/extreme-infinitv.desktop" <<'EOF'
[Desktop Entry]
Name=Extreme InfiniTV
Exec=extreme-infinitv %U
Icon=extreme-infinitv
Type=Application
Categories=AudioVideo;Video;Player;
EOF
# Icon
install -Dm644 "src-tauri/icons/128x128.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/extreme-infinitv.png"
}Offline
Loqs asked you to read the rust package guidelines , please do that.
Also check https://wiki.archlinux.org/title/Node.j … guidelines .
As for the extreme-inifinty-bin :
package() is not the right function to extract files from downloaded archives.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I have removed the manual extraction entirely since makepkg handles it automatically it seems:
# Maintainer: InvisibleRasta
pkgname=extreme-infinitv-bin
pkgver=1.6.0
pkgrel=1
pkgdesc="Cross-platform IPTV player for Xtream Codes and M3U/M3U8 playlists"
arch=('x86_64')
url="https://github.com/infinitel8p/Extreme-InfiniTV"
license=('GPL-3.0-or-later')
depends=('gtk3' 'webkit2gtk-4.1' 'libappindicator-gtk3' 'hicolor-icon-theme')
provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}")
source=("${pkgname}-${pkgver}.deb::${url}/releases/download/v${pkgver}/Extreme.InfiniTV_${pkgver}_amd64.deb"
"LICENSE::https://raw.githubusercontent.com/infinitel8p/Extreme-InfiniTV/main/LICENSE")
sha256sums=('0af49b1495da708ee3934fb03b0bd64fb214323407a37e6dc06986d4ef53037a'
'3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986')
package() {
cp -a "$srcdir/usr" "$pkgdir/"
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
mv "$pkgdir/usr/bin/extreme-infinitv" "$pkgdir/usr/bin/extreme-infinitv-bin"
install -Dm755 /dev/stdin "$pkgdir/usr/bin/extreme-infinitv" <<'EOF'
#!/bin/sh
mkdir -p /tmp/extreme-infinitv-egl
cp /usr/share/glvnd/egl_vendor.d/50_mesa.json /tmp/extreme-infinitv-egl/ 2>/dev/null || true
exec env \
__EGL_VENDOR_LIBRARY_DIRS=/tmp/extreme-infinitv-egl \
LIBGL_ALWAYS_SOFTWARE=1 \
GALLIUM_DRIVER=llvmpipe \
GDK_BACKEND=x11 \
DISPLAY="${DISPLAY:-:0}" \
/usr/bin/extreme-infinitv-bin "$@"
EOF
}I am still trying to figure out the other PKGBUILD. Ill re-read the docs now and see if i figure it out.
Last edited by InvisibleRasta (Today 12:42:00)
Offline