summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPellegrino Prevete2023-06-20 01:47:48 +0200
committerPellegrino Prevete2023-06-20 01:47:48 +0200
commit5aa88f8aac1bb1675607958002179ede602381b6 (patch)
tree66a07d5bf995dff5acf588fc48cdbb94b18a7922 /PKGBUILD
downloadaur-5aa88f8aac1bb1675607958002179ede602381b6.tar.gz
initial release
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD74
1 files changed, 74 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f7eb847380bd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,74 @@
+# Maintainer: Pellegrino Prevete <pellegrinoprevete@gmail.com>
+# Contributor: katt <magunasu.b97@gmail.com>
+
+_pkgname=duckstation
+pkgname="${_pkgname}"
+pkgver=2023.06.08
+_pkgver="latest"
+pkgdesc='A Sony PlayStation (PSX) emulator, focusing on playability, speed, and long-term maintainability (git version)'
+pkgrel=1
+arch=(
+ x86_64
+ aarch64
+ i686
+ pentium4
+)
+url="https://github.com/stenzek/${_pkgname}"
+license=(GPL3)
+makedepends=(
+ cmake
+ extra-cmake-modules
+ git
+ qt6-tools
+ libdrm
+ libpulse
+ alsa-lib
+ sndio
+ gtk3
+ ninja
+)
+depends=(sdl2 qt6-base)
+optdepends=('psx-bios: PlayStation Bioses')
+_commit="2d78b3f26a18600cbeb1f7add97f345d7345deeb"
+source=(
+ "${_pkgname}-${_pkgver}::git+${url}#commit=${_commit}"
+ # "${url}/archive/refs/tags/${_pkgver}.tar.gz"
+)
+sha256sums=(
+ 'SKIP'
+ #'adc6af10f1a14059ebb00637dac7283760f6ef647ebaec224a0e6e88ac901f0a'
+)
+
+build() {
+ cmake -B build -S "${_pkgname}-${_pkgver}" \
+ -DBUILD_NOGUI_FRONTEND=OFF \
+ -DUSE_WAYLAND=ON \
+ -G Ninja \
+ -Wno-dev
+ ninja -C build
+}
+
+package() {
+ # Main files
+ install -m755 -d "${pkgdir}/opt"
+ cp -rv build/bin "${pkgdir}/opt/${_pkgname}"
+
+ # Symlink to /usr/bin
+ install -m755 -d "${pkgdir}/usr/bin"
+ ln -svt "${pkgdir}/usr/bin" "/opt/${_pkgname}/${_pkgname}"-{qt,nogui}
+
+ # Desktop file
+ cat > "${_pkgname}-${_pkgver}/data/resources/${_pkgname}.desktop" << EOF
+[Desktop Entry]
+Type=Application
+Name=DuckStation
+GenericName=PlayStation 1 Emulator
+Comment=Fast PlayStation 1 emulator
+Icon=duckstation
+TryExec=duckstation-qt
+Exec=duckstation-qt %f
+Categories=Game;Emulator;Qt;
+EOF
+ install -Dm644 "${_pkgname}-${_pkgver}/data/resources/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}-qt.desktop"
+ install -Dm644 "${_pkgname}-${_pkgver}/data/resources/images/duck.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
+}