summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD41
-rw-r--r--mpc-qt.sh16
3 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..333649fcb3c4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = mpc-qt-bin
+ pkgdesc = A clone of Media Player Classic reimplemented in Qt.
+ pkgver = 23.12
+ pkgrel = 1
+ url = https://mpc-qt.github.io/
+ arch = x86_64
+ license = GPL-2.0-only
+ makedepends = fuse2
+ depends = mpv
+ depends = qt6-svg
+ provides = mpc-qt=23.12
+ conflicts = mpc-qt
+ options = !strip
+ source = mpc-qt-23.12.AppImage::https://github.com/mpc-qt/mpc-qt/releases/download/v23.12/mpc-qt-linux-x64-2312.AppImage
+ source = mpc-qt.sh
+ sha256sums = d4f19ef8ece49e5d7ab3a89f6aa0dea5aa7b209e9c0d975e062926c7a35b3f77
+ sha256sums = 788f604679c21265524a4c5f388bee840ef8047e2f43e7e5c4b47416ea39f0f7
+
+pkgname = mpc-qt-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6c09d700efe0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+pkgname=mpc-qt-bin
+pkgver=23.12
+pkgrel=1
+pkgdesc="A clone of Media Player Classic reimplemented in Qt."
+arch=('x86_64')
+url="https://mpc-qt.github.io/"
+_ghurl="https://github.com/mpc-qt/mpc-qt"
+license=('GPL-2.0-only')
+provides=("${pkgname%-bin}=${pkgver}")
+conflicts=("${pkgname%-bin}")
+depends=(
+ 'mpv'
+ 'qt6-svg'
+)
+makedepends=(
+ 'fuse2'
+)
+options=(
+ '!strip'
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}-linux-x64-${pkgver//./}.AppImage"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('d4f19ef8ece49e5d7ab3a89f6aa0dea5aa7b209e9c0d975e062926c7a35b3f77'
+ '788f604679c21265524a4c5f388bee840ef8047e2f43e7e5c4b47416ea39f0f7')
+build() {
+ sed -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@runname@|${pkgname%-bin}|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
+ chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
+ "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
+}
+package() {
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm755 -d "${pkgdir}/opt/${pkgname%-bin}"
+ cp -r "${srcdir}/squashfs-root/usr/"{bin,lib,plugins,translations} "${pkgdir}/opt/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.svg" -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
+ install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+} \ No newline at end of file
diff --git a/mpc-qt.sh b/mpc-qt.sh
new file mode 100644
index 000000000000..9556e07f9b79
--- /dev/null
+++ b/mpc-qt.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+_APPDIR="/opt/@appname@"
+_RUNNAME="${_APPDIR}/bin/@runname@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export QT_PLUGIN_PATH="${_APPDIR}/plugins:${QT_PLUGIN_PATH}"
+export QML_IMPORT_PATH="${_APPDIR}/qml:${QML_IMPORT_PATH}"
+export QML2_IMPORT_PATH="${_APPDIR}/qml:${QML2_IMPORT_PATH}"
+case "${XDG_CURRENT_DESKTOP}" in
+ *GNOME*|*gnome*|*XFCE*)
+ export QT_QPA_PLATFORMTHEME=gtk2
+ ;;
+esac
+cd "${_APPDIR}"
+exec "${_RUNNAME}" "$@" || exit $? \ No newline at end of file