1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = Development/Compilers
11 url = http://ccache.samba.org/
13 summary = C/C++ compiler cache.
16 ccache is a compiler cache. It acts as a caching pre-processor to
17 C/C++ compilers, using the -E compiler switch and a hash to detect
18 when a compilation can be satisfied from cache. This often results in
19 a 5 to 10 times speedup in common compilations.
22 source_dl = http://samba.org/ftp/ccache/
23 sources = %{thisapp}.tar.xz
25 # Sets ccache max size up to 2 GB
26 CFLAGS += -DDEFAULT_MAXSIZE=2097152
34 CCACHE_CACHE = /var/cache/ccache
36 configure_options += \
37 --mandir=/usr/share/man
40 # Disable pch test that fails
41 sed -e "s/^pch_suite.*/& return 0/" -i test.sh
49 CCACHE_PLATFORM_TARGET=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g")
51 mkdir -pv %{BUILDROOT}%{libdir}/ccache
52 for i in gcc g++ cc c++; do \
53 ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${i}; \
54 ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${CCACHE_PLATFORM_TARGET}-${i}; \
57 mkdir -pv %{BUILDROOT}/etc/profile.d
58 sed -e "s|@LIBDIR@|%{libdir}|g" -e "s|@CACHEDIR@|%{CCACHE_CACHE}|g" \
59 < %{DIR_SOURCE}/ccache.sh > %{BUILDROOT}/etc/profile.d/ccache.sh
61 mkdir -pv -m770 %{BUILDROOT}/%{CCACHE_CACHE}
68 package %{name}-debuginfo