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