From 4b7e3aebd149e8920bfc6220d470e43fa32cffd9 Mon Sep 17 00:00:00 2001 From: Martin Gansser Date: Dec 18 2018 20:36:56 +0000 Subject: Initial import (#1660409). --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ccc5b45 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/Cadence-4a5f5b4.tar.gz diff --git a/Cadence.spec b/Cadence.spec new file mode 100644 index 0000000..8af1afb --- /dev/null +++ b/Cadence.spec @@ -0,0 +1,168 @@ +# Global variables for github repository +%global commit0 4a5f5b445bfb3cd23a797c172dfbcb42e0cf114f +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global pname cadence +%global commitdate 20180827 + +Name: Cadence +Version: 1.0.0 +Release: 0.3.%{commitdate}git%{shortcommit0}%{?dist} +Summary: A set of tools useful for audio production +# The entire source code is GPLv2+ except c++/jackbridge/ which is ISC License +# Following files are licensed under LGPLv2+ +# data/pulse2jack/play+rec.pa +# data/pulse2jack/play.pa +# data/pulse2loopback/play+rec.pa +# data/pulse2loopback/play.pa +License: GPLv2+ +URL: https://github.com/falkTX/Cadence +Source0: https://github.com/falkTX/%{name}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz +Patch0: cadence_001_fedora_support.patch +Patch1: cadence-desktop-patch +Patch2: cadence-makefile.patch + +BuildRequires: gcc gcc-c++ +BuildRequires: python3-qt5-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: pulseaudio-libs-devel +BuildRequires: pulseaudio-module-jack +BuildRequires: python3-dbus +BuildRequires: a2jmidid +BuildRequires: jack-audio-connection-kit-devel +BuildRequires: jack-audio-connection-kit-dbus +BuildRequires: jack_capture +BuildRequires: desktop-file-utils + +Requires: hicolor-icon-theme +Requires: ladish +Requires: python3-qt5 +Requires: jack_capture +Requires: a2jmidid + +%description +Here's a brief description of the main tools: + +Cadence: +The main app. It performs system checks, manages JACK, calls other tools and +make system tweaks. + +Cadence-JackMeter: +Digital peak meter for JACK. +It automatically connects itself to all application JACK output ports that are +also connected to the system output. + +Cadence-JackSettings: +Simple and easy-to-use configure dialog for jackdbus. +It can configure JACK's driver and engine parameters, and it also supports +LADISH studios. + +Cadence-Logs: +Small tool that shows JACK, A2J, LASH and LADISH logs in a multi-tab window. +The logs are viewed in a text box, making it easy to browse and extract status +messages using copy and paste commands. + +Cadence-Render: +Tool to record (or 'render') a JACK project using jack-capture, controlled by +JACK Transport. +It supports a vast number of file types and can render in both realtime and +freewheel modes. + +Cadence-XY Controller: +Simple XY widget that sends and receives data from Jack MIDI. +It can send data through specific channels and has a MIDI Keyboard too. + +Catarina: +A Patchbay test app, created while the patchcanvas module was being developed. +It allows the user to experiment with the patchbay, without using ALSA, JACK or +LADISH. You can save & load patchbay configurations too. + +Catia: +JACK Patchbay, with some neat features like A2J bridge support and JACK +Transport. +It's supposed to be as simple as possible (there's Claudia for advanced things), +so it can work nicely on Windows and Mac too. +Currently has ALSA-MIDI support in experimental stage (it doesn't automatically +refresh the canvas when changes happen externally). + +Claudia: +LADISH frontend; just like Catia, but focused at session management through +LADISH. +It has a bit more features than the official LADISH GUI, with a nice preview of +the main canvas in the bottom-left. +It also implements the 'Claudia-Launcher' add-application style for LADISH. + +Claudia-Launcher: +A multimedia application launcher with LADISH support. +It searches for installed packages (not binaries), and displays the respective +content as a launcher. +The content is got through an hardcoded database, created and/or modified to +suit the target distribution. +Currently supports Debian and ArchLinux based distros. + +%prep +%autosetup -p 1 -n %{name}-%{commit0} + +# remove windows stuff +rm -rf data/windows/ + +# Fix error: Empty %%files file debugsourcefiles.list +sed -i "s|-O0 -g|%{optflags}|" c++/Makefile.mk +sed -i "s|DEBUG ?= false|DEBUG ?= true|" c++/Makefile.mk + +%build +%{set_build_flags} +%make_build + +%install +%make_install PREFIX=%{_prefix} + +# E: non-executable-script /usr/share/cadence/pulse2loopback/play+rec.pa 644 /usr/bin/pulseaudio -nF +chmod a+x %{buildroot}%{_datadir}/%{pname}/pulse2*/{play+rec,play,play+rec}.pa + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop + +%files +%doc README.md +%license COPYING +%{_bindir}/%{pname} +%{_bindir}/%{pname}-aloop-daemon +%{_bindir}/%{pname}-jackmeter +%{_bindir}/%{pname}-jacksettings +%{_bindir}/%{pname}-logs +%{_bindir}/%{pname}-pulse2jack +%{_bindir}/%{pname}-pulse2loopback +%{_bindir}/%{pname}-render +%{_bindir}/%{pname}-session-start +%{_bindir}/%{pname}-xycontroller +%{_bindir}/catarina +%{_bindir}/catia +%{_bindir}/claudia +%{_bindir}/claudia-launcher +%{_datadir}/applications/*.desktop +%dir %{_datadir}/%{pname}/ +%{_datadir}/%{pname}/icons/claudia-hicolor/*/apps/*.png +%{_datadir}/%{pname}/icons/claudia-hicolor/index.theme +%{_datadir}/icons/hicolor/*/apps/*.png +%{_datadir}/icons/hicolor/scalable/apps/*.svg +%{_datadir}/%{pname}/pulse2*/*.pa +%{_datadir}/%{pname}/templates/* +%{_datadir}/%{pname}/src/* +%config(noreplace) %{_sysconfdir}/X11/Xsession.d/61cadence-session-inject +%config(noreplace) %{_sysconfdir}/xdg/autostart/cadence-session-start.desktop + +%changelog +* Thu Dec 13 2018 Martin Gansser - 1.0.0-0.3.20180827git4a5f5b4 +- Add RR hicolor-icon-theme +- Add comment which files are licensed under LGPLv2+ +- Take ownership of dirs + +* Thu Dec 13 2018 Martin Gansser - 1.0.0-0.2.20180827git4a5f5b4 +- Use correct link for sources +- Use %%autosetup macro +- Use %%{set_build_flags} +- Use %%make_install PREFIX=%%{_prefix} +- List all files + +* Thu Dec 13 2018 Martin Gansser - 1.0.0-0.1.20180827git4a5f5b4 +- Initial build diff --git a/cadence-desktop-patch b/cadence-desktop-patch new file mode 100644 index 0000000..5a5a625 --- /dev/null +++ b/cadence-desktop-patch @@ -0,0 +1,99 @@ +--- a/data/cadence.desktop.orig 2018-12-15 10:51:40.521061279 +0100 ++++ b/data/cadence.desktop 2018-12-15 10:52:35.623750812 +0100 +@@ -7,60 +7,60 @@ + Icon=cadence + Terminal=false + Type=Application +-Categories=AudioVideo;AudioEditing;Qt; ++X-Categories=AudioVideo;AudioEditing;Qt; + X-Ayatana-Desktop-Shortcuts=Catia;Claudia;ClaudiaLauncher;Carla;CarlaControl;JackMeterIn;JackMeterOut;JackSettings;Logs;Render;XYController; + +-[Catia Shortcut Group] ++[X-Catia Shortcut Group] + Name=Catia + Exec=catia + TargetEnvironment=Unity + +-[Claudia Shortcut Group] ++[X-Claudia Shortcut Group] + Name=Claudia + Exec=claudia + TargetEnvironment=Unity + +-[ClaudiaLauncher Shortcut Group] ++[X-ClaudiaLauncher Shortcut Group] + Name=Claudia Launcher + Exec=claudia-launcher + TargetEnvironment=Unity + +-[Carla Shortcut Group] ++[X-Carla Shortcut Group] + Name=Carla + Exec=carla + TargetEnvironment=Unity + +-[CarlaControl Shortcut Group] ++[X-CarlaControl Shortcut Group] + Name=Carla Control + Exec=carla-control + TargetEnvironment=Unity + +-[JackMeterIn Shortcut Group] ++[X-JackMeterIn Shortcut Group] + Name=JACK Meter (Inputs) + Exec=cadence-jackmeter -in + TargetEnvironment=Unity + +-[JackMeterOut Shortcut Group] ++[X-JackMeterOut Shortcut Group] + Name=JACK Meter (Outputs) + Exec=cadence-jackmeter + TargetEnvironment=Unity + +-[JackSettings Shortcut Group] ++[X-JackSettings Shortcut Group] + Name=JACK Settings + Exec=cadence-jacksettings + TargetEnvironment=Unity + +-[Logs Shortcut Group] ++[X-Logs Shortcut Group] + Name=Logs + Exec=cadence-logs + TargetEnvironment=Unity + +-[Render Shortcut Group] ++[X-Render Shortcut Group] + Name=Render + Exec=cadence-render + TargetEnvironment=Unity + +-[XYController Shortcut Group] ++[X-XYController Shortcut Group] + Name=XY-Controller + Exec=cadence-xycontroller + TargetEnvironment=Unity +--- a/data/catia.desktop 2018-08-27 01:58:16.000000000 +0200 ++++ b/data/catia.desktop 2018-12-17 11:44:45.221039379 +0100 +@@ -7,4 +7,4 @@ + Icon=catia + Terminal=false + Type=Application +-Categories=AudioVideo;AudioEditing;Qt; ++X-Categories=AudioVideo;AudioEditing;Qt; +--- a/data/claudia.desktop 2018-08-27 01:58:16.000000000 +0200 ++++ b/data/claudia.desktop 2018-12-17 11:44:57.024426893 +0100 +@@ -7,4 +7,4 @@ + Icon=claudia + Terminal=false + Type=Application +-Categories=AudioVideo;AudioEditing;Qt; ++X-Categories=AudioVideo;AudioEditing;Qt; +--- a/data/claudia-launcher.desktop 2018-08-27 01:58:16.000000000 +0200 ++++ b/data/claudia-launcher.desktop 2018-12-17 11:44:50.882224866 +0100 +@@ -8,4 +8,4 @@ + Icon=claudia-launcher + Terminal=false + Type=Application +-Categories=AudioVideo;AudioEditing;Qt; ++X-Categories=AudioVideo;AudioEditing;Qt; diff --git a/cadence-makefile.patch b/cadence-makefile.patch new file mode 100644 index 0000000..a600941 --- /dev/null +++ b/cadence-makefile.patch @@ -0,0 +1,15 @@ +--- a/Makefile.orig 2018-12-17 19:46:32.127989328 +0100 ++++ b/Makefile 2018-12-17 19:46:50.383552645 +0100 +@@ -12,11 +12,7 @@ + PYRCC ?= pyrcc5 + + # Detect X11 rules dir +-ifeq "$(wildcard /etc/X11/Xsession.d/ )" "" +- X11_RC_DIR = $(DESTDIR)/etc/X11/xinit/xinitrc.d/ +-else +- X11_RC_DIR = $(DESTDIR)/etc/X11/Xsession.d/ +-endif ++X11_RC_DIR = $(DESTDIR)/etc/X11/Xsession.d/ + + # ----------------------------------------------------------------------------------------------------------------------------------------- + diff --git a/cadence_001_fedora_support.patch b/cadence_001_fedora_support.patch new file mode 100644 index 0000000..786a96a --- /dev/null +++ b/cadence_001_fedora_support.patch @@ -0,0 +1,132 @@ +From 8ec9214da5ff699a243917054fbf530fdb685546 Mon Sep 17 00:00:00 2001 +From: Yann Collette +Date: Sat, 12 May 2018 14:05:15 +0200 +Subject: [PATCH] fedora support + +--- + src/claudia_database.py | 2 ++ + src/claudia_launcher.py | 21 +++++++++++++++++++-- + src/shared_cadence.py | 21 +++++++++++++-------- + 3 files changed, 34 insertions(+), 10 deletions(-) + +diff --git a/src/claudia_database.py b/src/claudia_database.py +index 7424fbf..69e975c 100644 +--- a/src/claudia_database.py ++++ b/src/claudia_database.py +@@ -24,6 +24,8 @@ USING_KXSTUDIO = False + + list_DAW = [ + # Package AppName Type Binary Icon Template? Level (L, D, L, V, VST-Mode, T, M, MIDI-Mode) (doc-file, website) ++ [ "ardour5", "Ardour 5", "DAW", "ardour5", "ardour", TEMPLATE_NO, LEVEL_JS, (1, 0, 1, 1, "Native", 1, 1, "JACK"), ("", "http://www.ardour.org/") ], ++ + [ "ardour4", "Ardour 4", "DAW", "ardour4", "ardour", TEMPLATE_NO, LEVEL_JS, (1, 0, 1, 1, "Native", 1, 1, "JACK"), ("", "http://www.ardour.org/") ], + + [ "ariamaestosa", "Aria Maestosa", "MIDI Sequencer", "Aria", "aria", TEMPLATE_NO, LEVEL_0, (0, 0, 0, 0, "", 0, 1, "ALSA | JACK"), ("", "http://ariamaestosa.sf.net/") ], +diff --git a/src/claudia_launcher.py b/src/claudia_launcher.py +index dc06058..3bb6150 100755 +--- a/src/claudia_launcher.py ++++ b/src/claudia_launcher.py +@@ -20,6 +20,7 @@ + # Imports (Global) + + from random import randint ++import os + + if True: + from PyQt5.QtCore import pyqtSlot, Qt, QTimer, QSettings +@@ -119,6 +120,10 @@ class ClaudiaLauncher(QWidget, ui_claudia_launcher.Ui_ClaudiaLauncherW): + self._parent = None + self._settings = None + self.m_ladish_only = False ++ if os.path.isdir("/usr/lib64"): ++ self.lib_path = "lib64" ++ else: ++ self.lib_path = "lib" + + self.listDAW.setColumnWidth(0, 22) + self.listDAW.setColumnWidth(1, 225) +@@ -696,6 +701,18 @@ class ClaudiaLauncher(QWidget, ui_claudia_launcher.Ui_ClaudiaLauncherW): + for package in pkg_out: + pkglist.append(package) + ++ elif os.path.exists("/usr/bin/dnf"): ++ pkg_out = getoutput("env LANG=C LC_ALL=C /usr/bin/dnf list installed 2>/dev/null").split("\n") ++ for pkg_info in pkg_out[2:]: ++ package = pkg_info.split(" ")[0].split(".")[0] ++ pkglist.append(package.strip()) ++ ++ elif os.path.exists("/usr/bin/yum"): ++ pkg_out = getoutput("env LANG=C LC_ALL=C /usr/bin/yum list installed 2>/dev/null").split("\n") ++ for package in pkg_out[2:]: ++ package = pkg_info.split(" ")[0].split(".")[0] ++ pkglist.append(package.strip()) ++ + elif os.path.exists("/usr/bin/dpkg"): + pkg_out = getoutput("env LANG=C LC_ALL=C /usr/bin/dpkg --get-selections 2>/dev/null").split("\n") + for pkg_info in pkg_out: +@@ -823,10 +840,10 @@ class ClaudiaLauncher(QWidget, ui_claudia_launcher.Ui_ClaudiaLauncherW): + + last_pos += 1 + +- if haveCarla and os.path.exists("/usr/lib/carla/libcarla_utils.so"): ++ if haveCarla and os.path.exists("/usr/" + self.lib_path + "/carla/libcarla_utils.so"): + utils = CarlaUtils("/usr/lib/carla/libcarla_utils.so") + last_pos = 0 +- lv2path = os.getenv("LV2_PATH", "~/.lv2:/usr/lib/lv2:/usr/local/lib/lv2") ++ lv2path = os.getenv("LV2_PATH", "~/.lv2:/usr/" + self.lib_path + "/lv2:/usr/local/" + self.lib_path + "/lv2") + for i in range(utils.get_cached_plugin_count(PLUGIN_LV2, lv2path)): + plugin = utils.get_cached_plugin_info(PLUGIN_LV2, i) + +diff --git a/src/shared_cadence.py b/src/shared_cadence.py +index 2a819f3..d4b676c 100644 +--- a/src/shared_cadence.py ++++ b/src/shared_cadence.py +@@ -30,32 +30,37 @@ else: + # Imports (Custom Stuff) + + from shared import * ++import os + + # ------------------------------------------------------------------------------------------------------------ + # Default Plugin PATHs ++if os.path.isdir("/usr/lib64"): ++ LIB_PATH = "lib64" ++else: ++ LIB_PATH = "lib" + + DEFAULT_LADSPA_PATH = [ + os.path.join(HOME, ".ladspa"), +- os.path.join("/", "usr", "lib", "ladspa"), +- os.path.join("/", "usr", "local", "lib", "ladspa") ++ os.path.join("/", "usr", LIB_PATH, "ladspa"), ++ os.path.join("/", "usr", "local", LIB_PATH, "ladspa") + ] + + DEFAULT_DSSI_PATH = [ + os.path.join(HOME, ".dssi"), +- os.path.join("/", "usr", "lib", "dssi"), +- os.path.join("/", "usr", "local", "lib", "dssi") ++ os.path.join("/", "usr", LIB_PATH, "dssi"), ++ os.path.join("/", "usr", "local", LIB_PATH, "dssi") + ] + + DEFAULT_LV2_PATH = [ + os.path.join(HOME, ".lv2"), +- os.path.join("/", "usr", "lib", "lv2"), +- os.path.join("/", "usr", "local", "lib", "lv2") ++ os.path.join("/", "usr", LIB_PATH, "lv2"), ++ os.path.join("/", "usr", "local", LIB_PATH, "lv2") + ] + + DEFAULT_VST_PATH = [ + os.path.join(HOME, ".vst"), +- os.path.join("/", "usr", "lib", "vst"), +- os.path.join("/", "usr", "local", "lib", "vst") ++ os.path.join("/", "usr", LIB_PATH, "vst"), ++ os.path.join("/", "usr", "local", LIB_PATH, "vst") + ] + + # ------------------------------------------------------------------------------------------------------------ +-- +2.13.6 + diff --git a/sources b/sources new file mode 100644 index 0000000..5e555b1 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (Cadence-4a5f5b4.tar.gz) = 55d9194bef3ac974bade2572a0490f8c91519e39f013d00f0c6c0416dc044201695fe3ee64bc97d22693ac5b86f3819073eb670fce358ca5ac46ba7d160febb4