summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCiro Scognamiglio2024-08-06 11:46:38 +0200
committerCiro Scognamiglio2024-08-06 11:46:38 +0200
commit9962a16481d192056536f7e44d53c3a04727aaba (patch)
tree0f211fab56793a29307711b841b07880736891ad
downloadaur-9962a16481d192056536f7e44d53c3a04727aaba.tar.gz
init
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD63
-rw-r--r--bzr-player.sh62
4 files changed, 154 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..07ff356781ba
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = bzr-player
+ pkgdesc = Audio player supporting a wide types of multi-platform exotic file formats
+ pkgver = 2.0.73
+ pkgrel = 1
+ url = http://bzrplayer.blazer.nu
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = gendesk
+ makedepends = libarchive
+ depends = wine
+ depends = hicolor-icon-theme
+ noextract = BZR-Player-2.0.73.zip
+ options = !strip
+ source = BZR-Player-2.0.73.zip::http://bzrplayer.blazer.nu/getFile.php?id=2.0.73
+ source = https://raw.githubusercontent.com/ciros88/bzr2-linux/master/aur/bzr-player.sh
+ source = https://raw.githubusercontent.com/ciros88/bzr2-linux/master/bzr2_setup.sh
+ source = https://raw.githubusercontent.com/ciros88/bzr2-linux/master/x-bzr-player.xml
+ sha256sums = 9f373c73e882c06fcfd68ab37af79851f79fa63f8ae2af032c2251c80c33e9ef
+ sha256sums = ed63452a9e0dc65e73c35ac770cf52ea1c81d4c9a18935225e7c1510ffbe1a76
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = bzr-player
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..d62694ff42a5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!PKGBUILD
+!bzr-player.sh
+!.SRCINFO
+!.gitignore \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e280b5f437a9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Ciro Scognamiglio <ciro.scognamiglio88 at gmail dot com>
+# Contributor: Ciro Scognamiglio <ciro.scognamiglio88 at gmail dot com>
+
+pkgname='bzr-player'
+_pkgname='BZR Player'
+pkgver='2.0.73'
+pkgrel='1'
+pkgdesc='Audio player supporting a wide types of multi-platform exotic file formats'
+arch=('i686' 'x86_64')
+url="http://bzrplayer.blazer.nu"
+license=('GPL3')
+depends=('wine' 'hicolor-icon-theme')
+makedepends=('gendesk' 'libarchive')
+options=(!strip)
+_zip="BZR-Player-$pkgver.zip"
+_setup="bzr2_setup.sh"
+_mimes="x-bzr-player.xml"
+source=("$_zip::http://bzrplayer.blazer.nu/getFile.php?id=${pkgver}"
+ "https://raw.githubusercontent.com/ciros88/bzr2-linux/master/aur/$pkgname.sh"
+ "https://raw.githubusercontent.com/ciros88/bzr2-linux/master/$_setup"
+ "https://raw.githubusercontent.com/ciros88/bzr2-linux/master/$_mimes")
+noextract=("$_zip")
+sha256sums=('9f373c73e882c06fcfd68ab37af79851f79fa63f8ae2af032c2251c80c33e9ef'
+ 'ed63452a9e0dc65e73c35ac770cf52ea1c81d4c9a18935225e7c1510ffbe1a76'
+ 'SKIP'
+ 'SKIP')
+
+prepare() {
+ mkdir -p "${pkgname}-bin"
+ bsdtar -xf "$_zip" -C "${pkgname}-bin"
+
+ mapfile -t mime_types_supported < <(sed -n "\|mime_types_supported=(| , \|)|{p; \|)|q}" "$_setup" |
+ sed -e 's:mime_types_supported=(::g' -e 's:)::g' -e 's: :\n:g' | sed '/^[[:space:]]*$/d')
+
+ for mime_type in "${mime_types_supported[@]}"; do
+ desktop_entry_mime_types="$desktop_entry_mime_types$mime_type;"
+ done
+
+ desktop_entry_mime_types="${desktop_entry_mime_types%?}"
+
+ gendesk -n -f --pkgname "$pkgname" --pkgdesc "$pkgdesc" \
+ --name="$_pkgname" \
+ --genericname='Audio player' \
+ --exec="/usr/bin/$pkgname.sh %U" \
+ --icon="$pkgname" \
+ --categories='AudioVideo;Audio;Player;Music' \
+ --mimetype="$desktop_entry_mime_types"
+}
+
+package() {
+ install -dm755 "$pkgdir/usr/bin"
+ install -m755 "$pkgname.sh" "$pkgdir/usr/bin"
+ install -dm755 "$pkgdir/usr/share"
+ cp -a "${pkgname}-bin" "$pkgdir/usr/share/$pkgname"
+ install -Dm644 "${pkgname}-bin/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 "$_mimes" "$pkgdir/usr/share/mime/packages/$_mimes"
+ install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
+
+ for size in 16 32 48 64 128 256 512; do
+ install -Dm644 "$pkgdir/usr/share/$pkgname/data/resources/icon.png" \
+ "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/$pkgname.png"
+ done
+}
diff --git a/bzr-player.sh b/bzr-player.sh
new file mode 100644
index 000000000000..52bc20469677
--- /dev/null
+++ b/bzr-player.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+#
+# NAME
+# bzr-player.sh - BZR Player 2.x (BZR2) launcher
+#
+# SYNOPSIS
+# ./bzr-player.sh [target(s)]
+#
+# EXAMPLES
+# ./bzr-player.sh
+# run BZR2
+#
+# ./bzr-player.sh file1 file2 dir1 dir2
+# run BZR2 with selected files and/or directories as arguments
+#
+# AUTHOR
+# Ciro Scognamiglio
+
+set -e
+
+bzr2="bzr-player"
+bzr2_path_sys="/usr/share/$bzr2"
+bzr2_path_home="$HOME/.$bzr2"
+
+export WINEPREFIX="$bzr2_path_home/wine"
+export WINEDLLOVERRIDES="mscoree=" # disable mono
+
+if [ "$(uname -m)" == "x86_64" ]; then
+ export WINEARCH="win64"
+else
+ export WINEARCH="win32"
+fi
+
+if [ ! -d "$WINEPREFIX" ]; then
+ mkdir -p "$WINEPREFIX"
+
+ # disable wine crash dialog (winetricks nocrashdialog)
+ WINEDEBUG=-all wine reg add "HKEY_CURRENT_USER\Software\Wine\WineDbg" /v ShowCrashDialog /t REG_DWORD /d 0 /f
+
+ # disable wine debugger (winetricks autostart_winedbg=disabled)
+ WINEDEBUG=-all wine reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Debugger /t REG_SZ /d "false" /f
+
+ # --- app data setup ---
+ ln -s "$bzr2_path_sys/BZRPlayer.exe" "$bzr2_path_home/$bzr2"
+ ln -s "$bzr2_path_sys/BZRPlayerTest.exe" "$bzr2_path_home/$bzr2-test"
+
+ readarray -d '' root_dlls < <(find "$bzr2_path_sys" -maxdepth 1 -type f -iname '*.dll' -print0)
+
+ for root_dll in "${root_dlls[@]}"; do
+ ln -s "$root_dll" "$bzr2_path_home"
+ done
+
+ ln -s "$bzr2_path_sys/data" "$bzr2_path_home"
+ ln -s "$bzr2_path_sys/platforms" "$bzr2_path_home"
+ # END --- app data setup ---
+
+ # --- user data setup ---
+ cp -a "$bzr2_path_sys/user" "$bzr2_path_home"
+ # END --- user data setup ---
+fi
+
+wine "$bzr2_path_home/$bzr2" "$@" &