From de30f95c0e4d3f0b3799d1eceb8813b80c4727b5 Mon Sep 17 00:00:00 2001 From: Jonathan G. Underwood Date: Nov 23 2012 18:40:31 +0000 Subject: Initial package commit --- diff --git a/.gitignore b/.gitignore index e69de29..2d67de1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/v1.1.tar.gz diff --git a/plug-1.1-mustang345-update.patch b/plug-1.1-mustang345-update.patch new file mode 100644 index 0000000..214a85f --- /dev/null +++ b/plug-1.1-mustang345-update.patch @@ -0,0 +1,47 @@ +diff -up ./mainwindow.cpp.orig ./mainwindow.cpp +--- ./mainwindow.cpp.orig 2012-09-10 21:59:23.388373021 +0100 ++++ ./mainwindow.cpp 2012-09-10 22:29:57.776258400 +0100 +@@ -664,7 +664,7 @@ void MainWindow::update_firmware() + QString filename; + int ret = 0; + +- QMessageBox::information(this, "Prepare", "Please power off the amplifier, then power it back on while holding \"Save\" button.
After pressing \"OK\" choose firmware file and then update will begin.
It will take about one minute. You will be notified when it's finished."); ++ QMessageBox::information(this, "Prepare", "Please power off the amplifier, then power it back on while holding down:After pressing \"OK\" choose firmware file and then update will begin.It will take about one minute. You will be notified when it's finished."); + + filename = QFileDialog::getOpenFileName(this, tr("Open..."), QDir::homePath(), tr("Mustang firmware (*.upd)")); + if(filename.isEmpty()) +diff -up ./mustang.cpp.orig ./mustang.cpp +--- ./mustang.cpp.orig 2012-09-10 21:38:55.322810243 +0100 ++++ ./mustang.cpp 2012-09-10 23:02:36.685180287 +0100 +@@ -1286,11 +1286,15 @@ int Mustang::update(char *filename) + return ret; + + // get handle for the device +- amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, USB_UPDATE_PID); ++ amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, OLD_USB_UPDATE_PID); + if(amp_hand == NULL) + { +- libusb_exit(NULL); +- return -100; ++ amp_hand = libusb_open_device_with_vid_pid(NULL, USB_UPDATE_VID, NEW_USB_UPDATE_PID); ++ if(amp_hand == NULL) ++ { ++ libusb_exit(NULL); ++ return -100; ++ } + } + + // detach kernel driver +diff -up ./mustang.h.orig ./mustang.h +--- ./mustang.h.orig 2012-09-10 21:38:47.948033052 +0100 ++++ ./mustang.h 2012-09-10 21:40:04.731709631 +0100 +@@ -17,7 +17,8 @@ + + // amp's VID and PID while in update mode + #define USB_UPDATE_VID 0x1ed8 +-#define USB_UPDATE_PID 0x0006 ++#define OLD_USB_UPDATE_PID 0x0006 //Mustang I and II ++#define NEW_USB_UPDATE_PID 0x0007 //Mustang III, IV, V + + // for USB communication + #define TMOUT 500 diff --git a/plug-udev-rules b/plug-udev-rules new file mode 100644 index 0000000..baaadf1 --- /dev/null +++ b/plug-udev-rules @@ -0,0 +1,4 @@ +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ + ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="000[4567]", \ + ENV{ID_AMPLIFIER_PANEL}="1" +ENV{ID_AMPLIFIER_PANEL}=="1", TAG+="uaccess" diff --git a/plug.desktop b/plug.desktop new file mode 100644 index 0000000..c528d12 --- /dev/null +++ b/plug.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=plug +GenericName= +Comment=Linux software for Fender Mustang amplifiers +Exec=plug +Terminal=false +Categories=HardwareSettings;Settings;AudioVideo diff --git a/plug.spec b/plug.spec new file mode 100644 index 0000000..1e039f6 --- /dev/null +++ b/plug.spec @@ -0,0 +1,82 @@ +Name: plug +Version: 1.1 +Release: 6%{?dist} +Summary: Linux software for Fender Mustang amplifiers +Group: Applications/System + +License: GPLv3+ +Url: http://piorekf.org/plug/ +# The tarball has a rather unconventional name - v1.1.tar.gz +Source0: https://bitbucket.org/piorekf/plug/get/v%{version}.tar.gz +Source1: %{name}.desktop +Source2: plug-udev-rules + +# This patch adds support for firmware updates for the Mustang III, IV +# and V models. Sent upstream 10th Sept 2012. +Patch0: plug-1.1-mustang345-update.patch + +BuildRequires: pkgconfig(Qt) +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: desktop-file-utils + + +%description +Linux replacement for Fender FUSE software for Mustang amps. + + +%prep +# The way this tarball is packed up is rather unconventional! +%setup -q -n piorekf-plug-dabe5689fea6/plug + +%patch0 -p0 -b .mustang345 + +%build +qmake-qt4 QMAKE_CFLAGS="%{optflags}" \ + QMAKE_CXXFLAGS="%{optflags}" \ + QMAKE_STRIP=echo +make %{?_smp_mflags} + +%install +install -D -m 755 %{name} ${RPM_BUILD_ROOT}%{_bindir}/%{name} +install -D -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop + +# Install desktop file +desktop-file-install \ + --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ + %{SOURCE1} + +# Install udev rules +install -D -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_usr}/lib/udev/rules.d/50-mustang.rules + +%files +%doc README LICENSE +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_usr}/lib/udev/rules.d/50-mustang.rules + +%changelog +* Tue Oct 16 2012 Jonathan G. Underwood - 1.1-6 +- Change udev rules to be systemd conformant (See BZ 856002 comment 6) +- No longer created the plugdev group +- Drop unneeded README.Fedora file + +* Sun Sep 30 2012 Jonathan G. Underwood - 1.1-5 +- Change Group to Applications/System +- Untabify spec file +- Fix Source URL + +* Sun Sep 23 2012 Jonathan G. Underwood - 1.1-4 +- Remove BuildRequires for gcc-c++ +- Use pkgconfig style BuildRequires for qt-devel + +* Mon Sep 10 2012 Jonathan G. Underwood - 1.1-3 +- Add patch to allow updating of firmware for Mustang III, IV, V models + +* Sun Sep 9 2012 Jonathan G. Underwood - 1.1-2 +- Add udev rules +- Add creation of group "plugdev" on package install +- Add README.Fedora file + +* Sun Sep 9 2012 Jonathan G. Underwood - 1.1-1 +- Initial package + diff --git a/sources b/sources index e69de29..976a65d 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +514e1ff7c7b2d7af7c2ebd71be2789a8 v1.1.tar.gz