English Portuguese (Brazil)
The same also applies for the x86_64 target. This target uses 'x86_64-w64-mingw32' as prefix instead of 'i686-w64-mingw32'
The same binaries are present in `+%{_prefix}/i686-w64-mingw32/bin+` without any prefix in the name, i.e.,
These macros use out of source compilation to build binaries for all the targets. Almost all packages support out of source compilation or require slight patching. The only known exceptions to date are zlib and openssl. Packages which don't support out of source compilation may require a different approach like performing everything in the %install phase. If you happen to stumble across a package which requires a different approach feel free to contact us on the Fedora MinGW mailing list
This can be rewritten to something like this:
This means that a spec file must contains %package and %files sections for all the targets.
To install the package the command `+make install DESTDIR=$RPM_BUILD_ROOT+` was used in almost all cases. This can be rewritten to `+%mingw_make install DESTDIR=$RPM_BUILD_ROOT+` to install the package for all configured targets The environment variable MINGW_BUILDDIR_SUFFIX can also be used here
Toolchain macros
Track Fedora native package versions
unless they contain Fedora native executables.
`+/usr/i686-w64-mingw32+` + `+/usr/x86_64-w64-mingw32+` + `+  |+` + `+  +- bin  - Binutils toolchain binaries for the target+` + `+  |   |+` + `+  |   +- ar+` + `+  |   +- as+` + `+  |   +- dlltool+` + `+  |   +- ld+` + `+  |   +- ... etc ...+` + `+  |+` + `+  +- lib  - Binutils toolchain support libraries / files for the target+` + `+  |+` + `+  +- sys-root  - root for cross compiled MinGW binaries+` + `+      |+` + `+      +- mingw+` + `+          |+` + `+          +- bin     - cross-compiled MinGW binaries & runtime DLL parts+` + `+          +- etc     - configuration files+` + `+          +- include - include files for cross compiled MinGW libs+` + `+          +- lib     - cross-compiled static MinGW libraries & linktime DLL parts+` + `+          |   |+` + `+          |   +- pkgconfig  - pkg-config definitions for libraries+` + `+          |+` + `+          +- share+` + `+              |+` + `+              +- man+`
When a package can only be built for either one of these targets this can be indicated by setting one of these:
where `+foo.dll+` is the name of the DLL. The name must be converted to lowercase because Windows binaries contain case insensitive dependencies. The form 'mingw32(foo.dll)' should be used for Win32 binaries and the form 'mingw64(foo.dll)' for Win64 binaries.
# Win32
%files -n mingw32-example -f mingw32-example.lang
%{mingw32_bindir}/libexample-0.dll
%{mingw32_includedir}/example/
%{mingw32_libdir}/libexample.dll.a
%{mingw32_libdir}/pkgconfig/example.pc
# Win32
%package -n mingw32-example
Summary: MinGW compiled example library for the Win32 target
Win32 specific macros:
# Win64
%files -n mingw64-example -f mingw64-example.lang
%{mingw64_bindir}/libexample-0.dll
%{mingw64_includedir}/example/
%{mingw64_libdir}/libexample.dll.a
%{mingw64_libdir}/pkgconfig/example.pc
# Win64
%package -n mingw64-example
Summary: MinGW compiled example library for the Win64 target
Win64 specific macros: