From 30df16cc767297c544e1311a3de4d10da30fe00c Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 29 Jul 2025 22:32:41 +1000 Subject: [PATCH] Scripts: Remove PKGBUILD I originally provided this an alternative to the broken AUR packages. However, it seems that Arch users would rather use broken packages and keep complaining to me instead of their packager. I specifically forbid packages for DuckStation (see README.md), and there's no way to request removal of these packages without handing my details over to a distribution I want nothing to do with. So this is step one. Next step will be removing Linux support entirely, because I'm sick of the headaches and hacks for an operating system that only compromises 2% of the userbase, and I don't even use myself. But I'm hoping the Linux community will be reasonable, because as someone giving up my free time and not being compensated in any way, I shouldn't have to deal with this. Just grep the source for "wayland" and you'll see what I mean. --- CMakeModules/DuckStationBuildSummary.cmake | 8 ++ scripts/packaging/arch/PKGBUILD | 146 --------------------- scripts/packaging/fedora/duckstation.spec | 93 ------------- 3 files changed, 8 insertions(+), 239 deletions(-) delete mode 100644 scripts/packaging/arch/PKGBUILD delete mode 100644 scripts/packaging/fedora/duckstation.spec diff --git a/CMakeModules/DuckStationBuildSummary.cmake b/CMakeModules/DuckStationBuildSummary.cmake index 33036a647..9ad337588 100644 --- a/CMakeModules/DuckStationBuildSummary.cmake +++ b/CMakeModules/DuckStationBuildSummary.cmake @@ -35,6 +35,14 @@ if(ALLOW_INSTALL) endif() endif() +# Refuse to build in Arch package environments. My license does not allow for packages, and I'm sick of +# dealing with people complaining about things broken by packagers. This is why we can't have nice things. +if(DEFINED ENV{DEBUGINFOD_URLS}) + if($ENV{DEBUGINFOD_URLS} MATCHES ".*archlinux.*") + message(FATAL_ERROR "Unsupported environment.") + endif() +endif() + if(DEFINED HOST_MIN_PAGE_SIZE AND DEFINED HOST_MAX_PAGE_SIZE) message(STATUS "Building with a dynamic page size of ${HOST_MIN_PAGE_SIZE} - ${HOST_MAX_PAGE_SIZE} bytes.") elseif(DEFINED HOST_PAGE_SIZE) diff --git a/scripts/packaging/arch/PKGBUILD b/scripts/packaging/arch/PKGBUILD deleted file mode 100644 index 6dc09cb72..000000000 --- a/scripts/packaging/arch/PKGBUILD +++ /dev/null @@ -1,146 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin -# SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -# NOTE: These package files are intended for your own personal/private use. -# You do not have permission to upload them independently to other package repositories. -# -# To build yourself: -# git clone https://github.com/stenzek/duckstation.git -# cd duckstation/scripts/packaging/arch -# makepkg -i - -pkgname=duckstation -pkgver=0 -pkgrel=1 -pkgdesc='PlayStation 1, aka. PSX Emulator' -arch=('x86_64' 'aarch64') -url='https://www.duckstation.org/' -license=('CC-BY-NC-ND-4.0') - -# We want to keep debug symbols for backtraces. -# Our cmake build already generates symbols. -options=('!strip' '!debug') - -# User-selectable dependencies (as .so), and packages. -depends=('libjpeg.so' # libjpeg or libjpeg-turbo - 'libudev.so' - 'curl' - 'dbus' - 'freetype2' - 'hicolor-icon-theme' - 'libpng' - 'libwebp' - 'libx11' - 'libxrandr' - 'libzip' - 'qt6-base>=6.9.1' - 'qt6-imageformats>=6.9.1' - 'qt6-svg>=6.9.1' - 'wayland' - 'zlib' - 'zstd' -) - -# qttools only needed for building (moc/uic/rcc/lupdate) -# Same with the compilers. -makedepends=('base-devel' - 'clang' - 'cmake' - 'extra-cmake-modules' - 'git' - 'lld' - 'llvm' - 'ninja' - 'qt6-tools>=6.9.1') - -source=( - "${pkgname}::git+file://${startdir}/../../.." - "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip" - "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip" -) -sha256sums=( - "SKIP" - "SKIP" - "SKIP" -) -noextract=( - "cheats.zip" - "patches.zip" -) - -# Name of the .desktop file that will be installed. -_desktopname=org.duckstation.DuckStation -_destdir=/opt/duckstation - -# https://wiki.archlinux.org/title/VCS_package_guidelines#Git -# --dirty omitted, we need to ignore changes to this script because -# makepkg is fricking weird and edits the build recipe, instead of -# just setting in the resulting file?! -pkgver() { - cd "$pkgname" - git describe | sed 's/\([^-]*-g\)/r\1/;s/-/./g' -} - -prepare() { - cd "${pkgname}" - - # Copy resources - cp "../cheats.zip" "../patches.zip" "data/resources" - - # Are we creating a CI/official build? - _tagpath="${startdir}/../../../src/scmversion/tag.h" - if [[ -f "${_tagpath}" ]]; then - echo "Copying SCM release tag..." - cp "${_tagpath}" src/scmversion - fi - - # build dependencies - if [[ ! -z "$DEPSDIR" ]]; then - _depsdir="$DEPSDIR" - echo "Using existing dependencies from ${_depsdir}." - else - _depsdir="$PWD/deps" - echo "Building dependencies to ${_depsdir}..." - ./scripts/deps/build-dependencies-linux.sh \ - -system-freetype -system-harfbuzz -system-libjpeg \ - -system-libpng -system-libwebp -system-libzip \ - -system-zlib -system-zstd -system-qt \ - "${_depsdir}" - fi -} - -build() { - cd "${pkgname}" - - rm -fr build-arch - cmake -B build-arch \ - -G Ninja \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_PREFIX_PATH="${_depsdir}" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ - -DCMAKE_INSTALL_PREFIX="${pkgdir}${_destdir}" \ - -DALLOW_INSTALL=ON - ninja -C build-arch -} - -package() { - cd "${pkgname}" - ninja -C build-arch install - - # install alias - mkdir -p "${pkgdir}/usr/bin" - ln -s "${_destdir}/duckstation-qt" "${pkgdir}/usr/bin/duckstation-qt" - - # install desktop file and icon - install -Dm644 scripts/packaging/${_desktopname}.desktop "${pkgdir}/usr/share/applications/${_desktopname}.desktop" - install -Dm644 scripts/packaging/${_desktopname}.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${_desktopname}.png" - - # install license - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - install -Dm644 data/resources/thirdparty.html "${pkgdir}/usr/share/licenses/${pkgname}/thirdparty.html" -} diff --git a/scripts/packaging/fedora/duckstation.spec b/scripts/packaging/fedora/duckstation.spec deleted file mode 100644 index 2902985e2..000000000 --- a/scripts/packaging/fedora/duckstation.spec +++ /dev/null @@ -1,93 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin -# SPDX-License-Identifier: CC-BY-NC-ND-4.0 - -# NOTE: These package files are intended for your own personal/private use. -# You do not have permission to upload them independently to other package repositories. -# -# To build: -# git clone https://github.com/stenzek/duckstation.git -# rpmbuild -bb scripts/packaging/fedora/duckstation.spec -# sudo rpm -ivh ~/rpmbuild/RPMS/duckstation-*.rpm - -Name: duckstation -Version: 0.0.0 -Release: 0%{?dist} -Summary: Fast PlayStation 1 Emulator -License: CC-BY-NC-ND-4.0 - -BuildRequires: alsa-lib-devel, clang, cmake, dbus-devel, egl-wayland-devel, extra-cmake-modules, gcc-c++ -BuildRequires: extra-cmake-modules, freetype-devel, libavcodec-free-devel, libavformat-free-devel -BuildRequires: libavutil-free-devel, libcurl-devel, libevdev-devel, libswresample-free-devel -BuildRequires: libswscale-free-devel, libpng-devel, libwebp-devel, libX11-devel, libXrandr-devel -BuildRequires: libzip-devel, libzip-tools, libzstd-devel, lld, llvm, make, mesa-libEGL-devel, mesa-libGL-devel -BuildRequires: ninja-build, patch, pipewire-devel pulseaudio-libs-devel, wayland-devel, zlib-devel -BuildRequires: qt6-qtbase-devel, qt6-qtbase-private-devel, qt6-qttools, qt6-qttools-devel - -Requires: bash curl dbus freetype libpng libwebp libzip libzstd -Requires: qt6-qtbase qt6-qtbase-gui qt6-qtimageformats qt6-qtsvg - -# Don't want extra flags producing a slower build than our other formats. -%undefine _hardened_build -%undefine _annotated_build -%undefine _fortify_level -%undefine _include_frame_pointers - -# Defines -O2, -flto, and others. We manage LTO ourselves. -%global _general_options "-O3" "-pipe" -%global _preprocessor_defines "" - -# We include debug information in the main package for user backtrace reporting. -%global debug_package %{nil} - -Source0: %{expand:%%(pwd)} - -%description -DuckStation is an simulator/emulator of the Sony PlayStation(TM) console, focusing on playability, speed, and long-term maintainability. The goal is to be as accurate as possible while maintaining performance suitable for low-end devices. -"Hack" options are discouraged, the default configuration should support all playable games with only some of the enhancements having compatibility issues. -"PlayStation" and "PSX" are registered trademarks of Sony Interactive Entertainment Europe Limited. This project is not affiliated in any way with Sony Interactive Entertainment. - -%prep -%setup -n duckstation -c -T -git clone file://%{SOURCEURL0} . -curl -L -o "data/resources/cheats.zip" "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip" -curl -L -o "data/resources/patches.zip" "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip" -if [ -f "%{SOURCEURL0}/src/scmversion/tag.h" ]; then - echo "Copying SCM release tag..." - cp "%{SOURCEURL0}/src/scmversion/tag.h" src/scmversion -fi - -%build - -if [ ! -d "${PWD}/deps" ]; then - scripts/deps/build-dependencies-linux.sh -system-freetype -system-harfbuzz -system-libjpeg -system-libpng -system-libwebp -system-libzip -system-zlib -system-zstd -system-qt "${PWD}/deps" -fi - -rm -fr build -cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH=${PWD}/deps \ - -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ - -DCMAKE_INSTALL_PREFIX=%{buildroot}/opt/%{name} \ - -DALLOW_INSTALL=ON -ninja -C build %{?_smp_mflags} - -%install -rm -fr %{buildroot} -ninja -C build install -mkdir -p %{buildroot}/usr/bin -ln -s /opt/duckstation/duckstation-qt %{buildroot}/usr/bin/duckstation-qt -install -Dm644 scripts/packaging/org.duckstation.DuckStation.png %{buildroot}/usr/share/icons/hicolor/512x512/apps/org.duckstation.DuckStation.png -install -Dm644 scripts/packaging/org.duckstation.DuckStation.desktop %{buildroot}/usr/share/applications/org.duckstation.DuckStation.desktop - -%files -%license LICENSE -/opt/duckstation -/usr/bin/duckstation-qt -/usr/share/icons/hicolor/512x512/apps/org.duckstation.DuckStation.png -/usr/share/applications/org.duckstation.DuckStation.desktop - -%changelog -