From: DRC Date: Tue, 19 Sep 2017 18:03:49 +0000 (-0500) Subject: Fix 32-bit RPM build w/ newer RHEL/Fedora releases X-Git-Tag: 1.5.3~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d403aeb6ac7552a5ec8e712d4a9745c03b0748c;p=libjpeg-turbo Fix 32-bit RPM build w/ newer RHEL/Fedora releases The version of RPM on RHEL 5 and older platforms defines _libdir as %{_exec_prefix}/%{_lib}, so defining _lib in the spec file redefined _libdir. However, newer versions of RPM (probably >= 4.6, since that was the version that introduced the ISA macros) define _libdir as either %{_prefix}/lib or %{_prefix}/lib64. Thus, we need to explicitly override _libdir in our spec file. --- diff --git a/release/libjpeg-turbo.spec.in b/release/libjpeg-turbo.spec.in index 662cf9d..8ba87c7 100644 --- a/release/libjpeg-turbo.spec.in +++ b/release/libjpeg-turbo.spec.in @@ -13,12 +13,11 @@ # Path under which headers should be installed %define _includedir %{__includedir} -# _libdir is set to %{_prefix}/%{_lib} by default %ifarch x86_64 -%define _lib lib64 +%define _libdir %{_exec_prefix}/lib64 %else %if "%{_prefix}" == "/opt/libjpeg-turbo" -%define _lib lib32 +%define _libdir %{_exec_prefix}/lib32 %endif %endif @@ -87,7 +86,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la LJT_LIBDIR=%{__libdir} if [ ! "$LJT_LIBDIR" = "%{_libdir}" ]; then - echo ERROR: libjpeg-turbo must be configured with libdir=%{_prefix}/%{_lib} when generating an in-tree RPM for this architecture. + echo ERROR: libjpeg-turbo must be configured with libdir=%{_libdir} when generating an in-tree RPM for this architecture. exit 1 fi