File raysession.spec of Package raysession
#
# spec file for package raysession
#
# Copyright (c) 2021 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: raysession
Version: 0.14.4
Release: 0%{?dist}
Summary: A JACK session manager
License: GPL-2.0-only
URL: https://github.com/Houston4444/RaySession
Source0: https://github.com/Houston4444/RaySession/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.xz
BuildRequires: alsa-devel
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: liblo-devel
BuildRequires: libqt5-linguist
BuildRequires: libqt5-qtbase-devel
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-qt5-devel
Requires(pre): python3-pyliblo3
Requires(pre): python3-qt5
Requires(pre): %{python_module alsa}
BuildArch: noarch
%description
Ray Session is a GNU/Linux session manager for audio programs as Ardour, Carla,
QTractor, Non-Timeline, etc... It uses the same API as Non Session Manager, so
programs compatible with NSM are also compatible with Ray Session.
As Non Session Manager, the principle is to load together audio programs, then
be able to save or close all documents together.
%prep
%autosetup
# Fix desktop categories
sed -i -e "s/AudioVideo;//g" data/share/applications/raysession.desktop
# Fix permission on executable scripts
chmod a+x src/shared/jacklib.py
chmod a+x data/*
chmod a+x session_scripts/save_via_window/ray-scripts/save_via_windows.sh
chmod a+x session_scripts/slow_open/ray-scripts/load.sh
chmod a+x src/bin/utility_script_starter.sh
chmod a+x src/gui/patchbay/patchcanvas/*.py
chmod a+x src/jack_config_script/*.sh
sed -i -e '/from cgitb import text/d' HoustonPatchbay/patchbay/patchcanvas/portgroup_widget.py
%build
%make_build PREFIX=%{_prefix} LRELEASE=lrelease-qt5
%install
%make_install PREFIX=%{_prefix} LRELEASE=lrelease-qt5
# Cleanup and redo symbolic links
rm %{buildroot}%{_bindir}/ray_git
rm %{buildroot}%{_bindir}/ray-jack_checker_daemon
rm %{buildroot}%{_bindir}/ray-jack_config_script
rm %{buildroot}%{_bindir}/ray-pulse2jack
ln -s %{_datadir}/raysession/src/bin/ray_git %{buildroot}%{_bindir}/ray_git
ln -s %{_datadir}/raysession/src/bin/ray-jack_checker_daemon %{buildroot}%{_bindir}/ray-jack_checker_daemon
ln -s %{_datadir}/raysession/src/bin/ray-jack_config_script %{buildroot}%{_bindir}/ray-jack_config_script
ln -s %{_datadir}/raysession/src/bin/ray-pulse2jack %{buildroot}%{_bindir}/ray-pulse2jack
desktop-file-install \
--add-category="Audio;AudioVideo;Qt" \
--delete-original \
--dir=%{buildroot}%{_datadir}/applications \
%{buildroot}/%{_datadir}/applications/%{name}.desktop
desktop-file-install \
--add-category="System" \
--delete-original \
--dir=%{buildroot}%{_datadir}/applications \
%{buildroot}/%{_datadir}/applications/ray-jack_checker.desktop
desktop-file-install \
--add-category="System" \
--delete-original \
--dir=%{buildroot}%{_datadir}/applications \
%{buildroot}/%{_datadir}/applications/ray-jackpatch.desktop
desktop-file-install \
--add-category="System" \
--delete-original \
--dir=%{buildroot}%{_datadir}/applications \
%{buildroot}/%{_datadir}/applications/ray-network.desktop
%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/ray-jack_checker.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/ray-jackpatch.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/ray-network.desktop
%fdupes -s %{buildroot}/%{_datadir}
%files
%doc README.md
%license COPYING
%dir %{_bindir}
%dir %{_datadir}/raysession
%dir %{_sysconfdir}/xdg/raysession
%dir %{_sysconfdir}/xdg/raysession/client_templates
%{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/icons/*
%{_datadir}/raysession/*
%{_sysconfdir}/xdg/raysession/client_templates/*
%changelog