File karlyriceditor.spec of Package karlyriceditor
#
# spec file for package karlyriceditor
#
# Copyright (c) 2023 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: karlyriceditor
Version: @SERVICE@
Release: 0
Summary: Lyrics editor and CD+G/video exporter for Karaoke
License: GPL-3.0-or-later
Group: Productivity/Multimedia/Sound/Editors and Convertors
URL: https://github.com/gyunaev/karlyriceditor
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: gcc-c++
BuildRequires: pkgconfig
%if 0%{?suse_version} >= 1550
BuildRequires: ffmpeg-4-libavcodec-devel
BuildRequires: ffmpeg-4-libavformat-devel
BuildRequires: ffmpeg-4-libavutil-devel
BuildRequires: ffmpeg-4-libswresample-devel
BuildRequires: ffmpeg-4-libswscale-devel
%else
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libswresample)
BuildRequires: pkgconfig(libswscale)
%endif
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: update-desktop-files
Recommends: %{name}-lang
%description
Karaoke Lyrics Editor is a program which lets you edit and synchronize
lyrics with karaoke songs in various formats. Currently supported formats
include LRC, LRCv2 (supported by XBMC) and Ultrastar (without pitch).
Export into the CD+G format is supported, as well as export into video.
Unlike just regular lyrics available everywhere, lyrics suitable for
karaoke players need to have timing marks which tell the player when to
show a specific line, and when and how highlight the words. It has many
unique features which are missing even in the expensive commercial software.
%lang_package
%prep
%autosetup
sed -i "s/\(Icon=\).*/\1%{name}/" packages/%{name}.desktop
%build
lupdate-qt5 src/*.h src/*.cpp src/*.ui -ts ts/karlyriceditor_cs.ts
lrelease-qt5 ts/*.ts
%qmake5
%make_build
%install
#%%qmake5_install
install -Dm 0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm 0644 packages/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dm 0644 packages/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -Dm 0644 ts/%{name}_*.qm -t %{buildroot}%{_datadir}/%{name}/translations/
%suse_update_desktop_file -r -G "Karaoke Lyric Editor" %{name} AudioVideo AudioVideoEditing
%find_lang %{name} --with-qt
%files
%doc Changelog README.md "example/I will survive.lrc" "example/I will survive.mp3"
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.??g
%license LICENSE
%files lang -f %{name}.lang
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%changelog