Files
desktop/plasma6-firewall/plasma6-firewall.spec
2026-03-19 11:39:49 +08:00

78 lines
2.4 KiB
RPMSpec

# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors
# SPDX-FileContributor: jingyupu <pujingyu@iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0
%define kf6_version 6.18.0
%define qt6_version 6.9.0
%define rname plasma-firewall
Name: plasma6-firewall
Version: 6.5.5
Release: 0
Summary: Config Module for the System Firewall
License: GPL-2.0-only OR GPL-3.0-only
URL: https://www.kde.org
Source0: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
BuildRequires: python
BuildRequires: cmake(KF6Auth) >= %{kf6_version}
BuildRequires: cmake(KF6Config) >= %{kf6_version}
BuildRequires: cmake(KF6CoreAddons) >= %{kf6_version}
BuildRequires: cmake(KF6I18n) >= %{kf6_version}
BuildRequires: cmake(KF6KCMUtils) >= %{kf6_version}
BuildRequires: cmake(KF6Package) >= %{kf6_version}
BuildRequires: cmake(Qt6Core) >= %{qt6_version}
BuildRequires: cmake(Qt6DBus) >= %{qt6_version}
BuildRequires: cmake(Qt6Qml) >= %{qt6_version}
BuildRequires: cmake(Qt6Quick) >= %{qt6_version}
BuildRequires: cmake(Qt6Test) >= %{qt6_version}
BuildRequires: cmake(Qt6Xml) >= %{qt6_version}
Requires: firewalld
# QML imports
Requires: kf6-kirigami >= %{kf6_version}
Requires: kf6-kitemmodels-imports >= %{kf6_version}
Provides: plasma5-firewall = %{version}
Obsoletes: plasma5-firewall < %{version}
Obsoletes: plasma5-firewall-lang < %{version}
%description
Config Module for the System Firewall
%prep
%autosetup -p1 -n %{rname}-%{version}
%build
%cmake_kf6 -DBUILD_UFW_BACKEND:BOOL=FALSE
%kf6_build
%install
%kf6_install
%fdupes %{buildroot}
# todo: fix the name error.
# Avoid illegal package names
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@*
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/en_GB/
# Use langpacks macro to auto-split translations
%find_lang kcm_firewall --with-qt --all-name --generate-subpackages
%files
%license LICENSES/*
%doc README.md
%{_kf6_applicationsdir}/kcm_firewall.desktop
%{_kf6_appstreamdir}/org.kde.plasma.firewall.metainfo.xml
%{_kf6_libdir}/libkcm_firewall_core.so
%dir %{_kf6_plugindir}/kf6/plasma_firewall
%{_kf6_plugindir}/kf6/plasma_firewall/firewalldbackend.so
%{_kf6_plugindir}/plasma/kcms/systemsettings/kcm_firewall.so
%changelog