]> git.pld-linux.org Git - packages/ccache.git/blob - ccache.spec
1971ce28b6b565944648f923d6a38fe32035dbed
[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_CCACHE=OFF \
63         -DUSE_FASTER_LINKER=OFF
64
65 %{__make} -C build
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT/etc/env.d
70
71 %{__make} -C build install \
72         DESTDIR=$RPM_BUILD_ROOT
73
74 install -d $RPM_BUILD_ROOT{%{_bindir},%{pkglibexecdir},/etc/profile.d}
75 %ifarch x32
76 target=x86_64-%{_target_vendor}-%{_target_os}-gnux32
77 %else
78 target=%{_target_cpu}-%{_target_vendor}-%{_target_os}
79 %endif
80 for cc in cc c++ g++ gcc $target-gcc $target-g++; do
81         ln -s ../../bin/%{name} $RPM_BUILD_ROOT%{pkglibexecdir}/$cc
82 done
83 echo 'export PATH=%{pkglibexecdir}:$PATH' > \
84         $RPM_BUILD_ROOT/etc/profile.d/%{name}.sh
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(644,root,root,755)
91 %doc LICENSE.* README.md doc/{AUTHORS.*,MANUAL.*,NEWS.*}
92 %attr(755,root,root) %{_bindir}/ccache
93 %{_mandir}/man1/ccache.1*
94
95 %files wrapper
96 %defattr(644,root,root,755)
97 /etc/profile.d/%{name}.sh
98 %dir %{pkglibexecdir}
99 %attr(755,root,root) %{pkglibexecdir}/c++
100 %attr(755,root,root) %{pkglibexecdir}/cc
101 %attr(755,root,root) %{pkglibexecdir}/g++
102 %attr(755,root,root) %{pkglibexecdir}/gcc
103 %attr(755,root,root) %{pkglibexecdir}/*-g++
104 %attr(755,root,root) %{pkglibexecdir}/*-gcc
This page took 0.079333 seconds and 3 git commands to generate.