File nekobox.spec of Package nekobox

#
# spec file for package nekobox
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# 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/
#


Name:           nekobox
Version:        5.10.25
Release:        0
Summary:        Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
License:        GPL-3.0-only AND GPL-3.0-or-later
URL:            https://github.com/qr243vbi/nekobox
Source0:        %{url}/releases/download/%{version}/nekobox-unified-source-%{version}.tar.xz
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  sed
BuildRequires:  thrift
BuildRequires:  cmake(Qt6)
BuildRequires:  cmake(Qt6Core)
BuildRequires:  cmake(Qt6Gui)
BuildRequires:  cmake(Qt6Linguist)
BuildRequires:  cmake(Qt6Network)
BuildRequires:  cmake(Qt6Qml)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  golang(API) >= 1.25
BuildRequires:  pkgconfig(thrift)
Requires:       %{name}-core
Requires:       google-noto-coloremoji-fonts
Requires:       google-noto-sans-fonts
Provides:       nekoray
Conflicts:      nekoray

%description
%{summary}.

%lang_package

%package core
Summary:        %{summary}
Provides:       sing-box
Conflicts:      sing-box

%description core
%{summary}.

%prep
%autosetup -p1 -n nekobox-unified-source-%{version}

#fix upstream
chmod -x CMakeLists.txt LICENSE README.md

%build
. script/build_go.sh
%cmake -DSKIP_UPDATE_BUTTON=ON -DNKR_DEFAULT_VERSION=%{version}
%cmake_build

%install
install -Dpm0755 $PWD/build/%{name}_core %{buildroot}%{_libexecdir}/%{name}/%{name}_core
%cmake_install

%files
%license LICENSE
%doc README.md
%dir %{_libexecdir}/%{name}
%dir %{_libexecdir}/%{name}/public
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
%{_libexecdir}/%{name}/%{name}
%{_libexecdir}/%{name}/public/check_routeprofiles.js
%{_libexecdir}/%{name}/public/languages.txt
%{_libexecdir}/%{name}/public/srslist.json

%files lang
%{_libexecdir}/%{name}/public/*.qm

%files core
%dir %{_libexecdir}/%{name}
%{_bindir}/sing-box
%{_libexecdir}/%{name}/%{name}_core

%changelog
openSUSE Build Service is sponsored by