]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blame - ccache/ccache.nm
ccache: Update to 4.7.4
[people/stevee/ipfire-3.x.git] / ccache / ccache.nm
CommitLineData
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 6name = ccache
2125ada4 7version = 4.7.4
e0f5e371 8release = 1
9efad0d0 9
802ea3af 10groups = Development/Compilers
f4c965cf 11url = https://ccache.dev
802ea3af
MT
12license = GPLv2+
13summary = C/C++ compiler cache.
fce85abf 14
802ea3af
MT
15description
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 20end
9efad0d0 21
f4c965cf 22source_dl = https://github.com/ccache/ccache/releases/download/v%{version}/
590c45fb 23
802ea3af
MT
24build
25 requires
2125ada4 26 cmake
802ea3af
MT
27 perl
28 zlib-devel
2125ada4 29 zstd-devel
802ea3af
MT
30 end
31
a41c6c9b 32 CCACHE_CACHE = %{localstatedir}/cache/ccache
802ea3af 33
2125ada4
MT
34 build
35 %{cmake} . \
36 -DREDIS_STORAGE_BACKEND=OFF
e0f5e371 37
2125ada4 38 make %{PARALLELISMFLAGS}
802ea3af 39 end
13f2619e 40
2125ada4
MT
41 #test
42 # # XXX Disabled because the testsuite removes libzstd.so.1
43 # make check
44 #end
16416892 45
802ea3af
MT
46 install_cmds
47 CCACHE_PLATFORM_TARGET=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g")
9efad0d0 48
8b7867f2 49 mkdir -pv %{BUILDROOT}%{libdir}/ccache
802ea3af 50 for i in gcc g++ cc c++; do \
8b7867f2
MT
51 ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${i}; \
52 ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${CCACHE_PLATFORM_TARGET}-${i}; \
802ea3af 53 done
9efad0d0 54
802ea3af 55 mkdir -pv %{BUILDROOT}/etc/profile.d
8b7867f2 56 sed -e "s|@LIBDIR@|%{libdir}|g" -e "s|@CACHEDIR@|%{CCACHE_CACHE}|g" \
802ea3af 57 < %{DIR_SOURCE}/ccache.sh > %{BUILDROOT}/etc/profile.d/ccache.sh
13f2619e 58
802ea3af
MT
59 mkdir -pv -m770 %{BUILDROOT}/%{CCACHE_CACHE}
60 end
61end
13f2619e 62
802ea3af
MT
63packages
64 package %{name}
1f9bc2f0
MT
65
66 package %{name}-debuginfo
67 template DEBUGINFO
68 end
802ea3af 69end