hi,
a few thing i added to the current macros.mingw* scripts. a short
description:
macros.mingw:
- add %mingw_pkg_name
- add %mingw_build_targets (this's the only one which have to change to
support darwinx build too).
- fix path in %mingw_find*
- move %mingw_find_lang to the other %mingw_find* macros
- add %mingw_find_files which generate all file list
- add %{mingw_build_targets} to mingw-find-debuginfo.sh args
- move mingw32_debug_package and mingw64_debug_package to it's own macro
file and rewrite mingw_debug_package according to this (although i'd
like to retire the mingw_debug_package macro just keep it for compatibility)
macros.mingw32/64:
- add ${MINGW_CONFIGURE_ARGS} to both configure
- add mingw32_package and mingw32_static_package subpackage template
- add the missing mingw64_description
i hope these can be applied.
--
Levente "Si vis pacem para bellum!"
Index: macros.mingw
===================================================================
--- macros.mingw (revision 99)
+++ macros.mingw (working copy)
@@ -1,44 +1,32 @@
# RPM macros for the Fedora Cross Compiler collection
+%mingw_pkg_name %(echo %{name} | sed 's/^mingw-//')
+
+%mingw_build_targets mingw32 mingw64
+
%mingw_strip mingw-strip
%mingw_objdump mingw-objdump
%mingw_objcopy mingw-objcopy
-%mingw_findprovides /usr/lib/rpm/mingw-find-provides.sh
-%mingw_findrequires /usr/lib/rpm/mingw-find-requires.sh
-%mingw_finddebuginfo /usr/lib/rpm/mingw-find-debuginfo.sh
+%mingw_findprovides %{_rpmconfigdir}/mingw-find-provides.sh
+%mingw_findrequires %{_rpmconfigdir}/mingw-find-requires.sh
+%mingw_finddebuginfo %{_rpmconfigdir}/mingw-find-debuginfo.sh
+%mingw_find_lang %{_rpmconfigdir}/mingw-find-lang.sh %{buildroot}
+%mingw_find_files %{_rpmconfigdir}/mingw-find-files.sh
%{mingw_pkg_name} \
+ %{_builddir}/%{?buildsubdir} %{mingw_build_targets} \
+%{nil}
+
%mingw_debug_install_post \
- %{mingw_finddebuginfo} %{_builddir}/%{?buildsubdir}\
+ %{mingw_finddebuginfo} %{_builddir}/%{?buildsubdir} %{mingw_build_targets} \
%{nil}
+# for compatibility only
%mingw_debug_package \
-%{?mingw_build_win32: \
-%package -n %{mingw32_pkg_name}-debuginfo \
-Summary: Debug information for package %{mingw32_pkg_name} \
-Group: Development/Debug \
-%description -n %{mingw32_pkg_name}-debuginfo \
-This package provides debug information for package %{mingw32_pkg_name}. \
-Debug information is useful when developing applications that use this \
-package or when debugging this package. \
-%files -n %{mingw32_pkg_name}-debuginfo -f mingw32-debugfiles.list \
-%defattr(-,root,root,-) \
-} \
-%{?mingw_build_win64: \
-%package -n %{mingw64_pkg_name}-debuginfo \
-Summary: Debug information for package %{mingw64_pkg_name} \
-Group: Development/Debug \
-%description -n %{mingw64_pkg_name}-debuginfo \
-This package provides debug information for package %{mingw64_pkg_name}. \
-Debug information is useful when developing applications that use this \
-package or when debugging this package. \
-%files -n %{mingw64_pkg_name}-debuginfo -f mingw64-debugfiles.list \
-%defattr(-,root,root,-) \
-} \
+%{?mingw_build_win32: %mingw32_debug_package} \
+%{?mingw_build_win64: %mingw64_debug_package} \
%{nil}
-%mingw_find_lang %{_rpmconfigdir}/mingw-find-lang.sh %{buildroot}
-
%mingw_set_suffix \
if test "%{-s*}" != "" ; then \
suffix="_%{-s*}" \
Index: macros.mingw32
===================================================================
--- macros.mingw32 (revision 99)
+++ macros.mingw32 (working copy)
@@ -105,7 +105,8 @@
--sharedstatedir=%{mingw32_sharedstatedir} \\\
--mandir=%{mingw32_mandir} \\\
--infodir=%{mingw32_infodir} \\\
- ${MINGW32_CONFIGURE_ARGS}
+ ${MINGW_CONFIGURE_ARGS} \\\
+ ${MINGW32_CONFIGURE_ARGS}
%mingw32_make %{mingw32_env} ; \
make \\\
@@ -145,7 +146,39 @@
You should only install this package if you want to cross-compile programs for
\
Win32 (32 bit Windows).
+%mingw32_package \
+%package -n mingw32-%{mingw_pkg_name} \
+Summary: %{summary} \
+%description -n mingw32-%{mingw_pkg_name} \
+%mingw32_description \
+%files -n %{mingw32_pkg_name} -f mingw32-files.list \
+%defattr(-,root,root,-) \
+%{?mingw32_docfiles:%doc %{mingw32_docfiles}} \
+%{nil}
+%mingw32_static_package \
+%package -n %{mingw32_pkg_name}-static \
+Summary: Static version of the package %{mingw32_pkg_name} \
+Requires: %{mingw32_pkg_name} = %{version}-%{release} \
+%description -n %{mingw32_pkg_name}-static \
+Static version of the package %{mingw32_pkg_name}. \
+%files -n %{mingw32_pkg_name}-static -f mingw32-staticfiles.list \
+%defattr(-,root,root,-) \
+%{nil}
+
+%mingw32_debug_package \
+%package -n %{mingw32_pkg_name}-debuginfo \
+Summary: Debug information for package %{mingw32_pkg_name} \
+Group: Development/Debug \
+%description -n %{mingw32_pkg_name}-debuginfo \
+This package provides debug information for package %{mingw32_pkg_name}. \
+Debug information is useful when developing applications that use this \
+package or when debugging this package. \
+%files -n %{mingw32_pkg_name}-debuginfo -f mingw32-debugfiles.list \
+%defattr(-,root,root,-) \
+%{nil}
+
+
# Maintain backwards compatibility with the original MinGW packaging guidelines
# These can be dropped as soon as all packages are ported to the new packaging
guidelines
%_mingw32_pkg_name %{mingw32_pkg_name}
Index: macros.mingw64
===================================================================
--- macros.mingw64 (revision 99)
+++ macros.mingw64 (working copy)
@@ -107,7 +107,8 @@
--sharedstatedir=%{mingw64_sharedstatedir} \\\
--mandir=%{mingw64_mandir} \\\
--infodir=%{mingw64_infodir} \\\
- ${MINGW64_CONFIGURE_ARGS}
+ ${MINGW_CONFIGURE_ARGS} \\\
+ ${MINGW64_CONFIGURE_ARGS}
%mingw64_make %{mingw64_env} ; \
make \\\
@@ -143,3 +144,39 @@
%mingw64_qmake_qt4 %{mingw64_env} ; \
%_qt4_qmake -spec win32-g++-cross-x64
+%mingw64_description This is the cross-compiled version of this library /
tool.\
+You should only install this package if you want to cross-compile programs for
\
+Win64 (64 bit Windows).
+
+%mingw64_package \
+%package -n mingw64-%{mingw_pkg_name} \
+Summary: %{summary} \
+%description -n mingw64-%{mingw_pkg_name} \
+%mingw64_description \
+%files -n %{mingw64_pkg_name} -f mingw64-files.list \
+%defattr(-,root,root,-) \
+%{?mingw64_docfiles:%doc %{mingw64_docfiles}} \
+%{nil}
+
+%mingw64_static_package \
+%package -n %{mingw64_pkg_name}-static \
+Summary: Static version of the package %{mingw64_pkg_name} \
+Requires: %{mingw64_pkg_name} = %{version}-%{release} \
+%description -n %{mingw64_pkg_name}-static \
+Static version of the package %{mingw64_pkg_name}. \
+%files -n %{mingw64_pkg_name}-static -f mingw64-staticfiles.list \
+%defattr(-,root,root,-) \
+%{nil}
+
+%mingw64_debug_package \
+%package -n %{mingw64_pkg_name}-debuginfo \
+Summary: Debug information for package %{mingw64_pkg_name} \
+Group: Development/Debug \
+%description -n %{mingw64_pkg_name}-debuginfo \
+This package provides debug information for package %{mingw64_pkg_name}. \
+Debug information is useful when developing applications that use this \
+package or when debugging this package. \
+%files -n %{mingw64_pkg_name}-debuginfo -f mingw64-debugfiles.list \
+%defattr(-,root,root,-) \
+%{nil}
+
_______________________________________________
mingw mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/mingw