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