File netinstall-cli.spec of Package netinstall-cli
#
# spec file for package netinstall-cli
#
# Copyright (c) 2025 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/
#
%define script_commit 7a40bbd1cf3d8309fd66d7fff2a446e8e162d54b
Name: netinstall-cli
Version: 7.18
Release: 0
Summary: Mikrotik Netinstall CLI for RouterOS
License: NonFree
URL: https://mikrotik.com/download
Source0: https://download.mikrotik.com/routeros/%{version}/netinstall-%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://aur.archlinux.org/cgit/aur.git/plain/netinstall.sh?h=netinstall&id=%{script_commit}#/netinstall.sh
BuildRequires: execstack
ExclusiveArch: x86_64 %ix86
%description
Tool for installing and reinstalling MikroTik devices running RouterOS.
%prep
%autosetup -c
%build
execstack -c %{name}
%install
install -Dm0755 %{_sourcedir}/netinstall.sh %{buildroot}/%{_bindir}/netinstall
install -Dm0755 %{_builddir}/%{name}-%{version}/%{name} %{buildroot}/%{_prefix}/lib/netinstall/%{name}
%files
%license LICENSE.txt
%{_bindir}/netinstall
%dir %{_prefix}/lib/netinstall
%{_prefix}/lib/netinstall/%{name}
%changelog