1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
%define version %(echo $QLCPLUS_VERSION)
#define ui qmlui
Summary: Q Light Controller Plus - The free DMX lighting console
License: Apache License, Version 2.0
Name: qlcplus
Version: %{version}
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5Script)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5SerialPort)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(libftdi1)
BuildRequires: pkgconfig(libola)
BuildRequires: pkgconfig(libudev)
#BuildRequires: pkgconfig(mad)
BuildRequires: pkgconfig(sndfile)
%if %{defined fedora}
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: qt5-linguist
BuildRequires: qt5-qtconfiguration-devel
%if "%{ui}" == "qmlui"
BuildRequires: qt5-qt3d-devel
BuildRequires: qt5-qtsvg-devel
%endif
%else
BuildRequires: pkgconfig(libusb1)
BuildRequires: libqt5-linguist-devel
BuildRequires: update-desktop-files
%endif
Release: 1
Source: qlcplus-%{version}.tar.gz
URL: https://www.qlcplus.org/
%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.
#############################################################################
# Preparation
#############################################################################
%prep
%setup -q
sed -ie '/UDEVRULESDIR/s|/etc/udev/rules.d|/usr/lib/udev/rules.d|' variables.pri
#############################################################################
# Build
#############################################################################
%build
# qmake-qt5 will only include existing files in install_translations - create the .qm files first
%if "%{ui}" == "qmlui"
./translate.sh qmlui
qmake-qt5 CONFIG+=qmlui
%else
./translate.sh ui
qmake-qt5
%endif
make %{?_smp_mflags}
#############################################################################
# Install
#############################################################################
%install
INSTALL_ROOT=$RPM_BUILD_ROOT make install
%if "%{ui}" == "qmlui"
mv %{buildroot}/%{_bindir}/qlcplus-qml %{buildroot}/%{_bindir}/qlcplus
sed -i -e 's/Exec=qlcplus --open %f/Exec=qlcplus/g' %{buildroot}/%{_datadir}/applications/qlcplus.desktop
%endif
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
#############################################################################
# Post
#############################################################################
%if %{defined suse_version}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
#############################################################################
# Files
#############################################################################
%files
%{_bindir}/*
%{_libdir}/libqlcplusengine.so*
%if "%{ui}" != "qmlui"
%{_libdir}/libqlcplusui.so*
%{_libdir}/libqlcpluswebaccess.so*
%endif
%dir %{_datadir}/qlcplus
%{_datadir}/applications/*
%{_datadir}/metainfo/*
%{_datadir}/mime/packages/qlcplus.xml
%{_datadir}/pixmaps/*
%{_datadir}/qlcplus/Sample.qxw
%{_datadir}/qlcplus/fixtures
%{_datadir}/qlcplus/gobos
%{_datadir}/qlcplus/inputprofiles
%{_datadir}/qlcplus/miditemplates
%{_datadir}/qlcplus/modifierstemplates
%{_datadir}/qlcplus/rgbscripts
%{_datadir}/qlcplus/translations
%if "%{ui}" == "qmlui"
%{_datadir}/qlcplus/colorfilters
%{_datadir}/qlcplus/meshes
%else
%{_datadir}/qlcplus/web
%endif
#%_libdir/qt5/plugins/qlcplus/audio/libmadplugin.so
%_libdir/qt5/plugins/qlcplus/audio/libsndfileplugin.so
%_libdir/qt5/plugins/qlcplus/libartnet.so
%_libdir/qt5/plugins/qlcplus/libdmx4linux.so
%_libdir/qt5/plugins/qlcplus/libdmxusb.so
%_libdir/qt5/plugins/qlcplus/libe131.so
%_libdir/qt5/plugins/qlcplus/libenttecwing.so
%_libdir/qt5/plugins/qlcplus/libhidplugin.so
%_libdir/qt5/plugins/qlcplus/libloopback.so
%_libdir/qt5/plugins/qlcplus/libmidiplugin.so
%_libdir/qt5/plugins/qlcplus/libos2l.so
%_libdir/qt5/plugins/qlcplus/libosc.so
%_libdir/qt5/plugins/qlcplus/libpeperoni.so
%_libdir/qt5/plugins/qlcplus/libspi.so
%_libdir/qt5/plugins/qlcplus/libudmx.so
%if "%{ui}" != "qmlui"
%_mandir/*/*
%doc /usr/share/qlcplus/documents
%endif
/usr/lib/udev/rules.d/z65-anyma-udmx.rules
/usr/lib/udev/rules.d/z65-dmxusb.rules
/usr/lib/udev/rules.d/z65-fx5-hid.rules
/usr/lib/udev/rules.d/z65-peperoni.rules
/usr/lib/udev/rules.d/z65-spi.rules
|