public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libmad] rawhide: add MinGW subpackages (resolves rhbz#2236721)
@ 2026-08-09 21:37 Dominik 'Rathann' Mierzejewski
  0 siblings, 0 replies; only message in thread
From: Dominik 'Rathann' Mierzejewski @ 2026-08-09 21:37 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libmad
Branch : rawhide
Commit : 694078d93129c862f3aa68f2b0901156df5414d0
Author : Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date   : 2026-08-09T22:57:31+02:00
Stats  : +58/-0 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/libmad/c/694078d93129c862f3aa68f2b0901156df5414d0?branch=rawhide

Log:
add MinGW subpackages (resolves rhbz#2236721)

---
diff --git a/libmad.spec b/libmad.spec
index d5d7a84..61c21cf 100644
--- a/libmad.spec
+++ b/libmad.spec
@@ -1,3 +1,9 @@
+%if 0%{fedora}
+%bcond mingw 1
+%else
+%bcond mingw 0
+%endif
+
 Name:          libmad
 Version:       0.16.4
 Release:       %autorelease
@@ -10,6 +16,14 @@ Patch0:        %{url}/commit/326363f04e583b563f63941db3cf7f50e76aceb2.patch#/cma
 Patch1:        libmad-x86.patch
 BuildRequires: cmake
 BuildRequires: gcc-c++
+%if %{with mingw}
+BuildRequires:  mingw32-filesystem
+BuildRequires:  mingw32-gcc-c++
+BuildRequires:  mingw32-libtiff
+BuildRequires:  mingw64-filesystem
+BuildRequires:  mingw64-gcc-c++
+BuildRequires:  mingw64-libtiff
+%endif
 
 %description
 MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1
@@ -24,15 +38,41 @@ Requires:      %{name}%{?_isa} = %{version}-%{release}
 %description devel
 %{summary}.
 
+%if %{with mingw}
+%package -n mingw32-%{name}
+Summary:       MinGW Windows %{name} library
+BuildArch:     noarch
+
+%description -n mingw32-%{name}
+%{summary}.
+
+%package -n mingw64-%{name}
+Summary:       MinGW Windows %{name} library
+BuildArch:     noarch
+
+%description -n mingw64-%{name}
+%{summary}.
+
+%{?mingw_debug_package}
+%endif
+
 %prep
 %autosetup -p1 -n %{name}
 
 %build
 %cmake -DOPTIMIZE=ACCURACY
 %cmake_build
+%if %{with mingw}
+%mingw_cmake -DCMAKE_DLL_NAME_WITH_SOVERSION=ON
+%mingw_make_build
+%endif
 
 %install
 %cmake_install
+%if %{with mingw}
+%mingw_make_install
+%mingw_debug_install_post
+%endif
 
 %files
 %doc CHANGES CREDITS README.md TODO
@@ -45,5 +85,23 @@ Requires:      %{name}%{?_isa} = %{version}-%{release}
 %{_libdir}/pkgconfig/mad.pc
 %{_includedir}/mad.h
 
+%if %{with mingw}
+%files -n mingw32-%{name}
+%license COPYING COPYRIGHT
+%{mingw32_bindir}/%{name}-0.dll
+%{mingw32_libdir}/%{name}.dll.a
+%{mingw32_libdir}/cmake/mad/
+%{mingw32_libdir}/pkgconfig/mad.pc
+%{mingw32_includedir}/mad.h
+
+%files -n mingw64-%{name}
+%license COPYING COPYRIGHT
+%{mingw64_bindir}/%{name}-0.dll
+%{mingw64_libdir}/%{name}.dll.a
+%{mingw64_libdir}/cmake/mad/
+%{mingw64_libdir}/pkgconfig/mad.pc
+%{mingw64_includedir}/mad.h
+%endif
+
 %changelog
 %autochangelog

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-09 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-09 21:37 [rpms/libmad] rawhide: add MinGW subpackages (resolves rhbz#2236721) Dominik 'Rathann' Mierzejewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox