Name: patchance Version: 1.3.0 Release: 1%{?dist} Summary: A JACK patch-bay GUI for GNU/Linux License: GPL-2.0-or-later URL: https://github.com/Houston4444/Patchance Source0: %{url}/releases/download/v%{version}/Patchance-%{version}-source.tar.gz Source1: GPL-2 BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-QtPy BuildRequires: make BuildRequires: gcc BuildRequires: python3-pyqt6 BuildRequires: qt6-linguist BuildRequires: qt-devel BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qttools-devel Requires: python3 Requires: python3-QtPy Requires: python-jack-client %description Patchance is a JACK patch bay GUI for GNU/Linux systems. It provides an easy-to-use interface for connecting audio, MIDI and CV ports and includes embedded themes and the HoustonPatchbay sub-module. %prep %autosetup -C %build # Prepare compiled resources and UI files (try to pre-generate Qt resource Python modules) # Detect available rcc/pyrcc/pyside rcc and generate `resources_rc.py` or .rcc + loader RC_CMD="" RC_CMD_TYPE="" if command -v pyrcc6 >/dev/null 2>&1; then RC_CMD_TYPE="pyrcc6" RC_CMD="pyrcc6 -o" elif python3 -c "import PyQt6.pyrcc_main" >/dev/null 2>&1; then RC_CMD_TYPE="pyqt6" RC_CMD="python3 -m PyQt6.pyrcc_main -o" elif command -v pyside6-rcc >/dev/null 2>&1; then RC_CMD_TYPE="pyside6" RC_CMD="pyside6-rcc -o" elif python3 -c "import PySide6.scripts.rcc" >/dev/null 2>&1; then RC_CMD_TYPE="pyside6mod" RC_CMD="python3 -m PySide6.scripts.rcc -o" elif command -v rcc >/dev/null 2>&1; then RC_CMD_TYPE="rcc" RC_CMD="rcc -binary -o" fi # resources in top-level `resources/` and in HoustonPatchbay if [ -n "$RC_CMD" ] && [ -f resources/resources.qrc ]; then if [ "$RC_CMD_TYPE" = "rcc" ]; then $RC_CMD src/resources.rcc resources/resources.qrc || true cat > src/resources_rc.py <<'PYR' from PyQt6.QtCore import QResource import os try: QResource.registerResource(os.path.join(os.path.dirname(__file__), 'resources.rcc')) except Exception: pass PYR else $RC_CMD src/resources_rc.py resources/resources.qrc || true fi chmod 644 src/resources_rc.py || true [ -f src/resources.rcc ] && chmod 644 src/resources.rcc || true fi if [ -n "$RC_CMD" ] && [ -f HoustonPatchbay/resources/resources.qrc ]; then mkdir -p HoustonPatchbay/source/patchbay || true if [ "$RC_CMD_TYPE" = "rcc" ]; then $RC_CMD HoustonPatchbay/source/patchbay/resources.rcc HoustonPatchbay/resources/resources.qrc || true cat > HoustonPatchbay/source/patchbay/resources_rc.py <<'PYR' from PyQt6.QtCore import QResource import os try: QResource.registerResource(os.path.join(os.path.dirname(__file__), 'resources.rcc')) except Exception: pass PYR else $RC_CMD HoustonPatchbay/source/patchbay/resources_rc.py HoustonPatchbay/resources/resources.qrc || true fi chmod 644 HoustonPatchbay/source/patchbay/resources_rc.py || true [ -f HoustonPatchbay/source/patchbay/resources.rcc ] && chmod 644 HoustonPatchbay/source/patchbay/resources.rcc || true fi # Now run the normal build %{__make} QT_VERSION=6 %install rm -rf %{buildroot} %{__make} install DESTDIR=%{buildroot} PREFIX=%{_prefix} QT_VERSION=6 # Remove any zero-length files left by failed resource compilation find %{buildroot} -type f -size 0 -exec rm -f {} + || : # Make files that contain a shebang executable (some installed python scripts) for f in $(grep -Il '^#!' -R %{buildroot} 2>/dev/null || true); do chmod 755 "$f" || true done # Use the packaged `GPL-2` file if it exists; fall back to `COPYING`. mkdir -p %{buildroot}/usr/share/licenses/%{name} # prefer the Source1 shipped GPL-2 in SOURCES (available in SOURCES/GPL-2) if [ -f %{SOURCE1} ]; then cp -p %{SOURCE1} %{buildroot}/usr/share/licenses/%{name}/COPYING || true elif [ -f GPL-2 ]; then cp -p GPL-2 %{buildroot}/usr/share/licenses/%{name}/COPYING || true elif [ -f COPYING ]; then cp -p COPYING %{buildroot}/usr/share/licenses/%{name}/COPYING || true fi # Remove compiled python bytecode and __pycache__ dirs so rpmlint won't complain find %{buildroot} -name '__pycache__' -type d -exec rm -rf {} + || : find %{buildroot} -name '*.pyc' -type f -delete || : # Remove hidden .directory files from installed manuals/themes find %{buildroot}%{_datadir}/patchance -name '.directory' -type f -delete || : # Remove duplicate icon and duplicate module copies installed into manual/source rm -f %{buildroot}%{_datadir}/patchance/HoustonPatchbay/manual/en/images/patchance.svg || : rm -f %{buildroot}%{_datadir}/patchance/HoustonPatchbay/manual/fr/images/patchance.svg || : rm -f %{buildroot}%{_datadir}/patchance/HoustonPatchbay/source/patchbay/patchcanvas/xdg.py || : # Install a minimal man page so rpmlint stops warning about missing manpage mkdir -p %{buildroot}%{_mandir}/man1 cat > %{buildroot}%{_mandir}/man1/patchance.1 <<'MAN' .TH patchance 1 "2026-01-21" "Patchance %VERSION%" "User Commands" .SH NAME patchance \- a JACK patch-bay GUI .SH SYNOPSIS .B patchance .RI [ options ] .SH DESCRIPTION Patchance is a graphical JACK patch-bay for GNU/Linux. .SH AUTHOR Erich Eickmeyer MAN %check # no upstream test suite true %files %{_prefix}/share/licenses/%{name}/COPYING %doc readme.md INSTALL.md CHANGELOG %{_bindir}/patchance %{_datadir}/patchance %exclude %{_datadir}/patchance/src/*.c %{_datadir}/applications/patchance.desktop # install all hicolor icons and scalable svg %{_datadir}/icons/hicolor/*/apps/patchance.png %{_datadir}/icons/hicolor/scalable/apps/patchance.svg %{_mandir}/man1/patchance.1* %package devel Summary: Development files for Patchance Group: Development/Tools Requires: %{name} = %{version}-%{release} %description -n %{name}-devel C source files and other development artifacts for building extensions or for developers working on Patchance. %files -n %{name}-devel %{_datadir}/patchance/src/*.c %changelog * Wed Jan 21 2026 Erich Eickmeyer - 1.3.0-1 - Initial Fedora RPM spec added