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