From 5caa412c6bc9729457ed36c16f8d3218cd4ac5c5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 28 Mar 2023 09:55:56 +0200 Subject: [PATCH] Add support for mock ccache plugin --- samba.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/samba.spec b/samba.spec index bb144fb..bffef92 100644 --- a/samba.spec +++ b/samba.spec @@ -1262,6 +1262,13 @@ export python_LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,-z,defs//g')" export python_LDFLAGS="$(echo %{__global_ldflags} | sed -e 's/-Wl,-z,defs//g')" %endif +# Add support for mock ccache plugin +CCACHE="$(command -v ccache)" +if [ -n "${CCACHE}" ]; then + ${CCACHE} -s + export CC="${CCACHE} gcc" +fi + %configure \ --enable-fhs \ --with-piddir=/run \