From 5302a3c717364a52bb61108c96e94f7532e13a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?=
Date: Mon, 3 Oct 2016 16:42:07 +0100 Subject: [PATCH] set LDFLAGS in a manner compatible with el6 __global_ldflags is not set on el6, so only use that where available --- zstd.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zstd.spec b/zstd.spec index 8b53266..873fe36 100644 --- a/zstd.spec +++ b/zstd.spec @@ -36,12 +36,14 @@ find -name .gitignore -delete %patch0 -p1 %build +%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} for dir in lib programs; do - CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" %make_build -C "$dir" + CFLAGS="%{optflags}" %make_build -C "$dir" done %check -CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" make -C tests test-zstd +%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} +CFLAGS="%{optflags}" make -C tests test-zstd %install %make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}