fix multilib devel conflict (rhbz#2031783)

During build, npth rewrites its config script and header file with the
current arch. This leads to a multilib file-conflict for npth-devel.

Patch the config script to use `uname -m` and the header file comment to
indicate both archs on x86.

Effectively, this is a lean implementation of:
https://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks
This commit is contained in:
Michael J Gruber 2023-05-15 16:19:46 +02:00
parent d809263821
commit 4b58633969

View File

@ -1,6 +1,6 @@
Name: npth Name: npth
Version: 1.6 Version: 1.6
Release: 12%{?dist} Release: 13%{?dist}
Summary: The New GNU Portable Threads library Summary: The New GNU Portable Threads library
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
URL: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git URL: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git
@ -37,6 +37,12 @@ developing applications that use %{name}.
%build %build
%configure --disable-static %configure --disable-static
%make_build %make_build
# avoid multilib conflict
%ifarch x86_64 i686
sed -ie 's/".*-redhat-linux-gnu"/"$(uname -m)-redhat-linux-gnu"/' %{name}-config
sed -ie 's/libs=".* -lnpth/libs="-lnpth/' %{name}-config
sed -ie 's/Configured for: .*-redhat-linux-gnu/Configured for: x86_64+i686-redhat-linux-gnu/' src/%{name}.h
%endif
%install %install
%make_install %make_install
@ -61,6 +67,9 @@ make check
%{_datadir}/aclocal/%{name}.m4 %{_datadir}/aclocal/%{name}.m4
%changelog %changelog
* Mon May 15 2023 Michael J Gruber <mjg@fedoraproject.org> - 1.6-13
- fix multilib devel conflict (rhbz#2031783)
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-12 * Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild