]>
Commit | Line | Data |
---|---|---|
1 | Summary: Compiler cache | |
2 | Summary(pl.UTF-8): Przyspieszacz kompilowania | |
3 | Summary(pt_BR.UTF-8): Cache para compiladores C/C++ | |
4 | Name: ccache | |
5 | Version: 3.1.1 | |
6 | Release: 1 | |
7 | License: GPL v3 | |
8 | Group: Development/Tools | |
9 | Source0: http://samba.org/ftp/ccache/%{name}-%{version}.tar.bz2 | |
10 | # Source0-md5: 7dbd668c79d78c0b32c13214b2b35b70 | |
11 | Patch0: %{name}-nohash_size_mtime.patch | |
12 | URL: http://ccache.samba.org/ | |
13 | BuildRequires: automake | |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
15 | ||
16 | %define _libdir %{_prefix}/%{_lib}/%{name} | |
17 | ||
18 | %description | |
19 | ccache is a compiler cache. It acts as a caching pre-processor to | |
20 | C/C++ compilers, using the -E compiler switch and a hash to detect | |
21 | when a compilation can be satisfied from cache. This often results in | |
22 | a 5 to 10 times speedup in common compilations. | |
23 | ||
24 | %description -l pl.UTF-8 | |
25 | ccache działa jako cachujący preprocesor dla kompilatorów C/C++. Przy | |
26 | użyciu opcji kompilatora -E oraz tablicy haszującej do wykrywania, czy | |
27 | do kompilacji wystarczy zawartość cache. Daje to zazwyczaj | |
28 | przyspieszenie kompilacji 5 do 10 razy. | |
29 | ||
30 | %description -l pt_BR.UTF-8 | |
31 | ccache é um cache para compiladores. Ele funciona mantendo um cache de | |
32 | pré-processamento para compiladores C/C++ utilizando-se do parâmetro | |
33 | - -E e de um hash para detectar quando uma compilação pode ser | |
34 | reaproveitada de um cache armazenado em disco. O ganho de tempo em | |
35 | compilações comuns pode chegar a uma escala de até 10 vezes em relação | |
36 | ao tempo normal. | |
37 | ||
38 | %package wrapper | |
39 | Summary: Symlinks for c++/cc/g++/gcc | |
40 | Summary(pl.UTF-8): Dowiązania symboliczne do c++/cc/g++/gcc | |
41 | Group: Development/Tools | |
42 | Requires: %{name} = %{version}-%{release} | |
43 | ||
44 | %description wrapper | |
45 | This package contains the softlinks to ccache for each compiler. | |
46 | ||
47 | %description wrapper -l pl.UTF-8 | |
48 | Ten pakiet zawiera dowiązania symboliczne do ccache dla każdego | |
49 | kompilatora. | |
50 | ||
51 | %prep | |
52 | %setup -q | |
53 | %patch0 -p1 | |
54 | ||
55 | %build | |
56 | cp -f /usr/share/automake/config.* . | |
57 | %configure | |
58 | ||
59 | %{__make} | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | install -d $RPM_BUILD_ROOT/etc/env.d | |
65 | ||
66 | %{__make} install \ | |
67 | DESTDIR=$RPM_BUILD_ROOT | |
68 | ||
69 | for X in CCACHE_DIR CCACHE_TEMPDIR CCACHE_LOGFILE CCACHE_PATH CCACHE_CC CCACHE_PREFIX \ | |
70 | CCACHE_DISABLE CCACHE_READONLY CCACHE_CPP2 CCACHE_NOSTATS CCACHE_NLEVELS \ | |
71 | CCACHE_HARDLINK CCACHE_RECACHE CCACHE_UMASK CCACHE_HASHDIR CCACHE_UNIFY \ | |
72 | CCACHE_EXTENSION CCACHE_NOHASH_SIZE_MTIME | |
73 | do | |
74 | echo "#${X}=\"\"" > $RPM_BUILD_ROOT/etc/env.d/${X} | |
75 | done | |
76 | ||
77 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},/etc/profile.d} | |
78 | for cc in cc c++ g++ gcc %{_target_cpu}-pld-linux-gcc %{_target_cpu}-pld-linux-g++; do | |
79 | ln -s ../../bin/%{name} $RPM_BUILD_ROOT%{_libdir}/$cc | |
80 | done | |
81 | echo 'export PATH=%{_libdir}:$PATH' > \ | |
82 | $RPM_BUILD_ROOT/etc/profile.d/%{name}.sh | |
83 | ||
84 | %clean | |
85 | rm -fr $RPM_BUILD_ROOT | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
89 | %doc AUTHORS.txt MANUAL.txt NEWS.txt README.txt | |
90 | %attr(755,root,root) %{_bindir}/ccache | |
91 | %{_mandir}/man1/ccache* | |
92 | %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/* | |
93 | ||
94 | %files wrapper | |
95 | %defattr(644,root,root,755) | |
96 | %attr(755,root,root) /etc/profile.d/%{name}.sh | |
97 | %dir %{_libdir} | |
98 | %attr(755,root,root) %{_libdir}/* |