#3 Add %%mingw_ninja_install macro
Merged 4 years ago by elmarco. Opened 4 years ago by fidencio.
rpms/ fidencio/mingw-filesystem wip/add_mingw_ninja_install_macro  into  master

Add %%mingw_ninja_install macro
Fabiano Fidêncio • 4 years ago  
file modified
+12
@@ -172,5 +172,17 @@ 

  }                                                                   \

  run_mingw_ninja

  

+ %mingw_ninja_install                                                    \

+ run_mingw_ninja_install()                                               \

+ {                                                                       \

+ %if 0%{?mingw_build_win32} == 1                                         \

+ DESTDIR=%{buildroot} ninja -C build_win32$MINGW_BUILDDIR_SUFFIX install \

+ %endif                                                                  \

+ %if 0%{?mingw_build_win64} == 1                                         \

+ DESTDIR=%{buildroot} ninja -C build_win64$MINGW_BUILDDIR_SUFFIX install \

+ %endif                                                                  \

+ }                                                                       \

+ run_mingw_ninja_install

+ 

  # Deprecated:

  %mingw_make_install         %mingw_make install

file modified
+4 -1
@@ -6,7 +6,7 @@ 

  %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)

  

  Name:           mingw-filesystem

- Version:        106

+ Version:        107

  Release:        1%{?dist}

  Summary:        MinGW cross compiler base filesystem and environment

  
@@ -316,6 +316,9 @@ 

  

  

  %changelog

+ * Wed Jun 19 2019 Fabiano Fidêncio <fidencio@redhat.com> - 107-1

+ - Add %%mingw_ninja_install macro

+ 

  * Thu Feb 14 2019 Sandro Mani <manisandro@gmail.com> - 106-1

  - Revert "Remove redundant $@ in mingw_cmake and mingw_meson", it causes no arguments at all to be passed to cmake

  

In order to make the life of the mingw packages easier, let's add a
%%mingw_ninja_install macro that will run ninja -C install in the
proper directory (the one configured using %%mingw_meson macro), passing
the correct DESTDIR to ninja.

In case it's not done, po files are not correctly installed and
%%mingw_find_lang macro will fail.

Signed-off-by: Fabiano Fidêncio fidencio@redhat.com

rebased onto ff5a0b8

4 years ago

Oh, DESTDIR=%{buildroot}, why is that necessary ? Sorry I don't get the it.

Oh, DESTDIR=%{buildroot}, why is that necessary ? Sorry I don't get the it.

It's needed in order to get %mingw_find_lang to properly work as this macro basically calls mingw-find-lang.sh %{buildroot}.

This seems to be a common thing across the mingw specs that I've checked (those ones are using %mingw_make_install), as they do: %mingw_make_install DESTDIR=$RPM_BUILD_ROOT.

While I could set this in the spec file I'm dealing with, I do believe having this set by default (and then avoiding duplication in a bunch of specs) would be the way to go.

Does the explanation make sense?

yes, thanks for the explanation!

Pull-Request has been merged by elmarco

4 years ago