File qlcplus.spec of Package qlcplus

#
# spec file for package qlcplus
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           qlcplus
Version:        4.11.2
Release:        0
Summary:        Q Light Controller+
License:        Apache-2.0
Group:          Productivity/Multimedia/Other
URL:            http://www.qlcplus.org/
Source:         https://github.com/mcallegari/qlcplus/archive/QLC+_%{version}/qlcplus-QLC-_%{version}.tar.gz
Patch0:         qlcplus-lib64.patch
BuildRequires:  gcc-c++
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Multimedia)
BuildRequires:  pkgconfig(Qt5Script)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(libftdi1)
BuildRequires:  pkgconfig(liblo)
BuildRequires:  pkgconfig(libola)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(libusb)
BuildRequires:  pkgconfig(mad)
BuildRequires:  pkgconfig(sndfile)

%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.

%prep
%setup -q -n qlcplus-QLC-_%{version}
%ifarch x86_64
%patch0 -p 1
%endif

%build
qmake-qt5
make %{?_smp_mflags}

%install
INSTALL_ROOT=%{buildroot} make install

# move udev rules to user dir (openSUSE policy)
mkdir -p %{buildroot}%{_libexecdir}/udev/rules.d
mv %{buildroot}%{_sysconfdir}/udev/rules.d/* %{buildroot}%{_libexecdir}/udev/rules.d/

%suse_update_desktop_file -i %{name} AudioVideo Sequencer Qt
%suse_update_desktop_file -i %{name}-fixtureeditor AudioVideo Sequencer Qt

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%license COPYING
%{_bindir}/qlcplus
%{_bindir}/qlcplus-fixtureeditor
%{_libdir}/libqlcplusengine*
%{_libdir}/libqlcplusui*
%{_libdir}/libqlcpluswebaccess*
%{_datadir}/qlcplus/
%{_libdir}/qt5/plugins/qlcplus/
%{_datadir}/applications/qlcplus.desktop
%{_datadir}/appdata/qlcplus*.xml
%{_mandir}/man1/qlcplus-fixtureeditor.1%{ext_man}
%{_mandir}/man1/qlcplus.1%{ext_man}
%{_datadir}/pixmaps/qlcplus.png
%{_datadir}/applications/qlcplus-fixtureeditor.desktop
%{_datadir}/pixmaps/qlcplus-fixtureeditor.png
%{_datadir}/mime/packages/qlcplus.xml
%{_udevrulesdir}/*

%changelog