]> git.pld-linux.org Git - packages/ccache.git/blame - ccache.spec
up to 4.4.2
[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
20fc851e
JP
9Version: 4.4.2
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
20fc851e 14# Source0-md5: a38921ab61002b245b9f08235c04009c
a25c6b71 15URL: https://ccache.dev/
5574722c 16BuildRequires: asciidoc
20fc851e
JP
17BuildRequires: cmake >= 3.10
18%{?with_redis:BuildRequires: hiredis-devel >= 0.13.3}
e96bf52c
JP
19%ifarch %{arm}
20BuildRequires: libatomic-devel
21%endif
20fc851e 22BuildRequires: libstdc++-devel >= 6:5
a25c6b71 23BuildRequires: rpmbuild(macros) >= 1.605
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 \
0435ed4f 79 -DUSE_FASTER_LINKER=OFF
8b92ebec 80
a25c6b71 81%{__make} -C build
8b92ebec 82
83%install
84rm -rf $RPM_BUILD_ROOT
7cb1815a 85install -d $RPM_BUILD_ROOT/etc/env.d
86
a25c6b71
JP
87%{__make} -C build install \
88 DESTDIR=$RPM_BUILD_ROOT
8b92ebec 89
e613e5c8 90install -d $RPM_BUILD_ROOT{%{_bindir},%{pkglibexecdir},/etc/profile.d}
1903a893
ER
91%ifarch x32
92target=x86_64-%{_target_vendor}-%{_target_os}-gnux32
93%else
94target=%{_target_cpu}-%{_target_vendor}-%{_target_os}
95%endif
96for cc in cc c++ g++ gcc $target-gcc $target-g++; do
e613e5c8 97 ln -s ../../bin/%{name} $RPM_BUILD_ROOT%{pkglibexecdir}/$cc
d8626a6e 98done
e613e5c8 99echo 'export PATH=%{pkglibexecdir}:$PATH' > \
d8626a6e
ER
100 $RPM_BUILD_ROOT/etc/profile.d/%{name}.sh
101
8b92ebec 102%clean
e6282d7e 103rm -rf $RPM_BUILD_ROOT
8b92ebec 104
105%files
106%defattr(644,root,root,755)
e613e5c8 107%doc LICENSE.* README.md doc/{AUTHORS.*,MANUAL.*,NEWS.*}
8b92ebec 108%attr(755,root,root) %{_bindir}/ccache
e613e5c8 109%{_mandir}/man1/ccache.1*
d8626a6e
ER
110
111%files wrapper
112%defattr(644,root,root,755)
e613e5c8
JB
113/etc/profile.d/%{name}.sh
114%dir %{pkglibexecdir}
115%attr(755,root,root) %{pkglibexecdir}/c++
116%attr(755,root,root) %{pkglibexecdir}/cc
117%attr(755,root,root) %{pkglibexecdir}/g++
118%attr(755,root,root) %{pkglibexecdir}/gcc
1903a893
ER
119%attr(755,root,root) %{pkglibexecdir}/*-g++
120%attr(755,root,root) %{pkglibexecdir}/*-gcc
This page took 0.112628 seconds and 4 git commands to generate.