0c1e1f
# RPM macros for the Fedora MinGW Cross Compiler collection
0c1e1f
0c1e1f
%mingw_build_targets        mingw32 mingw64
9dad08
%mingw_build_win32          1
9dad08
%mingw_build_win64          1
0c1e1f
0c1e1f
%mingw_strip                mingw-strip
0c1e1f
%mingw_objdump              mingw-objdump
0c1e1f
%mingw_objcopy              mingw-objcopy
0c1e1f
0c1e1f
%mingw_findprovides         %{_rpmconfigdir}/mingw-find-provides.sh %{mingw_build_targets}
0c1e1f
%mingw_findrequires         %{_rpmconfigdir}/mingw-find-requires.sh %{mingw_build_targets}
0c1e1f
%mingw_finddebuginfo        %{_rpmconfigdir}/mingw-find-debuginfo.sh
0c1e1f
0c1e1f
%mingw_find_lang            %{_rpmconfigdir}/mingw-find-lang.sh %{buildroot}
0c1e1f
0c1e1f
%mingw_debug_install_post   %{mingw_finddebuginfo} %{_builddir}/%{?buildsubdir} %{mingw_build_targets}
0c1e1f
9dad08
%mingw_debug_package               \
9dad08
%if 0%{?mingw_build_win32} == 1    \
9dad08
%{?mingw32_debug_package}          \
9dad08
%endif                             \
9dad08
%if 0%{?mingw_build_win64} == 1    \
9dad08
%{?mingw64_debug_package}          \
9dad08
%endif                             \
0c1e1f
%{nil}
0c1e1f
0c1e1f
%mingw_package_header                                         \
0c1e1f
%global __strip %{mingw_strip}                                \
0c1e1f
%global __objdump %{mingw_objdump}                            \
0c1e1f
%global __debug_install_post %%{mingw_debug_install_post}     \
0c1e1f
%{nil}
0c1e1f
0c1e1f
%mingw_configure                                       \
0c1e1f
run_mingw_configure()                                  \
0c1e1f
{                                                      \
9dad08
%if 0%{?mingw_build_win32} == 1                        \
0c1e1f
mkdir build_win32$MINGW_BUILDDIR_SUFFIX                \
0c1e1f
pushd build_win32$MINGW_BUILDDIR_SUFFIX                \
57554d
    %{?mingw32_configure} "$@"                         \
9dad08
popd                                                   \
9dad08
%endif                                                 \
9dad08
%if 0%{?mingw_build_win64} == 1                        \
0c1e1f
mkdir build_win64$MINGW_BUILDDIR_SUFFIX                \
0c1e1f
pushd build_win64$MINGW_BUILDDIR_SUFFIX                \
57554d
    %{?mingw64_configure} "$@"                         \
9dad08
popd                                                   \
9dad08
%endif                                                 \
0c1e1f
}                                                      \
0c1e1f
run_mingw_configure
0c1e1f
0c1e1f
%mingw_make                                            \
0c1e1f
run_mingw_make()                                       \
0c1e1f
{                                                      \
9dad08
%if 0%{?mingw_build_win32} == 1                        \
57554d
make -C build_win32$MINGW_BUILDDIR_SUFFIX "$@"         \
9dad08
%endif                                                 \
9dad08
%if 0%{?mingw_build_win64} == 1                        \
57554d
make -C build_win64$MINGW_BUILDDIR_SUFFIX "$@"         \
9dad08
%endif                                                 \
0c1e1f
}                                                      \
0c1e1f
run_mingw_make
0c1e1f
0c1e1f
%mingw_cmake                            \
0c1e1f
run_mingw_cmake()                       \
0c1e1f
{                                       \
9dad08
%if 0%{?mingw_build_win32} == 1         \
0c1e1f
mkdir build_win32$suffix                \
0c1e1f
pushd build_win32$suffix                \
57554d
    %{?mingw32_cmake "$@"}              \
9dad08
popd                                    \
9dad08
%endif                                  \
9dad08
%if 0%{?mingw_build_win64} == 1         \
0c1e1f
mkdir build_win64$suffix                \
0c1e1f
pushd build_win64$suffix                \
57554d
    %{?mingw64_cmake "$@"}              \
9dad08
popd                                    \
9dad08
%endif                                  \
0c1e1f
}                                       \
0c1e1f
run_mingw_cmake
0c1e1f
0c1e1f
%mingw_cmake_kde4                       \
0c1e1f
run_mingw_cmake_kde4()                  \
0c1e1f
{                                       \
9dad08
%if 0%{?mingw_build_win32} == 1         \
0c1e1f
mkdir build_win32$suffix                \
0c1e1f
pushd build_win32$suffix                \
57554d
    %{?mingw32_cmake_kde4 "$@"}         \
9dad08
popd                                    \
9dad08
%endif                                  \
9dad08
%if 0%{?mingw_build_win64} == 1         \
0c1e1f
mkdir build_win64$suffix                \
0c1e1f
pushd build_win64$suffix                \
57554d
    %{?mingw64_cmake_kde4 "$@"}         \
9dad08
popd                                    \
9dad08
%endif                                  \
0c1e1f
}                                       \
0c1e1f
run_mingw_cmake_kde4
0c1e1f
f14297
# Deprecated:
f14297
%mingw_make_install         %mingw_make install