File ktailctl.spec of Package ktailctl
#
# spec file for package ktailctl
#
# 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 original_name KTailctl
Name: ktailctl
Version: 0.20.0
Release: 0%{?dist}
Summary: GUI meant for KDE Plasma desktop to manage and monitor Taiscale VPN
License: GPL-3.0-only
URL: https://github.com/f-koehler/%{original_name}
Source0: %{URL}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: (extra-cmake-modules or kf6-extra-cmake-modules)
BuildRequires: (go or golang)
BuildRequires: (cmake(nlohmann_json) or (nlohmann_json-devel))
BuildRequires: cmake(KF6Config)
BuildRequires: cmake(KF6CoreAddons)
BuildRequires: cmake(KF6DBusAddons)
BuildRequires: cmake(KF6GuiAddons)
BuildRequires: cmake(KF6I18n)
BuildRequires: (cmake(KF6Kirigami) or cmake(KF6Kirigami2) or cmake(KF6KirigamiPlatform))
BuildRequires: cmake(KF6Notifications)
BuildRequires: cmake(KF6QQC2DesktopStyle)
BuildRequires: cmake(Qt6)
BuildRequires: cmake(Qt6Svg)
BuildRequires: ninja
BuildRequires: qt6-base-devel
BuildRequires: qt6-base-private-devel
BuildRequires: qt6-declarative-devel
BuildRequires: qt6-declarative-private-devel
BuildRequires: qt6-location-private-devel
BuildRequires: qt6-svg-private-devel
Requires(pre): tailscale
Requires: gcc
Requires: glibc
Requires: hicolor-icon-theme
Requires: kconf_update6
Requires: kf6-kconfig
Requires: kf6-kcoreaddons
Requires: kf6-kdbusaddons
Requires: kf6-kguiaddons
Requires: kf6-ki18n
Requires: kf6-kirigami
Requires: kf6-knotifications
Requires: kf6-qqc2-desktop-style
Requires: kirigami2
Requires: kirigami-addons6
%description
KTailctl (KTailCTL) is a graphical user interface (GUI) designed to monitor and manage
Tailscale on Linux desktop environments. It is built using KDE Frameworks and
Kirigami2, which allows it to integrate seamlessly with the KDE desktop environment.
KTailctl provides a user-friendly interface for viewing and managing the status and
traffic of Tailscale, a mesh VPN service.
It includes features such as monitoring the status and traffic of Tailscale,
detailed peer information, a tray menu for quick access, and functionalities
for sending and receiving files. Additionally, it supports exit node management and toggling the Tailscale status,
making it a comprehensive tool for Tailscale users on Linux.
%prep
%autosetup -p1 -n %{original_name}-%{version}
export CGO_CXXFLAGS="$(pkg-config --cflags Qt6Core)"
export CGO_LDFLAGS="$(pkg-config --libs Qt6Core)"
pushd "%{_builddir}/%{original_name}-%{version}/src/wrapper/"
rm -fdr "./vendor"
go mod tidy
go mod vendor
popd
%build
cmake -S "%{_builddir}/%{original_name}-%{version}/" \
-B "%{_builddir}/%{original_name}-%{version}/build/" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
-DCMAKE_INSTALL_BINDIR:PATH=%{__cmake_make_prefix_relative %{_bindir}} \
-DCMAKE_INSTALL_SBINDIR:PATH=%{__cmake_make_prefix_relative %{_sbindir}} \
-DCMAKE_INSTALL_LIBEXECDIR:PATH=%{__cmake_make_prefix_relative %{_libexecdir}} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=%{__cmake_make_root_relative %{_sysconfdir}} \
-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{__cmake_make_root_relative %{_localstatedir}} \
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=%{__cmake_make_root_relative %{_rundir}} \
-DCMAKE_INSTALL_LIBDIR:PATH=%{__cmake_make_prefix_relative %{_libdir}} \
-DCMAKE_INSTALL_INCLUDEDIR:PATH=%{__cmake_make_prefix_relative %{_includedir}} \
-DCMAKE_INSTALL_DATAROOTDIR:PATH=%{__cmake_make_prefix_relative %{_datadir}} \
-DCMAKE_INSTALL_DOCDIR:PATH=%{__cmake_make_prefix_relative %{_docdir}/%{name}} \
-DCMAKE_INSTALL_MANDIR:PATH=%{__cmake_make_prefix_relative %{_mandir}} \
-DCMAKE_INSTALL_INFODIR:PATH=%{__cmake_make_prefix_relative %{_infodir}} \
-DCMAKE_C_FLAGS="${CFLAGS:-%optflags}" \
-DCMAKE_CGO_CXXFLAGS="$(pkg-config --cflags Qt6Core)" \
-DCMAKE_CGO_LDFLAGS="$(pkg-config --libs Qt6Core)" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags}"
cmake --build "build"
%install
cmake --install "build"
%post
echo -e "INFO: \n \
To get the most out of KTailctl (sending/receiving files, changing Tailscale settings, …) make sure you are the operator: \n \
*[ tailscale up --operator=(USER) ]*` !"
%files
%doc "README.md" "changelog/v%{version}.md"
%license "LICENSE.txt"
%{_binddir}/%{name}
"%{_libdir}/qt6/qml/org/fkoehler/%{original_name}/Components/lib%{name}_components.so"
"%{_libdir}/qt6/qml/org/fkoehler/%{original_name}/lib%{name}_wrapper_logging.so"
%changelog