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