]> git.pld-linux.org Git - packages/ccache.git/blob - ccache.spec
don't use lld; rel 2
[packages/ccache.git] / ccache.spec
1 Summary:        Compiler cache
2 Summary(pl.UTF-8):      Pamięć podręczna dla kompilatora
3 Summary(pt_BR.UTF-8):   Cache para compiladores C/C++
4 Name:           ccache
5 Version:        4.2.1
6 Release:        2
7 License:        GPL v3+
8 Group:          Development/Tools
9 Source0:        https://github.com/ccache/ccache/releases/download/v%{version}/%{name}-%{version}.tar.xz
10 # Source0-md5:  0f95a4b491a4dcd904c8235ee7c660cd
11 URL:            https://ccache.dev/
12 BuildRequires:  cmake >= 3.4.3
13 BuildRequires:  libstdc++-devel >= 6:4.8.1
14 BuildRequires:  rpmbuild(macros) >= 1.605
15 BuildRequires:  tar >= 1:1.22
16 BuildRequires:  xz
17 BuildRequires:  zstd-devel >= 1.1.2
18 Requires:       zstd >= 1.1.2
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         pkglibexecdir   %{_libexecdir}/%{name}
22
23 %description
24 ccache is a compiler cache. It acts as a caching pre-processor to
25 C/C++ compilers, using the -E compiler switch and a hash to detect
26 when a compilation can be satisfied from cache. This often results in
27 a 5 to 10 times speedup in common compilations.
28
29 %description -l pl.UTF-8
30 ccache to pamięć podręczna dla kompilatora - działa jako cachujący
31 preprocesor dla kompilatorów C/C++, wykorzystujący opcję kompilatora
32 -E oraz tablicę haszującą do wykrywania, czy do kompilacji wystarczy
33 zawartość pamięci podręcznej. Daje to zazwyczaj przyspieszenie
34 kompilacji 5 do 10 razy.
35
36 %description -l pt_BR.UTF-8
37 ccache é um cache para compiladores. Ele funciona mantendo um cache de
38 pré-processamento para compiladores C/C++ utilizando-se do parâmetro
39 - -E e de um hash para detectar quando uma compilação pode ser
40   reaproveitada de um cache armazenado em disco. O ganho de tempo em
41   compilações comuns pode chegar a uma escala de até 10 vezes em relação
42   ao tempo normal.
43
44 %package wrapper
45 Summary:        Symlinks for c++/cc/g++/gcc
46 Summary(pl.UTF-8):      Dowiązania symboliczne do c++/cc/g++/gcc
47 Group:          Development/Tools
48 Requires:       %{name} = %{version}-%{release}
49
50 %description wrapper
51 This package contains the softlinks to ccache for each compiler.
52
53 %description wrapper -l pl.UTF-8
54 Ten pakiet zawiera dowiązania symboliczne do ccache dla każdego
55 kompilatora.
56
57 %prep
58 %setup -q
59
60 %build
61 %cmake -B build \
62         -DUSE_FASTER_LINKER=OFF
63
64 %{__make} -C build
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT/etc/env.d
69
70 %{__make} -C build install \
71         DESTDIR=$RPM_BUILD_ROOT
72
73 install -d $RPM_BUILD_ROOT{%{_bindir},%{pkglibexecdir},/etc/profile.d}
74 %ifarch x32
75 target=x86_64-%{_target_vendor}-%{_target_os}-gnux32
76 %else
77 target=%{_target_cpu}-%{_target_vendor}-%{_target_os}
78 %endif
79 for cc in cc c++ g++ gcc $target-gcc $target-g++; do
80         ln -s ../../bin/%{name} $RPM_BUILD_ROOT%{pkglibexecdir}/$cc
81 done
82 echo 'export PATH=%{pkglibexecdir}:$PATH' > \
83         $RPM_BUILD_ROOT/etc/profile.d/%{name}.sh
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(644,root,root,755)
90 %doc LICENSE.* README.md doc/{AUTHORS.*,MANUAL.*,NEWS.*}
91 %attr(755,root,root) %{_bindir}/ccache
92 %{_mandir}/man1/ccache.1*
93
94 %files wrapper
95 %defattr(644,root,root,755)
96 /etc/profile.d/%{name}.sh
97 %dir %{pkglibexecdir}
98 %attr(755,root,root) %{pkglibexecdir}/c++
99 %attr(755,root,root) %{pkglibexecdir}/cc
100 %attr(755,root,root) %{pkglibexecdir}/g++
101 %attr(755,root,root) %{pkglibexecdir}/gcc
102 %attr(755,root,root) %{pkglibexecdir}/*-g++
103 %attr(755,root,root) %{pkglibexecdir}/*-gcc
This page took 0.212248 seconds and 3 git commands to generate.