From e0446982aca7f33d1f9e7c801c6908c3663c0b79 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Fri, 5 Jan 2024 22:11:12 +0100 Subject: [PATCH] provide the rpm macro file macros.kde5 (new subpackage rpm-macros-kde5) do not provide an empty debug package remove the build requirement for automoc4 and add cmake instead [release 5.9.0-5mamba;Sat Apr 18 2015] --- extra-cmake-modules.spec | 33 +++++++++++++++---- rpm-macros.kde5.in | 68 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 6 deletions(-) create mode 100644 rpm-macros.kde5.in diff --git a/extra-cmake-modules.spec b/extra-cmake-modules.spec index 27973e5..97002ee 100644 --- a/extra-cmake-modules.spec +++ b/extra-cmake-modules.spec @@ -1,18 +1,20 @@ +%define _kf5_majver %(v=%version; echo ${v%.*}) + Name: extra-cmake-modules Version: 5.9.0 -Release: 4mamba +Release: 5mamba Summary: Extra cmake modules used by kde framework Group: Development/Tools Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.kde.org -Source: http://download.kde.org/stable/frameworks/5.8/extra-cmake-modules-%{version}.tar.xz -License: GPL -BuildRequires: automoc4 -BuildRequires: python-Sphinx +Source0: http://download.kde.org/stable/frameworks/%{_kf5_majver}/extra-cmake-modules-%{version}.tar.xz +Source1: rpm-macros.kde5.in +License: BSD ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END +BuildRequires: cmake BuildRequires: python-Sphinx Requires: cmake BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -20,7 +22,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Extra cmake modules used by kde framework. -%debug_package +%package -n rpm-macros-kde5 +Group: Development/Tools +Summary: RPM macros for KDE Frameworks 5 + +%description -n rpm-macros-kde5 +This package provides the RPM macros for building KDE Frameworks 5 packages. %prep %setup -q @@ -33,6 +40,10 @@ Extra cmake modules used by kde framework. [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall -C build +install -d %{buildroot}%{_sysconfdir}/rpm +cat %{S:1} | sed "s,@KF5_VERSION@,%{version}," \ + > %{buildroot}%{_sysconfdir}/rpm/macros.kde5 + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -41,8 +52,18 @@ Extra cmake modules used by kde framework. %{_datadir}/ECM %{_datadir}/doc/ECM %{_mandir}/man7/ecm* +%doc COPYING-CMAKE-SCRIPTS + +%files -n rpm-macros-kde5 +%defattr(-,root,root) +%attr(644,root,root) %{_sysconfdir}/rpm/macros.kde5 %changelog +* Sat Apr 18 2015 Davide Madrisan 5.9.0-5mamba +- provide the rpm macro file macros.kde5 (new subpackage rpm-macros-kde5) +- do not provide an empty debug package +- remove the build requirement for automoc4 and add cmake instead + * Sat Apr 11 2015 Silvan Calarco 5.9.0-4mamba - automatic version update by autodist diff --git a/rpm-macros.kde5.in b/rpm-macros.kde5.in new file mode 100644 index 0000000..1aabd90 --- /dev/null +++ b/rpm-macros.kde5.in @@ -0,0 +1,68 @@ +%_kf5_version @KF5_VERSION@ +%_kf5_majver %(v=%_kf5_version; echo ${v%.*}) + +%_kde5_prefix %_prefix +%_kde5_sysconfdir %_sysconfdir + +%_kde5_autostartdir %_kde5_prefix/autostart +%_kde5_bindir %_kde5_prefix/bin +%_kde5_configdir %_kde5_prefix/share/config +%_kde5_datadir %_kde5_prefix/share +%_kde5_dbusinterfacesdir %_datadir/dbus-1/interfaces +%_kde5_dbusservicesdir %_datadir/dbus-1/services +%_kde5_dbussystemservicesdir %_datadir/dbus-1/system-services +%_kde5_htmldir %_kde5_prefix/share/doc/HTML +%_kde5_icondir %_kde5_prefix/share/icons +%_kde5_kcfgdir %_kde5_prefix/share/config.kcfg +%_kde5_kconfupdatedir %_kde5_prefix/share/apps/kconf_update +%_kde5_includedir %_includedir/KF5 +%_kde5_libdir %_kde5_prefix/%_lib +%_kde5_libexecdir %_libexecdir/kf5 +%_kde5_localedir %_kde5_prefix/share/locale +%_kde5_mimedir %_kde5_prefix/share/mime +%_kde5_mkspecsdir %_qt5_prefix/mkspecs/modules +%_kde5_pluginsdir %_qt5_plugindir/kf5 +%_kde5_qmldir %_qt5_prefix/qml +%_kde5_qtplugindir %_qt5_plugindir +%_kde5_sbindir %_kde5_prefix/sbin +%_kde5_servicesdir %_kde5_prefix/share/kde5/services +%_kde5_servicetypesdir %_kde5_prefix/share/kde5/servicetypes +%_kde5_sharedir %_kde5_prefix/share +%_kde5_soundsdir %_kde5_prefix/share/sounds +%_kde5_templatesdir %_kde5_prefix/share/templates +%_kde5_xdgappsdir %_kde5_prefix/share/applications +%_kde5_xdgdirectorydir %_kde5_prefix/share/desktop-directories +%_kde5_xdgmimedir %_kde5_prefix/share/mime/packages +%_kde5_wallpaperdir %_kde5_prefix/share/wallpapers + +%_kde5_debug RelWithDebInfo + +%cmake_kde5(d:) \ + QTDIR="%{_qt5_prefix}" ; export QTDIR ; \ + PATH="%{_qt5_bindir}:$PATH" ; export PATH ; \ + CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ + CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ + FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ + bdir=. \ + %{-d:dir=%{-d*} ; mkdir -p $dir ; cd $dir ; bdir=.. } \ + %{__cmake} $bdir \\\ + -DCMAKE_BUILD_TYPE=%{_kde5_debug} \\\ + -DBUILD_SHARED_LIBS:BOOL=ON \\\ + -DBUILD_TESTING:BOOL=FALSE \\\ + -DCMAKE_INSTALL_PREFIX:PATH=%{_kde5_prefix} \\\ + -DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=ON \\\ + -DLIB_INSTALL_DIR:PATH=%{_lib} \\\ + -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir} \\\ + -DECM_MKSPECS_INSTALL_DIR:PATH=%{_kde5_mkspecsdir} \\\ + -DKF5_LIBEXEC_INSTALL_DIR=%{_kde5_libexecdir} \\\ + -DQML_INSTALL_DIR:PATH=%{_kde5_qmldir} + +# -DDBUS_INTERFACES_INSTALL_DIR:PATH=%{_kde5_dbusinterfacesdir} \\\ +# -DDBUS_SERVICES_INSTALL_DIR:PATH=%{_kde5_dbusservicesdir} \\\ +# -DDBUS_SYSTEM_SERVICES_INSTALL_DIR:PATH=%{_kde5_dbussystemservicesdir} \\\ +# -DSYSCONF_INSTALL_DIR:PATH=%{_kde5_sysconfdir} \\\ +# -DXDG_APPS_INSTALL_DIR:PATH=%{_kde5_xdgappsdir} \\\ +# -DXDG_MIME_INSTALL_DIR:PATH=%{_kde5_xdgmimedir} \\\ +# -DKDE_INSTALL_LIBEXECDIR:PATH=%{_kde5_libexecdir} \\\ +# -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \\\ +# -DECM_MKSPECS_INSTALL_DIR=%{_kde5_mkspecsdir} \\\