File 4nxci.spec of Package 4nxci
#
# spec file for package 4nxci
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%define _name 4NXCI
Name: 4nxci
Version: 4.03
Release: 0
Summary: Tool for converting XCI(NX Card Image) files to NSP
License: ISC
Group: Hardware/Other
URL: https://github.com/The-4n/4NXCI
Source0: %{_name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: dos2unix
%description
4NXCI is a tool for converting XCI(NX Card Image) files to NSP
It is based on hactool by SciresM
Usage
You should load your keyset file with -k or --keyset option followed by a path to it or place your keyset file with "keys.dat" filename in the same folder as 4NXCI
Thanks: SciresM, Rajkosto, Switch Brew
%prep
%setup -q -n %{_name}-%{version}
%build
cat > config.mk <<EOF
CC = gcc
CFLAGS = %{optflags}
LDFLAGS = -lmbedtls -lmbedx509 -lmbedcrypto
EOF
make %{?_smp_mflags}
dos2unix CHANGELOG.txt
%install
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
%files
%license LICENSE
%doc CHANGELOG.txt README.md
%{_bindir}/%{name}
%changelog