From: DRC Date: Wed, 20 Sep 2017 18:11:03 +0000 (+0000) Subject: SRPM build: Define _libdir based on build arch X-Git-Tag: 1.5.90~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d72522a684643de7915c1998abb488af1ad5fac;p=libjpeg-turbo SRPM build: Define _libdir based on build arch Setting _libdir to CMAKE_INSTALL_FULL_LIBDIR only works when doing an in-tree RPM build. SRPMs are architecture-agnostic, so the spec needs to compute_libdir at the time the SRPM is rebuilt, not at the time it is generated. This is a regression introduced when implementing the new CMake-based cross-platform build system. --- diff --git a/release/rpm.spec.in b/release/rpm.spec.in index 075e69b..54101bc 100644 --- a/release/rpm.spec.in +++ b/release/rpm.spec.in @@ -4,7 +4,6 @@ %define _docdir %{_defaultdocdir}/%{name}-%{version} %define _includedir @CMAKE_INSTALL_FULL_INCLUDEDIR@ %define _javadir @CMAKE_INSTALL_FULL_JAVADIR@ -%define _libdir @CMAKE_INSTALL_FULL_LIBDIR@ %define _mandir @CMAKE_INSTALL_FULL_MANDIR@ %define _enable_static @ENABLE_STATIC@ %define _enable_shared @ENABLE_SHARED@ @@ -22,6 +21,18 @@ %endif %endif +#-->%if 1 +%if "%{_bits}" == "64" +%define _libdir %{_exec_prefix}/lib64 +%else +%if "%{_prefix}" == "/opt/libjpeg-turbo" +%define _libdir %{_exec_prefix}/lib32 +%endif +%endif +#-->%else +%define _libdir @CMAKE_INSTALL_FULL_LIBDIR@ +#-->%endif + Summary: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs Name: @PKGNAME@ Version: @VERSION@