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