fix
This commit is contained in:
@@ -5,43 +5,12 @@
|
||||
# SPDX-License-Identifier: MulanPSL-2.0
|
||||
|
||||
# Prefer %%global; allow external override for _kf6_prefix
|
||||
%if 0%{?_kf6_prefix:1}
|
||||
%else
|
||||
%global _kf6_prefix %{_prefix}
|
||||
%endif
|
||||
|
||||
%global _kf6_sysconfdir %{_sysconfdir}
|
||||
%global _kf6_libexecdir %{_libexecdir}/kf6
|
||||
%global _kf6_bindir %{_kf6_prefix}/bin
|
||||
%global _kf6_includedir %{_kf6_prefix}/include/KF6
|
||||
%global _kf6_libdir %{_kf6_prefix}/%{_lib}
|
||||
%global _kf6_sbindir %{_kf6_prefix}/sbin
|
||||
%global _kf6_sharedir %{_kf6_prefix}/share
|
||||
%global _kf6_datadir %{_kf6_sharedir}/kf6
|
||||
%global _kf6_configdir %{_kf6_sysconfdir}/xdg
|
||||
%global _kf6_cmakedir %{_kf6_libdir}/cmake
|
||||
%global _kf6_pkgconfigdir %{_kf6_libdir}/pkgconfig
|
||||
%global _kf6_qchdir %{_kf6_sharedir}/doc/qt6
|
||||
%global _kf6_importdir %{_kf6_libdir}/qt6/imports
|
||||
%global _kf6_mkspecsdir %{_kf6_libdir}/qt6/mkspecs/modules
|
||||
%global _kf6_plugindir %{_kf6_libdir}/qt6/plugins
|
||||
%global _kf6_qmldir %{_kf6_libdir}/qt6/qml
|
||||
%global _kf6_appsdir %{_kf6_sharedir}
|
||||
%global _kf6_applicationsdir %{_kf6_sharedir}/applications
|
||||
%global _kf6_configkcfgdir %{_kf6_sharedir}/config.kcfg
|
||||
%global _kf6_dbusinterfacesdir %{_kf6_sharedir}/dbus-1/interfaces
|
||||
%global _kf6_dbuspolicydir %{_kf6_sharedir}/dbus-1/system.d
|
||||
%global _kf6_htmldir %{_kf6_sharedir}/doc/HTML
|
||||
%global _kf6_iconsdir %{_kf6_sharedir}/icons
|
||||
%global _kf6_notificationsdir %{_kf6_sharedir}/knotifications6
|
||||
%global _kf6_knsrcfilesdir %{_kf6_sharedir}/knsrcfiles
|
||||
%global _kf6_kxmlguidir %{_kf6_sharedir}/kxmlgui5
|
||||
%global _kf6_localedir %{_kf6_sharedir}/locale/kf6
|
||||
%global _kf6_mandir %{_kf6_sharedir}/man
|
||||
%global _kf6_appstreamdir %{_kf6_sharedir}/metainfo
|
||||
%global _kf6_plasmadir %{_kf6_sharedir}/plasma
|
||||
%global _kf6_debugdir %{_kf6_sharedir}/qlogging-categories6
|
||||
%global _kf6_wallpapersdir %{_kf6_sharedir}/wallpapers
|
||||
%{lua:
|
||||
if posix.stat(rpm.expand('%{SOURCE0}')) then
|
||||
rpm.load(rpm.expand('%{SOURCE0}'))
|
||||
end
|
||||
}
|
||||
|
||||
Name: kf6-rpm-macros
|
||||
Version: 20251125
|
||||
@@ -58,8 +27,8 @@ Requires: ninja
|
||||
%description
|
||||
This package contains macros which are used when building KDE packages.
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
@@ -1,19 +1,10 @@
|
||||
# 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-FileContributor: Zheng Junjie <zhengjunjie@iscas.ac.cn>
|
||||
#
|
||||
# SPDX-License-Identifier: MulanPSL-2.0
|
||||
|
||||
# Default paths
|
||||
%__kf6_sourcedir .
|
||||
%__kf6_builddir build
|
||||
|
||||
# Use the Ninja
|
||||
%__kf6_build_tool %__ninja
|
||||
|
||||
# Default build type
|
||||
%__kf6_build_type RelWithDebInfo
|
||||
|
||||
# _kf6_variables to use in %%files sections
|
||||
%_kf6_prefix %{_prefix}
|
||||
|
||||
@@ -59,35 +50,15 @@
|
||||
%_kf6_debugdir %{_kf6_sharedir}/qlogging-categories6
|
||||
%_kf6_wallpapersdir %{_kf6_sharedir}/wallpapers
|
||||
|
||||
# Macro to use 'make' instead of 'ninja'
|
||||
%kf6_use_make %global __kf6_build_tool %__make
|
||||
|
||||
# Run CMake
|
||||
%cmake_kf6 %cmake \
|
||||
cmake -DCMAKE_BUILD_TYPE:STRING=%{__kf6_build_type} \\\
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=%{_kf6_prefix} \\\
|
||||
-S %__kf6_sourcedir \\\
|
||||
-B %__kf6_builddir \\\
|
||||
%if "%__kf6_build_tool" == "%__ninja" \
|
||||
-GNinja \\\
|
||||
%else \
|
||||
-G"Unix Makefiles" \\\
|
||||
%endif \
|
||||
-DCMAKE_C_COMPILER:STRING=%__cc \\\
|
||||
-DCMAKE_CXX_COMPILER:STRING=%__cxx \\\
|
||||
-DCMAKE_CXX_LINK_PIE_SUPPORTED:BOOL=TRUE \\\
|
||||
-DCMAKE_C_FLAGS:STRING="%{optflags}" \\\
|
||||
-DCMAKE_CXX_FLAGS:STRING="%{optflags}" \\\
|
||||
-DCMAKE_EXE_LINKER_FLAGS:STRING="-Wl,--as-needed -Wl,--no-undefined" \\\
|
||||
-DCMAKE_MODULE_LINKER_FLAGS:STRING="-Wl,--as-needed -Wl,--no-undefined" \\\
|
||||
-DCMAKE_SHARED_LINKER_FLAGS:STRING="-Wl,--as-needed -Wl,--no-undefined" \\\
|
||||
-DKDE_INSTALL_LIBEXECDIR=%{_libexecdir} \\\
|
||||
-DBUILD_TESTING:BOOL=FALSE
|
||||
%cmake_kf6 \
|
||||
%cmake -DCMAKE_CXX_LINK_PIE_SUPPORTED:BOOL=TRUE \\\
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_kf6_prefix} \\\
|
||||
-DKDE_INSTALL_LIBEXECDIR=%{_libexecdir} \\\
|
||||
-DBUILD_TESTING:BOOL=FALSE
|
||||
|
||||
# Build the package
|
||||
%kf6_build %cmake_build \
|
||||
cmake --build %__kf6_builddir %{?_smp_mflags} -v
|
||||
%kf6_build %cmake_build
|
||||
|
||||
# Install package
|
||||
%kf6_install %cmake_install \
|
||||
DESTDIR=%{buildroot} cmake --install %__kf6_builddir -v
|
||||
%kf6_install %cmake_install
|
||||
Reference in New Issue
Block a user