File bluejay.spec of Package bluejay
#
# spec file for package bluejay
#
# 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 _name io.github.ebonjaeger.bluejay
Name: bluejay
Version: @SERVICE@
Release: 0
Summary: Bluetooth manager written in Qt
License: MPL-2.0
Group: System/GUI/KDE
URL: https://github.com/EbonJaeger/bluejay
Source0: %{name}-%{version}.tar.xz
Source1: %{name}.po
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: kf6-extra-cmake-modules
BuildRequires: cmake(KF6BluezQt)
BuildRequires: cmake(KF6ColorScheme)
BuildRequires: cmake(KF6Config)
BuildRequires: cmake(KF6CoreAddons)
BuildRequires: cmake(KF6DBusAddons)
BuildRequires: cmake(KF6I18n)
BuildRequires: cmake(KF6Kirigami)
BuildRequires: cmake(KF6KirigamiAddons)
BuildRequires: cmake(KF6QQC2DesktopStyle)
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6DBus)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6QmlCompiler)
BuildRequires: cmake(Qt6Quick)
BuildRequires: cmake(Qt6QuickControls2)
BuildRequires: cmake(Qt6Widgets)
Requires: kirigami-addons6
Recommends: %{name}-lang
%description
A Bluetooth manager and Bluez front-end. With it, you can pair devices,
connect to and remove devices, turn Bluetooth on and off, and more. Bluejay
is powered by the Qt6 graphical toolkit and KDE Frameworks.
%lang_package
%prep
%autosetup -p1
sed -i '/SPDX/d' %{_name}.desktop
sed -i "/%{name}.desktop/s/PROGRAMS/FILES/" CMakeLists.txt
mkdir -p po/ru/
cp %{SOURCE1} po/ru/
%build
%cmake_kf6
%{kf6_build}
%install
%{kf6_install}
desktop-file-edit --set-key=Categories --set-value="Qt;KDE;Settings;HardwareSettings" \
%{buildroot}%{_kf6_applicationsdir}/%{_name}.desktop
cat >> %{buildroot}%{_kf6_applicationsdir}/%{_name}.desktop <<-EOF
Comment[ru]=Диспетчер Bluetooth устройств
EOF
%find_lang %{name}
%check
#%%ctest
desktop-file-validate %{buildroot}%{_kf6_applicationsdir}/%{_name}.desktop
%files
%doc README.md
%{_kf6_bindir}/%{name}
%{_kf6_applicationsdir}/%{_name}.desktop
%{_kf6_appstreamdir}/%{_name}.metainfo.xml
%dir %{_kf6_sharedir}/%{name}
%{_kf6_sharedir}/%{name}/pin-code-database.xml
%{_kf6_iconsdir}/hicolor/*/apps/%{_name}.??g
%license LICENSE
%files lang -f %{name}.lang
%changelog