File openav-luppp.spec of Package openav-luppp

#
# spec file for package openav-luppp
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2022 by Edgar Aichinger
#
# 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/
#


%global realname openAV-Luppp
Name:           openav-luppp
Version:        1.2.1
Release:        5%{?dist}
Summary:        Live performance mixing tool
License:        GPL-3.0-only
URL:            http://openavproductions.com/Luppp
Source0:        %{name}-%{version}.tar.xz
Source1:        loop.svg
Source2:        luppp.desktop
Source3:        luppp.appdata.xml
BuildRequires:  pkgconfig
BuildRequires:  meson
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(liblo)
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(ntk)
BuildRequires:  pkgconfig(samplerate)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  appdata-tools
%if %{defined fedora}
BuildRequires:  jack-audio-connection-kit-devel
BuildRequires:  desktop-file-utils
%endif
%if 0%{?suse_version}
BuildRequires:  pkgconfig(jack)
BuildRequires:  update-desktop-files
%endif

Requires:       hicolor-icon-theme == 0.17-3.9

%description
Luppp is a music creation tool, intended for live use. It focuses on
real time processing and a fast intuitive workflow. It uses Jack
for audio output.

%prep
%autosetup -n %{realname}-release-%{version}

%build
echo '#define GIT_VERSION "%{version}-%{release}"' > src/version.hxx
meson build
cd build
ninja

%install
install -s -p -D build/luppp %{buildroot}%{_bindir}/luppp
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -av resources/controllers %{buildroot}%{_datadir}/%{name}/
cp -av src/resources/luppp.prfs %{buildroot}%{_datadir}/%{name}/
install -p -Dm0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/luppp.svg
install -p -Dm0644 %{SOURCE3} %{buildroot}%{_datadir}/appdata/luppp.appdata.xml

%if %{defined fedora}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ %{SOURCE2}

# Note, but ignore appdata validation for now
appdata-validate %{buildroot}%{_datadir}/appdata/luppp.appdata.xml || :
%endif

%if 0%{?suse_version}
%suse_update_desktop_file -i luppp AudioVideo Music
%endif

%if %{defined fedora}
%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%{_bindir}/update-desktop-database &> /dev/null || :

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%{_bindir}/update-desktop-database &> /dev/null || :
%endif

%files
%license LICENSE
%doc CHANGELOG README.md
%dir %{_datadir}/appdata
%dir %{_datadir}/icons/hicolor/
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%{_datadir}/applications/*.desktop
%{_datadir}/appdata/*.appdata.xml

%changelog
openSUSE Build Service is sponsored by