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