############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = ccache version = 3.1.9 release = 2 groups = Development/Compilers url = http://ccache.samba.org/ license = GPLv2+ summary = C/C++ compiler cache. 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. end source_dl = http://samba.org/ftp/ccache/ sources = %{thisapp}.tar.xz # Sets ccache max size up to 2 GB CFLAGS += -DDEFAULT_MAXSIZE=2097152 build requires perl zlib-devel end CCACHE_CACHE = /var/cache/ccache configure_options += \ --mandir=/usr/share/man prepare_cmds # Disable pch test that fails sed -e "s/^pch_suite.*/& return 0/" -i test.sh end test make check end install_cmds CCACHE_PLATFORM_TARGET=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g") mkdir -pv %{BUILDROOT}%{libdir}/ccache for i in gcc g++ cc c++; do \ ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${i}; \ ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${CCACHE_PLATFORM_TARGET}-${i}; \ done mkdir -pv %{BUILDROOT}/etc/profile.d sed -e "s|@LIBDIR@|%{libdir}|g" -e "s|@CACHEDIR@|%{CCACHE_CACHE}|g" \ < %{DIR_SOURCE}/ccache.sh > %{BUILDROOT}/etc/profile.d/ccache.sh mkdir -pv -m770 %{BUILDROOT}/%{CCACHE_CACHE} end end packages package %{name} package %{name}-debuginfo template DEBUGINFO end end