File e2-sat-editor.spec of Package e2-sat-editor

#
# spec file for package e2-sat-editor
#
# Copyright (c) 2024 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:           e2-sat-editor
Version:        1.5.0~git.180b033
Release:        0%{?dist}
Summary:        Satellite channel lists editor: Enigma2, Neutrino, dreambox
License:        GPL-3.0-only
URL:            https://github.com/ctlcltd/e2-sat-editor
BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  ninja
BuildRequires:  pkgconfig(Qt6Core)
BuildRequires:  pkgconfig(Qt6Widgets)
BuildRequires:  pkgconfig(Qt6PrintSupport)
BuildRequires:  pkgconfig(libcurl)
Source0:        %{name}-%{version}.tar.xz

%description
Satellite channel lists editor with tabbed nav for Enigma2, Neutrino, Lamedb, dreambox lists.

%prep
%setup -n %{name}-%{version}

%build
test -x "$(type -p gcc)"    && BUILDCC="$_"
test -x "$(type -p gcc)"    && CC="$_"
test -x "$(type -p g++)"    && CXX="$_"
test -x "$(type -p gcc-10)" && BUILDCC="$_"
test -x "$(type -p gcc-10)" && CC="$_"
test -x "$(type -p g++-10)" && CXX="$_"
test -x "$(type -p gcc-13)" && BUILDCC="$_"
test -x "$(type -p gcc-13)" && CC="$_"
test -x "$(type -p g++-13)" && CXX="$_"
export BUILDCC="$(readlink -f ${BUILDCC})"
export CC="$(readlink -f ${CC})"
export CXX="$(readlink -f ${CXX})"
cd src
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DRELEASE_MEDIUM=aur;
ninja -C build

%install
cd src
DESTDIR=%{buildroot} ninja -C build install;
install -Dm644 "build/License.txt" "%{buildroot}/usr/share/licenses/%{name}/copyright";
install -Dm644 "build/Readme.txt" "%{buildroot}/usr/share/doc/%{name}/readme"

%files
%dir %{_datadir}/%{name}
%dir %{_datadir}/e2se-cli
%dir %{_datadir}/doc/%{name}
%dir %{_datadir}/%{name}/translations
%dir %{_datadir}/licenses/%{name}
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_bindir}/%{name}
%{_bindir}/e2se-cli
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/e2se-cli.desktop
%{_datadir}/doc/%{name}/readme
%{_datadir}/%{name}/License.txt
%{_datadir}/%{name}/Readme.txt
%{_datadir}/%{name}/translations/e2se_ar.qm
%{_datadir}/%{name}/translations/e2se_bg.qm
%{_datadir}/%{name}/translations/e2se_ca.qm
%{_datadir}/%{name}/translations/e2se_cs.qm
%{_datadir}/%{name}/translations/e2se_da.qm
%{_datadir}/%{name}/translations/e2se_de.qm
%{_datadir}/%{name}/translations/e2se_en_EN.qm
%{_datadir}/%{name}/translations/e2se_en_US.qm
%{_datadir}/%{name}/translations/e2se_es.qm
%{_datadir}/%{name}/translations/e2se_fa.qm
%{_datadir}/%{name}/translations/e2se_fi.qm
%{_datadir}/%{name}/translations/e2se_fr.qm
%{_datadir}/%{name}/translations/e2se_gd.qm
%{_datadir}/%{name}/translations/e2se_gl.qm
%{_datadir}/%{name}/translations/e2se_he.qm
%{_datadir}/%{name}/translations/e2se_hr.qm
%{_datadir}/%{name}/translations/e2se_hu.qm
%{_datadir}/%{name}/translations/e2se_it.qm
%{_datadir}/%{name}/translations/e2se_ja.qm
%{_datadir}/%{name}/translations/e2se_ko.qm
%{_datadir}/%{name}/translations/e2se_lt.qm
%{_datadir}/%{name}/translations/e2se_lv.qm
%{_datadir}/%{name}/translations/e2se_nl.qm
%{_datadir}/%{name}/translations/e2se_nn.qm
%{_datadir}/%{name}/translations/e2se_pl.qm
%{_datadir}/%{name}/translations/e2se_pt_BR.qm
%{_datadir}/%{name}/translations/e2se_pt_PT.qm
%{_datadir}/%{name}/translations/e2se_ru.qm
%{_datadir}/%{name}/translations/e2se_sk.qm
%{_datadir}/%{name}/translations/e2se_sl.qm
%{_datadir}/%{name}/translations/e2se_sv.qm
%{_datadir}/%{name}/translations/e2se_tr.qm
%{_datadir}/%{name}/translations/e2se_uk.qm
%{_datadir}/%{name}/translations/e2se_zh_CN.qm
%{_datadir}/%{name}/translations/e2se_zh_TW.qm
%{_datadir}/e2se-cli/License.txt
%{_datadir}/e2se-cli/Readme.txt
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/licenses/%{name}/copyright
%{_datadir}/metainfo/io.github.ctlcltd.e2se.metainfo.xml

%changelog
openSUSE Build Service is sponsored by