Dan Vrátil 072558d
%_kf5_prefix %_prefix
Rex Dieter 1aeb559
%_kf5_archdatadir %_qt5_archdatadir
Dan Vrátil 072558d
%_kf5_bindir %_kf5_prefix/bin
Dan Vrátil 072558d
%_kf5_datadir %_datadir
bf120a7
%_kf5_docdir %_docdir
Dan Vrátil 072558d
%_kf5_includedir %_includedir/KF5
Dan Vrátil 072558d
%_kf5_libdir %_libdir
Dan Vrátil 072558d
%_kf5_libexecdir %_libexecdir/kf5
bbcb2b3
%_kf5_metainfodir %_metainfodir
Dan Vrátil 072558d
%_kf5_qtplugindir %_qt5_plugindir
Dan Vrátil 072558d
%_kf5_plugindir %_qt5_plugindir/kf5
Dan Vrátil 072558d
%_kf5_sysconfdir %_sysconfdir
Dan Vrátil 072558d
%_kf5_mandir %_kf5_datadir/man
Dan Vrátil 072558d
%_kf5_buildtype release
05981c8
%_kf5_qmldir %_kf5_archdatadir/qml
Dan Vrátil 80bc797
%_kf5_version @@KF5_VERSION@@
Dan Vrátil 072558d
6287aa9
%cmake_kf5 \\\
6287aa9
  %undefine __cmake_in_source_build \
Dan Vrátil 072558d
  QTDIR="%{_qt5_prefix}" ; export QTDIR ; \
Rex Dieter ab65181
  PATH="%{_qt5_bindir}:$PATH" ; export PATH ; \
Dan Vrátil 072558d
  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
Dan Vrátil 072558d
  CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
Dan Vrátil 072558d
  FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ; \
Dan Vrátil 072558d
  %{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \
6d88235
    %{__cmake} \\\
87be265
    %{?__cmake_builddir:-S "%{_vpath_srcdir}"} \\\
87be265
    %{?__cmake_builddir:-B "%{__cmake_builddir}"} \\\
ac9e5ce
    -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
ac9e5ce
    -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
ac9e5ce
    -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
Dan Vrátil 072558d
    -DBUILD_SHARED_LIBS:BOOL=ON \\\
Dan Vrátil 072558d
    -DBUILD_TESTING:BOOL=FALSE \\\
Dan Vrátil 072558d
    -DCMAKE_BUILD_TYPE=%{_kf5_buildtype} \\\
Rex Dieter bcb23ce
    -DCMAKE_INSTALL_INCLUDEDIR_KF5:PATH=%{_kf5_includedir} \\\
Rex Dieter bcb23ce
    -DCMAKE_INSTALL_LIBEXECDIR_KF5:PATH=%{_kf5_libexecdir} \\\
Dan Vrátil 072558d
    -DCMAKE_INSTALL_PREFIX:PATH=%{_kf5_prefix} \\\
Rex Dieter 34da167
    -DCMAKE_USE_RELATIVE_PATHS:BOOL=ON \\\
Dan Vrátil 072558d
    -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
Rex Dieter 1aeb559
    -DECM_MKSPECS_INSTALL_DIR:PATH=%{_kf5_archdatadir}/mkspecs/modules \\\
Rex Dieter f59847a
    -DKDE_INSTALL_BINDIR:PATH=%{_kf5_bindir} \\\
Rex Dieter bcb23ce
    -DKDE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \\\
Rex Dieter f59847a
    -DKDE_INSTALL_KCFGDIR:PATH=%{_datadir}/config.kcfg \\\
Rex Dieter f59847a
    -DKDE_INSTALL_LIBDIR:PATH=%{_kf5_libdir} \\\
Rex Dieter f59847a
    -DKDE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \\\
Rex Dieter 46299d3
    -DKDE_INSTALL_METAINFODIR:PATH=%{_kf5_metainfodir} \\\
Rex Dieter f59847a
    -DKDE_INSTALL_PLUGINDIR:PATH=%{_qt5_plugindir} \\\
Rex Dieter f59847a
    -DKDE_INSTALL_QMLDIR:PATH=%{_kf5_qmldir} \\\
Rex Dieter f59847a
    -DKDE_INSTALL_QTPLUGINDIR:PATH=%{_qt5_plugindir} \\\
Rex Dieter f59847a
    -DKDE_INSTALL_QTQUICKIMPORTSDIR:PATH=%{_qt5_importdir} \\\
Rex Dieter f59847a
    -DKDE_INSTALL_SYSCONFDIR:PATH=%{_kf5_sysconfdir} \\\
Rex Dieter 1c4fcb9
    -DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=ON
Dan Vrátil 3290eea
Dan Vrátil 3290eea
# %%find_lang_kf5
Dan Vrátil 3290eea
#
Dan Vrátil 3290eea
# This macro is used in KDE Frameworks 5 packages instead of %%find_lang,
Dan Vrátil 3290eea
# becasue find_lang is broken an it thinks that "_qt" in foobar_qt.qm is
Dan Vrátil 3290eea
# the name of the language.
Dan Vrátil 3290eea
# This macro should NOT be used with anything else but KDE Frameworks, since
Dan Vrátil 3290eea
# it does some assumptions regarding the names and locations and it might not
Dan Vrátil 3290eea
# work with other packages.
Dan Vrátil 3290eea
# We should eventually get this to RPM, or fix %%find_lang
Dan Vrátil 3290eea
#                                                       -- dvratil
Dan Vrátil 3290eea
# Usage: find_lang_kf5 fooBar5
Dan Vrátil 3290eea
#   - will look for fooBar5_qt.qm files in %%{buildroot}/usr/share/locale/
Dan Vrátil 3290eea
#
Dan Vrátil 3290eea
%find_lang_kf5() \
Dan Vrátil 3290eea
    (find %{buildroot}/%{_datadir}/locale/ -name "%1.qm" -type f | sed ' \
Dan Vrátil 3290eea
        s:%{buildroot}/:: \
Dan Vrátil 3290eea
        s:%{_datadir}/locale/\\([a-zA-Z_\\@]*\\)/\\([a-zA-Z_]*\\)/%1.qm:%lang(\\1) %{_datadir}/locale/\\1/\\2/%1.qm:' > %1.lang)
ff0dff1
ff0dff1
# Start of backwards compatible macros
ff0dff1
# Used mostly in plasma and gear packages:
ff0dff1
# %%maj_ver_kf5
ff0dff1
# %%min_ver_kf5
ff0dff1
# %%bug_ver_kf5
ff0dff1
# %%majmin_ver_kf5
ff0dff1
# %%stable_kf5
ff0dff1
ff0dff1
%maj_ver_kf5 %(echo %{version} | cut -d. -f1)
ff0dff1
%min_ver_kf5 %(echo %{version} | cut -d. -f2)
ff0dff1
%bug_ver_kf5 %(echo %{version} | cut -d. -f3)
ff0dff1
ff0dff1
%stable_kf5 %( \
ff0dff1
    if test %bug_ver_kf5 -ge 50 ; then
ff0dff1
        echo "unstable"
ff0dff1
    else
ff0dff1
        echo "stable"
ff0dff1
    fi
ff0dff1
    )
ff0dff1
ff0dff1
%majmin_ver_kf5 %( \
ff0dff1
    if test %bug_ver_kf5 -ge 50 ; then
ff0dff1
        echo %{maj_ver_kf5}.%{min_ver_kf5}.50
ff0dff1
    else
ff0dff1
        echo %{maj_ver_kf5}.%{min_ver_kf5}
ff0dff1
    fi
ff0dff1
    )
ff0dff1
# End of backwards compatible macros