File python-nsz.spec of Package python-nsz
#
# spec file for package python-nsz
#
# Copyright (c) 2022 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: python-nsz
Version: 4.2.1+1~git20230102.e5d35f9
Release: 0
Summary: Homebrew compatible NSP/XCI compressor/decompressor
License: MIT
Url: https://github.com/nicoboss/nsz
Source: nsz-%{version}.tar.xz
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-Kivy-devel
BuildRequires: fdupes
BuildRequires: xz
Requires: python3-enlighten
Requires: python3-Kivy
Requires: python3-pycryptodome
Requires: python3-zstandard
Provides: python3-nsz = %{version}
BuildArch: noarch
%description
A compression/decompresson script (with optional GUI) that allows user to compress/decompress Nintendo Switch ROMs loselessly, thanks to zstd compression algorithm. The compressed file can be installed directly with supported NSW Homebrew Title Installers.
NSZ is a poison for emulation because it's compressed and encrypted. So only use this to fix nsz-images into proper nsp.
%prep
%autosetup -n nsz-%{version}
%build
%python3_build
%install
%python3_install
find %{buildroot} -type f -name "*.py" --exec sed -i -e 's:/usr/bin/env python3:/usr/bin/python3:g' "{}" && chmod -v +x "{}" \;
%fdupes %{buildroot}/%{_prefix}
%files
%license LICENSE
%doc README.md
%{_bindir}/*
%{python3_sitelib}/*
%changelog