diff --git a/.files b/.files new file mode 100644 index 0000000..8f20996 Binary files /dev/null and b/.files differ diff --git a/.meta b/.meta new file mode 100644 index 0000000..6c5cb60 --- /dev/null +++ b/.meta @@ -0,0 +1,5 @@ + + + + + diff --git a/.rev b/.rev new file mode 100644 index 0000000..0d00188 --- /dev/null +++ b/.rev @@ -0,0 +1,10 @@ + + + 7033e5717e7f274637cc505c36d3f1df + 1.4.3 + + RBrownFactory + New package + 990589 + + diff --git a/0001-Build-helper-libraries-as-OBJECT-libraries.patch b/0001-Build-helper-libraries-as-OBJECT-libraries.patch new file mode 100644 index 0000000..1ab8b1c --- /dev/null +++ b/0001-Build-helper-libraries-as-OBJECT-libraries.patch @@ -0,0 +1,65 @@ +From b1981342d58c9da1b71100f34967a90378f75cb2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Mon, 18 Jul 2022 18:23:37 +0200 +Subject: [PATCH] Build helper libraries as OBJECT libraries + +--- + cmake/Template.cmake | 2 +- + src/com/CMakeLists.txt | 10 +++++----- + src/ui/CMakeLists.txt | 3 ++- + 3 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/cmake/Template.cmake b/cmake/Template.cmake +index e7cfc25..6d04608 100644 +--- a/cmake/Template.cmake ++++ b/cmake/Template.cmake +@@ -8,4 +8,4 @@ configure_file(${TEMPLATE_DIR}/Version.cpp.in + @ONLY + ) + +-add_library(plug-version ${GENERATED_DIR}/Version.cpp) ++add_library(plug-version OBJECT ${GENERATED_DIR}/Version.cpp) +diff --git a/src/com/CMakeLists.txt b/src/com/CMakeLists.txt +index 54e7b1e..1ea814b 100644 +--- a/src/com/CMakeLists.txt ++++ b/src/com/CMakeLists.txt +@@ -1,17 +1,17 @@ + +-add_library(plug-mustang Mustang.cpp PacketSerializer.cpp Packet.cpp) +-add_library(plug-communication ++add_library(plug-mustang OBJECT Mustang.cpp PacketSerializer.cpp Packet.cpp) ++add_library(plug-communication OBJECT + UsbComm.cpp + ConnectionFactory.cpp + ) + +-add_library(plug-communication-usb ++add_library(plug-communication-usb OBJECT + UsbContext.cpp + UsbException.cpp + UsbDevice.cpp + ) + +-add_library(plug-libusb LibUsbCompat.cpp) ++add_library(plug-libusb OBJECT LibUsbCompat.cpp) + target_link_libraries(plug-libusb PUBLIC libusb-1.0::libusb-1.0) + +-add_library(plug-updater MustangUpdater.cpp) ++add_library(plug-updater OBJECT MustangUpdater.cpp) +diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt +index 5baab0c..1680247 100644 +--- a/src/ui/CMakeLists.txt ++++ b/src/ui/CMakeLists.txt +@@ -2,7 +2,8 @@ set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTOUIC ON) + set(CMAKE_AUTORCC ON) + +-add_library(plug-ui amp_advanced.cpp ++add_library(plug-ui OBJECT ++ amp_advanced.cpp + amplifier.cpp + defaulteffects.cpp + effect.cpp +-- +2.37.0 + diff --git a/0001-Improve-udev-rules-add-uaccess-support.patch b/0001-Improve-udev-rules-add-uaccess-support.patch new file mode 100644 index 0000000..07c60d2 --- /dev/null +++ b/0001-Improve-udev-rules-add-uaccess-support.patch @@ -0,0 +1,92 @@ +From 3a778c03b319188e71e8a6bcfd36e3dbadebac0c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Mon, 18 Jul 2022 18:57:14 +0200 +Subject: [PATCH] Improve udev rules, add uaccess support + +--- + cmake/50-mustang.rules | 28 ++++++++++++++++------------ + cmake/70-mustang-plugdev.rules | 6 ++++++ + cmake/70-mustang-uaccess.rules | 5 +++++ + cmake/Install.cmake | 5 ++++- + 4 files changed, 31 insertions(+), 13 deletions(-) + create mode 100644 cmake/70-mustang-plugdev.rules + create mode 100644 cmake/70-mustang-uaccess.rules + +diff --git a/cmake/50-mustang.rules b/cmake/50-mustang.rules +index 7c94d7b..3d43ac2 100644 +--- a/cmake/50-mustang.rules ++++ b/cmake/50-mustang.rules +@@ -1,15 +1,19 @@ + # udev rules for Fender Mustang Amps. Used by Plug. + +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0004", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0005", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0006", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0007", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0010", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0011", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0012", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0013", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0014", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0015", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0016", GROUP="plugdev" +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0017", GROUP="plugdev" ++ACTION!="add|bind", GOTO="mustang_plug_rules_end" ++SUBSYSTEM!="usb", GOTO="mustang_plug_rules_end" + ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0004", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0005", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0006", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0007", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0010", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0011", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0012", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0013", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0014", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0015", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0016", ENV{ID_MUSTANG_AMP}="1" ++ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0017", ENV{ID_MUSTANG_AMP}="1" ++ ++LABEL="mustang_plug_rules_end" +diff --git a/cmake/70-mustang-plugdev.rules b/cmake/70-mustang-plugdev.rules +new file mode 100644 +index 0000000..ce270c2 +--- /dev/null ++++ b/cmake/70-mustang-plugdev.rules +@@ -0,0 +1,6 @@ ++ACTION!="add|bind", GOTO="mustang_plug_plugdev_end" ++ ++ENV{ID_MUSTANG_AMP}=="?*", GROUP="plugdev" ++ ++LABEL="mustang_plug_plugdev_end" ++ +diff --git a/cmake/70-mustang-uaccess.rules b/cmake/70-mustang-uaccess.rules +new file mode 100644 +index 0000000..56d7ec5 +--- /dev/null ++++ b/cmake/70-mustang-uaccess.rules +@@ -0,0 +1,5 @@ ++ACTION!="add|bind", GOTO="mustang_plug_uaccess_end" ++ ++ENV{ID_MUSTANG_AMP}=="?*", TAG+="uaccess" ++ ++LABEL="mustang_plug_uaccess_end" +diff --git a/cmake/Install.cmake b/cmake/Install.cmake +index dbf05da..714c9a8 100644 +--- a/cmake/Install.cmake ++++ b/cmake/Install.cmake +@@ -1,7 +1,10 @@ + set(PLUG_UDEV_RULE_PATH "/lib/udev/rules.d" CACHE PATH "Udev rules directory.") + set(PLUG_DESKTOP_PATH "/lib/share/applications" CACHE PATH "Desktop file directory.") + +-install(FILES ${CMAKE_SOURCE_DIR}/cmake/50-mustang.rules ++install(FILES ++ ${CMAKE_SOURCE_DIR}/cmake/50-mustang.rules ++ ${CMAKE_SOURCE_DIR}/cmake/70-mustang-uaccess.rules ++ ${CMAKE_SOURCE_DIR}/cmake/70-mustang-plugdev.rules + DESTINATION ${PLUG_UDEV_RULE_PATH} + ) + install(FILES ${CMAKE_SOURCE_DIR}/cmake/plug.desktop +-- +2.37.0 + diff --git a/mustang-plug-1.4.3.tar.gz b/mustang-plug-1.4.3.tar.gz new file mode 120000 index 0000000..975f9b4 --- /dev/null +++ b/mustang-plug-1.4.3.tar.gz @@ -0,0 +1 @@ +/ipfs/bafkreicqfkzd3o7z5ygrt2obfo2f62urpvfi2wdrax25fwcikb67amvzne \ No newline at end of file diff --git a/mustang-plug.changes b/mustang-plug.changes new file mode 100644 index 0000000..fe042c1 --- /dev/null +++ b/mustang-plug.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Jul 18 16:00:19 UTC 2022 - Stefan BrĂ¼ns + +- Initial package version (1.4.3) diff --git a/mustang-plug.spec b/mustang-plug.spec new file mode 100644 index 0000000..81e959f --- /dev/null +++ b/mustang-plug.spec @@ -0,0 +1,87 @@ +# +# spec file for package mustang-plug +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: mustang-plug +Version: 1.4.3 +Release: 0 +Summary: Software for Fender Mustang amps +License: GPL-3.0-or-later +URL: https://github.com/offa/plug +Source0: https://github.com/offa/plug/archive/refs/tags/v%{version}.tar.gz#/mustang-plug-%{version}.tar.gz +Source1: mustang-plug.svg +Patch0: 0001-Build-helper-libraries-as-OBJECT-libraries.patch +Patch1: 0001-Improve-udev-rules-add-uaccess-support.patch +BuildRequires: cmake +BuildRequires: hicolor-icon-theme +BuildRequires: cmake(Qt5Core) +BuildRequires: cmake(Qt5Gui) +BuildRequires: cmake(Qt5Widgets) +BuildRequires: pkgconfig(gmock) +BuildRequires: pkgconfig(gtest) +BuildRequires: pkgconfig(libusb-1.0) +Recommends: %{name}-udev-rules + +%description +Graphical interface to control amplifier and effect stages +of Fender Mustang guitar amplifiers. + +%package udev-rules +Summary: Udev rules to grant access to Mustang amps +BuildArch: noarch + +%description udev-rules +Graphical interface to control amplifier and effect stages +of Fender Mustang guitar amplifiers. + +This sub-package contains udev rules granting access to the +hardware for regular (non-root) users. + +%prep +%autosetup -n plug-%{version} -p1 + +%build +%cmake \ + -DPLUG_UDEV_RULE_PATH:PATH=%{_udevrulesdir} \ + -DPLUG_DESKTOP_PATH:PATH=%{_datadir}/applications/ \ + %{nil} +%cmake_build + +%install +%cmake_install +install -m 0644 -D -t %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ %{S:1} +# Remove pointless cmake config +rm %{buildroot}%{_datadir}/plug/cmake/* +rmdir --ignore-fail-on-non-empty -p %{buildroot}%{_datadir}/plug/cmake +# Remove Debian specific plugdev udev rules +rm %{buildroot}%{_udevrulesdir}/*-plugdev.rules + +sed -i -e 's@.*Icon=.*@Icon=mustang-plug@' -e '/.*Path=.*/ d' %{buildroot}%{_datadir}/applications/*desktop + +%check +%ctest + +%files +%license LICENSE +%{_bindir}/* +%{_datadir}/applications/*desktop +%{_datadir}/icons/hicolor/scalable/apps/*.svg + +%files udev-rules +%{_udevrulesdir}/* + +%changelog diff --git a/mustang-plug.svg b/mustang-plug.svg new file mode 100644 index 0000000..3244ad0 --- /dev/null +++ b/mustang-plug.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +