]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blob - ccache/ccache.nm
9c62b05bc6f132ab0d58aef89a7decd2a965568f
[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.5.1
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 autoconf
31 automake
32 perl
33 zlib-devel
34 end
35
36 CCACHE_CACHE = %{localstatedir}/cache/ccache
37
38 prepare_cmds
39 # The included configure script renders an incorrect Makefile
40 autoreconf -vfi
41
42 # Do not run test for pre-compiled headers
43 sed -e "/^pch$/d" -i test/run
44
45 # Remove shipped zlib
46 rm -rf zlib
47 end
48
49 test
50 make check
51 end
52
53 install_cmds
54 CCACHE_PLATFORM_TARGET=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g")
55
56 mkdir -pv %{BUILDROOT}%{libdir}/ccache
57 for i in gcc g++ cc c++; do \
58 ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${i}; \
59 ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${CCACHE_PLATFORM_TARGET}-${i}; \
60 done
61
62 mkdir -pv %{BUILDROOT}/etc/profile.d
63 sed -e "s|@LIBDIR@|%{libdir}|g" -e "s|@CACHEDIR@|%{CCACHE_CACHE}|g" \
64 < %{DIR_SOURCE}/ccache.sh > %{BUILDROOT}/etc/profile.d/ccache.sh
65
66 mkdir -pv -m770 %{BUILDROOT}/%{CCACHE_CACHE}
67 end
68 end
69
70 packages
71 package %{name}
72
73 package %{name}-debuginfo
74 template DEBUGINFO
75 end
76 end