File quran.spec of Package quran-flutter

#
# spec file for package quran
#
# 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/
#


%global __brp_check_rpaths %{nil}
Name:           quran
Version:        0.5.7
Release:        0
Summary:        Study the AlQuran through Word by Word Analysis, Colored Tajweed, Tafsir & Audio
License:        NonFree
URL:            https://gtaf.org/apps/quran
# Source found from here
# https://github.com/flathub/org.gtaf.quran/blob/master/org.gtaf.quran.yml
Source0:        https://direct-download-apps.s3.us-east-2.amazonaws.com/quran/quran_%{version}.tar.gz
Source1:        https://raw.githubusercontent.com/flathub/org.gtaf.quran/master/org.gtaf.quran.appdata.xml
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes hicolor-icon-theme
Requires:       libmpv2
ExclusiveArch:  x86_64

%description
Alhamdulillah! Introducing Al Quran (Tafsir & by Word), the ultimate Quran
study tool for all. With features such as a robust audio system with
repeat functions to aid in Quran hifz, word-by-word analysis and
translations, Tafsir Ibn Kathir, colour-coded tajweed, Quran topics list,
bookmark and note-taking with sync, a powerful search, and multiple
translations and tafsirs in various languages, this app is packed with
everything you need to deepen your understanding of the Quran. Download
now and start your journey to a deeper understanding of the Quran with the
Al Quran (Tafsir & by Word).

%prep
%autosetup -n data
find . -type f -name "._*" -delete
find . -type f -name ".DS_Store" -delete

%build
%install
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_bindir}
cp -r quran %{buildroot}%{_libdir}
chmod 0755 %{buildroot}%{_libdir}/quran/qm_flutter
ln -rs %{buildroot}%{_libdir}/quran/qm_flutter %{buildroot}%{_bindir}/qm_flutter
install -Dm644 gui/quran.desktop -t %{buildroot}%{_datadir}/applications/
install -Dm644 gui/quran.svg -t %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
install -Dm644 %{SOURCE1} -t %{buildroot}%{_datadir}/metainfo/org.gtaf.quran.metainfo.xml

%fdupes %{buildroot}%{_libdir}

desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

%files
%{_bindir}/qm_flutter
%{_libdir}/%{name}
%{_datadir}/icons/hicolor/scalable/apps/quran.svg
%{_datadir}/applications
%{_datadir}/metainfo

%changelog
openSUSE Build Service is sponsored by