]>
Commit | Line | Data |
---|---|---|
9efad0d0 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
9efad0d0 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = ccache |
a41c6c9b | 7 | version = 3.3.6 |
e0f5e371 | 8 | release = 1 |
9efad0d0 | 9 | |
802ea3af MT |
10 | groups = Development/Compilers |
11 | url = http://ccache.samba.org/ | |
12 | license = GPLv2+ | |
13 | summary = C/C++ compiler cache. | |
fce85abf | 14 | |
802ea3af MT |
15 | description |
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 | |
9efad0d0 | 19 | a 5 to 10 times speedup in common compilations. |
802ea3af | 20 | end |
9efad0d0 | 21 | |
a20152c4 | 22 | source_dl = https://www.samba.org/ftp/ccache/ |
38736b09 | 23 | sources = %{thisapp}.tar.xz |
9efad0d0 | 24 | |
590c45fb SS |
25 | # Sets ccache max size up to 2 GB |
26 | CFLAGS += -DDEFAULT_MAXSIZE=2097152 | |
27 | ||
802ea3af MT |
28 | build |
29 | requires | |
30 | perl | |
31 | zlib-devel | |
32 | end | |
33 | ||
a41c6c9b | 34 | CCACHE_CACHE = %{localstatedir}/cache/ccache |
802ea3af MT |
35 | |
36 | prepare_cmds | |
37 | # Disable pch test that fails | |
38 | sed -e "s/^pch_suite.*/& return 0/" -i test.sh | |
e0f5e371 MT |
39 | |
40 | # Remove shipped zlib | |
41 | rm -rf zlib | |
802ea3af | 42 | end |
13f2619e | 43 | |
802ea3af | 44 | test |
a41c6c9b | 45 | make check |
802ea3af | 46 | end |
16416892 | 47 | |
802ea3af MT |
48 | install_cmds |
49 | CCACHE_PLATFORM_TARGET=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g") | |
9efad0d0 | 50 | |
8b7867f2 | 51 | mkdir -pv %{BUILDROOT}%{libdir}/ccache |
802ea3af | 52 | for i in gcc g++ cc c++; do \ |
8b7867f2 MT |
53 | ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${i}; \ |
54 | ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${CCACHE_PLATFORM_TARGET}-${i}; \ | |
802ea3af | 55 | done |
9efad0d0 | 56 | |
802ea3af | 57 | mkdir -pv %{BUILDROOT}/etc/profile.d |
8b7867f2 | 58 | sed -e "s|@LIBDIR@|%{libdir}|g" -e "s|@CACHEDIR@|%{CCACHE_CACHE}|g" \ |
802ea3af | 59 | < %{DIR_SOURCE}/ccache.sh > %{BUILDROOT}/etc/profile.d/ccache.sh |
13f2619e | 60 | |
802ea3af MT |
61 | mkdir -pv -m770 %{BUILDROOT}/%{CCACHE_CACHE} |
62 | end | |
63 | end | |
13f2619e | 64 | |
802ea3af MT |
65 | packages |
66 | package %{name} | |
1f9bc2f0 MT |
67 | |
68 | package %{name}-debuginfo | |
69 | template DEBUGINFO | |
70 | end | |
802ea3af | 71 | end |