From a79fd33b58027a5883eb1056023c4d529b701766 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 5 May 2023 13:53:47 +0200 Subject: [PATCH] Fix ccache support --- samba.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/samba.spec b/samba.spec index 48dfc41..29f9447 100644 --- a/samba.spec +++ b/samba.spec @@ -2,7 +2,7 @@ # # To build and run the tests use: # -# fedpkg local --with testsuite +# fedpkg mockbuild --with testsuite # or # rpmbuild --rebuild --with testsuite samba.src.rpm # @@ -10,12 +10,15 @@ # Build with internal talloc, tevent, tdb and ldb. # -# fedpkg local --with=testsuite --with=includelibs +# fedpkg mockbuild --with=testsuite --with=includelibs # or # rpmbuild --rebuild --with=testsuite --with=includelibs samba.src.rpm # %bcond_with includelibs +# fedpkg mockbuild --with=ccache +%bcond_with ccache + # ctdb is enabled by default, you can disable it with: --without clustering %bcond_without clustering @@ -1263,11 +1266,13 @@ export python_LDFLAGS="$(echo %{__global_ldflags} | sed -e 's/-Wl,-z,defs//g')" %endif # Add support for mock ccache plugin +%if %{with ccache} CCACHE="$(command -v ccache)" if [ -n "${CCACHE}" ]; then ${CCACHE} -s export CC="${CCACHE} gcc" fi +%endif %configure \ --enable-fhs \