#define tag a Name: ccache Version: 4.8.2 Release: %mkrel 1 Group: Development/Tools Summary: Compiler Cache License: GPLv3+ URL: https://ccache.dev/ Source0: https://github.com/ccache/ccache/releases/download/v%{version}/%{name}-%{version}%{?tag}.tar.xz # require fixed gcc (mga #31893) BuildRequires: gcc >= 12.3.0-2 BuildRequires: cmake BuildRequires: asciidoc BuildRequires: asciidoctor BuildRequires: docbook-style-xsl BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(hiredis) %description ccache is a compiler cache. It acts as a caching pre-processor to C/C++ compilers, using the -E compiler switch and a hash to detect when a compilation can be satisfied from cache. This often results in a 5 to 10 times speedup in common compilations. To enable ccache's default use, the system admin should modify %{_sysconfdir}/sysconfig/ccache to "yes". If its default use is not enabled and you wish to use it, simply add %{_prefix}/%{_lib}/ccache/bin/ to the start of your \$PATH %prep %autosetup -p1 # This fixes a cmake error sed -i -e '/^\(string.STRIP\)/s/^/#/' cmake/CIBuildType.cmake %build %cmake %cmake_build cat <<EOF > %{name}.sh if [ -f /etc/sysconfig/ccache ]; then . /etc/sysconfig/ccache fi if [ "\$USE_CCACHE_DEFAULT" = "yes" ]; then if [ -z \`echo "\$PATH" | grep "%_libdir/ccache/bin"\` ]; then export PATH="%_libdir/ccache/bin:\$PATH" fi fi EOF cat << EOF > %{name}.csh if ( -f /etc/sysconfig/ccache ) then eval \`sed -n 's/^\([^#]*\)=\([^#]*\)/set \1=\2;/p' < /etc/sysconfig/ccache\` endif if ( "\$USE_CCACHE_DEFAULT" == "yes" ) then if ( "\$path" !~ *%_libdir/ccache/bin* ) then setenv path = ( %_libdir/ccache/bin \$path ) endif endif EOF %install %cmake_install install -dm 755 %{buildroot}{%{_bindir},%{_libdir}/ccache/bin,%{_mandir}/man1} install -dm 755 %{buildroot}%{_sysconfdir}/profile.d install -pm 755 %{name}.sh %{name}.csh %{buildroot}%{_sysconfdir}/profile.d rm -f %{name}-%{version}.compilers pref=`gcc -dumpmachine` create_compiler() { cat <<EOF > %{buildroot}%{_prefix}/%{_lib}/ccache/bin/$1 #!/bin/sh if [ ! -x %_bindir/$1 ]; then echo Error: compiler $1 does not exist. >&2 exit 127 fi PATH=%_bindir:\$PATH if [ -f /etc/sysconfig/ccache ]; then . /etc/sysconfig/ccache if [ "\$USE_CCACHE_WITH_ICECREAM" = "yes" ]; then PATH=%{_libdir}/icecc/bin:\$PATH fi fi ccache ${1} "\$@" EOF echo "%attr(0755,root,root) %{_libdir}/ccache/bin/$1" >> %{name}-%{version}.compilers } for name in gcc g++ c++ clang clang++; do for comp in $name $pref-$name ${pref/manbo/mandriva}-$name; do # check for backports that have no manbo: [ -e "%{buildroot}%{_libdir}/ccache/bin/$comp" ] || create_compiler $comp done done create_compiler cc mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/ cat <<EOF > %{buildroot}/%{_sysconfdir}/sysconfig/%{name} # Should we add the ccache compiler symlinks to PATH # yes|no # Please note that if added to \$PATH the user can still disable # it with CCACHE_DISABLE # If not enabled by default, the user can add %{_libdir}/ccache/bin/ # to their \$PATH USE_CCACHE_DEFAULT="no" # Enable icecream integration USE_CCACHE_WITH_ICECREAM="no" EOF %files -f %{name}-%{version}.compilers %doc doc/NEWS.adoc doc/AUTHORS.adoc %dir %{_libdir}/ccache %dir %{_libdir}/ccache/bin %{_bindir}/ccache %{_mandir}/man1/ccache.1* %{_sysconfdir}/profile.d/* %config(noreplace) %{_sysconfdir}/sysconfig/* %changelog * Thu Jun 15 2023 kekepower <kekepower> 4.8.2-1.mga9 + Revision: 1962042 - Update to version 4.8.2 * Wed May 24 2023 kekepower <kekepower> 4.8.1-1.mga9 + Revision: 1957880 - Update to version 4.8.1 * Sun May 14 2023 tmb <tmb> 4.8-2.mga9 + Revision: 1956847 - rebuild with fixed gcc * Mon Mar 13 2023 kekepower <kekepower> 4.8-1.mga9 + Revision: 1948763 - Update to version 4.8 * Thu Nov 24 2022 kekepower <kekepower> 4.7.4-1.mga9 + Revision: 1910705 - Update to version 4.7.4 * Sun Nov 06 2022 kekepower <kekepower> 4.7.3-1.mga9 + Revision: 1903948 - Update to version 4.7.3 * Sat Oct 29 2022 kekepower <kekepower> 4.7.2-1.mga9 + Revision: 1900128 - Update to version 4.7.2 * Wed Oct 19 2022 kekepower <kekepower> 4.7-1.mga9 + Revision: 1897594 - Update to version 4.7 * Sun Aug 28 2022 kekepower <kekepower> 4.6.3-1.mga9 + Revision: 1881494 - Update to version 4.6.3 * Mon Aug 22 2022 kekepower <kekepower> 4.6.2-1.mga9 + Revision: 1879494 - Update to version 4.6.2 * Mon May 16 2022 kekepower <kekepower> 4.6.1-1.mga9 + Revision: 1858391 - Update to version 4.6.1 * Sat Mar 26 2022 umeabot <umeabot> 4.6-2.mga9 + Revision: 1827825 - Mageia 9 Mass Rebuild * Mon Feb 28 2022 kekepower <kekepower> 4.6-1.mga9 + Revision: 1786625 - Update to version 4.6 * Wed Nov 17 2021 kekepower <kekepower> 4.5.1-1.mga9 + Revision: 1757608 - Update to version 4.5.1 * Mon Nov 15 2021 kekepower <kekepower> 4.5-1.mga9 + Revision: 1756658 - Update to version 4.5 * Fri Oct 01 2021 kekepower <kekepower> 4.4.2-1.mga9 + Revision: 1747155 - Update to version 4.4.2 * Mon Sep 13 2021 kekepower <kekepower> 4.4.1-1.mga9 + Revision: 1745407 - Update to version 4.4.1 * Thu Jun 17 2021 joequant <joequant> 4.3-1.mga9 + Revision: 1730990 - update to 4.3 * Thu Dec 31 2020 danf <danf> 4.1-1.mga8 + Revision: 1667299 - Update to ver. 4.1 - The format and location of the cache is changed, so old cache directories should be deleted * Thu Oct 01 2020 kekepower <kekepower> 3.7.12-1.mga8 + Revision: 1631506 - Update to version 3.7.12 * Wed Jul 22 2020 kekepower <kekepower> 3.7.11-1.mga8 + Revision: 1607765 - Update to version 3.7.11 * Mon Jun 22 2020 kekepower <kekepower> 3.7.10-1.mga8 + Revision: 1598518 - Update to version 3.7.10 * Sun Mar 29 2020 kekepower <kekepower> 3.7.9-1.mga8 + Revision: 1562222 - Update to version 3.7.9 * Tue Mar 17 2020 kekepower <kekepower> 3.7.8-1.mga8 + Revision: 1557463 - Update to version 3.7.8 * Wed Feb 19 2020 umeabot <umeabot> 3.7.7-2.mga8 + Revision: 1542568 - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%configure2_5x * Sun Jan 05 2020 kekepower <kekepower> 3.7.7-1.mga8 + Revision: 1476761 - Update to version 3.7.7 * Wed Nov 20 2019 kekepower <kekepower> 3.7.6-1.mga8 + Revision: 1461820 - Update to version 3.7.6 * Sun Nov 03 2019 kekepower <kekepower> 3.7.5-1.mga8 + Revision: 1457363 - Update to version 3.7.5 * Sun Sep 15 2019 kekepower <kekepower> 3.7.4-1.mga8 + Revision: 1440981 - Update to version 3.7.4 * Tue Sep 10 2019 shlomif <shlomif> 3.7.3-1.mga8 + Revision: 1439465 - New version 3.7.3 * Sun Jul 21 2019 kekepower <kekepower> 3.7.2-1.mga8 + Revision: 1423333 - Update to version 3.7.2 * Sun May 05 2019 kekepower <kekepower> 3.7.1-1.mga7 + Revision: 1396395 - Update to version 3.7.1 * Sat Apr 27 2019 kekepower <kekepower> 3.7-1.mga7 + Revision: 1395695 - Update to version 3.7 - Update Source link - Update URL * Fri Jan 18 2019 kekepower <kekepower> 3.6-1.mga7 + Revision: 1357929 - Update to version 3.6 * Sat Jan 05 2019 kekepower <kekepower> 3.5.1-1.mga7 + Revision: 1349490 - Update to version 3.5.1 * Tue Oct 16 2018 kekepower <kekepower> 3.5-1.mga7 + Revision: 1320885 - Update to version 3.5 * Fri Sep 07 2018 kekepower <kekepower> 3.4.3-1.mga7 + Revision: 1257678 - Update to version 3.4.3 * Mon Mar 26 2018 kekepower <kekepower> 3.4.2-1.mga7 + Revision: 1212687 - Fixed installation of man page - Update to version 3.4.2 * Mon Feb 12 2018 kekepower <kekepower> 3.4.1-1.mga7 + Revision: 1200740 - Add BR for zlib - Update to version 3.4.1 * Fri Jan 19 2018 kekepower <kekepower> 3.3.5-1.mga7 + Revision: 1194711 - Update to version 3.3.5 * Wed Jun 28 2017 shlomif <shlomif> 3.3.4-1.mga6 + Revision: 1108618 - New version 3.3.4. * Sat Feb 25 2017 blino <blino> 3.3.3-2.mga6 + Revision: 1087788 - provide clang wrappers as well in libdir/ccache/bin/ * Thu Nov 03 2016 shlomif <shlomif> 3.3.3-1.mga6 + Revision: 1065115 - New version 3.3.3. Tested locally. * Tue Oct 04 2016 shlomif <shlomif> 3.3.2-1.mga6 + Revision: 1058777 - New version 3.3.2 with some fixes * Sat Sep 24 2016 shlomif <shlomif> 3.2.8-1.mga6 + Revision: 1055818 - New version 3.2.8 * Sat May 28 2016 shlomif <shlomif> 3.2.5-1.mga6 + Revision: 1019053 - New version 3.2.5 * Sat Feb 13 2016 umeabot <umeabot> 3.2.4-2.mga6 + Revision: 959668 - Mageia 6 Mass Rebuild * Wed Oct 21 2015 ngompa <ngompa> 3.2.4-1.mga6 + Revision: 893894 - Update to 3.2.4 * Wed Aug 19 2015 ycantin <ycantin> 3.2.3-1.mga6 + Revision: 865850 - new version 3.2.3 * Sat Jun 20 2015 shlomif <shlomif> 3.2.2-1.mga6 + Revision: 835808 - New version 3.2.2 * Wed Oct 15 2014 umeabot <umeabot> 3.1.9-4.mga5 + Revision: 742045 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 3.1.9-3.mga5 + Revision: 678325 - Mageia 5 Mass Rebuild * Sat Oct 19 2013 umeabot <umeabot> 3.1.9-2.mga4 + Revision: 523946 - Mageia 4 Mass Rebuild * Mon May 27 2013 blino <blino> 3.1.9-1.mga4 + Revision: 428513 - 3.1.9 * Fri Jan 11 2013 umeabot <umeabot> 3.1.8-2.mga3 + Revision: 347438 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Dec 09 2012 kamil <kamil> 3.1.8-1.mga3 + Revision: 329206 - new bugfix releae 3.1.8 * Wed Oct 03 2012 malo <malo> 3.1.7-2.mga3 + Revision: 302718 - update RPM group * Thu Jan 12 2012 doktor5000 <doktor5000> 3.1.7-1.mga2 + Revision: 195428 - new version 3.1.7 - removed obsolete %%clean section and empty %%defattr - don't use macros for system executables * Mon Jun 27 2011 ahmad <ahmad> 3.1.5-1.mga2 + Revision: 114208 - Update to 3.1.5 * Wed Apr 20 2011 anssi <anssi> 3.1.4-1.mga1 + Revision: 88971 - clean empty lines from the end of .spec - new version - imported package ccache