File mcomix.spec of Package mcomix

# spec file for package mcomix
# Copyright (c) 2022 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

Name:           mcomix
Version:        2.1.0
Release:        0
Summary:        Comics Viewer
License:        GPL-2.0-only
Group:          Productivity/Graphics/Viewers
BuildRequires:  gobject-introspection
BuildRequires:  python3-setuptools
Requires:       /usr/bin/7z
Requires:       python3-Pillow
Requires:       python3-gobject-Gdk
Requires:       python3-pycairo
Requires:       typelib-1_0-Gtk-3_0
Recommends:     /usr/bin/lha
Recommends:     mupdf
Recommends:     unrar
BuildArch:      noarch
%if 0%{?suse_version}
BuildRequires:  fdupes

Comics Viewer forked from comix.

%setup -q
# remove extra executable flags
find . -type f | xargs chmod a-x


python3 install --root %{buildroot} --prefix "%{_prefix}"
	echo '%defattr(-,root,root,-)'
	ls %{buildroot}%{python_sitelib}/mcomix/messages/*/LC_MESSAGES/ | \
	sed 's@%{buildroot}\(%{python_sitelib}/mcomix/messages/\([^/]\+\)/LC_MESSAGES/\)@%lang(\2) \1@'
} | tee %{name}.lang

%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_datadir}/icons
%fdupes -s %{buildroot}%{python_sitelib}/mcomix
%fdupes -s %{buildroot}%{python_sitelib}/mcomix-*

%files -n %{name} -f %{name}.lang
%attr(755,root,root) %{_bindir}/mcomix
%dir %{python_sitelib}/mcomix/
# only directories and python, rest is in lang file
%dir %{python_sitelib}/mcomix/messages/
%dir %{python_sitelib}/mcomix/messages/*
%dir %{python_sitelib}/mcomix/messages/*/LC_MESSAGES

openSUSE Build Service is sponsored by