File qlcplus5.spec of Package qlcplus5
#
# spec file for package qlcplus5
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 edogawa@aon.at
#
# 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/
#
# disable debuginfo packages for all target repos (some don't obey repo setup)
%global debug_package %{nil}
Name: qlcplus5
Version: 5.0.0
Release: 0
Summary: Q Light Controller Plus - The free DMX lighting console
License: Apache-2.0
Group: Productivity/Multimedia/Other
URL: http://www.qlcplus.org/
Source0: %{name}-%{version}.tar.xz
Source1: qlcplus-qml.desktop
Source2: qlcplus-qml.svg
Patch0: %{name}-udev.patch
Patch1: %{name}-scriptwrapper.patch
Patch2: %{name}-lrelease.patch
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: pkgconfig
BuildRequires: cmake(Qt6Multimedia)
BuildRequires: cmake(Qt6MultimediaWidgets)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt63DCore)
BuildRequires: cmake(Qt63DRender)
BuildRequires: cmake(Qt63DInput)
BuildRequires: cmake(Qt63DQuickExtras)
BuildRequires: cmake(Qt6PrintSupport)
BuildRequires: cmake(Qt6SerialPort)
BuildRequires: cmake(Qt6Test)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(libftdi1)
BuildRequires: pkgconfig(libola)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libusb)
BuildRequires: pkgconfig(mad)
BuildRequires: pkgconfig(sndfile)
%if %{defined fedora}
BuildRequires: qt6-linguist
BuildRequires: qt6-qtconfiguration-devel
%else
# disable post-build-checks
BuildRequires: -post-build-checks
Requires(post): /sbin/ldconfig
Requires(post): shared-mime-info
Requires(postun): /sbin/ldconfig
Requires(postun): shared-mime-info
%endif
Conflicts: qlcplus-qt5 qlcplus-qt5-git qlcplus-qt6-git qlcplus5-git
%description
QLC+ is a fork of the great QLC project written
by Heikki Junnila. This project aims to continue
the development of QLC and to introduce new features.
The primary goal is to bring QLC+ at the level
of other lighting control commercial softwares.
#############################################################################
# Plugins sub-package
#############################################################################
%package -n %{name}-olaplugin
Summary: OLA Plugin for QLC+
Group: Productivity/Multimedia/Other
Requires: %{name}
Requires: ola
%description olaplugin
QLC+ I/O plugin for the OLA (Open Light Architecture) server
#############################################################################
# Devel sub-package
#############################################################################
%package -n %{name}-devel
Summary: Development for QLC+
Group: Development/Sources
Requires: %{name} = %{version}
%description devel
Development package for Q Light Controller Plus
#############################################################################
# Preparation
#############################################################################
%prep
%autosetup -p1
#############################################################################
# Remove Unneeded Files/Dirs
#############################################################################
rm -rf debian
rm -rf create-*.sh
rm -rf *.bat
#############################################################################
# Prepare translation files
#############################################################################
./translate.sh release qmlui
#############################################################################
# Build
#############################################################################
%build
export QTDIR=/usr/lib64/qt6
%cmake -DCMAKE_PREFIX_PATH=%{_libdir}/cmake/Qt6 \
-DCMAKE_INSTALL_LIBDIR="%_lib" \
-DCMAKE_BUILD_TYPE="Release" \
-Dudev=ON \
-Dqmlui=ON
%cmake_build
#############################################################################
# Install
#############################################################################
%install
%cmake_install
mkdir -p %{buildroot}%{_udevrulesdir}
mv -v %{buildroot}%{_sysconfdir}/udev/rules.d/* %{buildroot}%{_udevrulesdir}
# remove installed pixmap icon
rm %{buildroot}%{_datadir}/pixmaps/qlcplus.png
# install alternate svg icon and v5 desktop file
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/
%fdupes %{buildroot}
%post
/sbin/ldconfig
%mime_database_post
%postun
/sbin/ldconfig
%mime_database_post
#############################################################################
# Files
#############################################################################
%files
%license COPYING
%{_bindir}/*
%{_libdir}/qt6/plugins/%{name}/*
%{_datadir}/applications/%{name}-qml.desktop
%{_datadir}/icons/*
%{_datadir}/%{name}/*
%{_datadir}/mime/packages/qlcplus.xml
%{_datadir}/metainfo/*
# %%{_mandir}/*/*
%{_udevrulesdir}/*
%files -n %{name}-olaplugin
%{_libdir}/qt6/plugins/%{name}/libolaio.so
%files -n %{name}-devel
%{_libdir}/libqlcplusengine.so
##############################################################################
# Change Log
##############################################################################
%changelog