]> git.pld-linux.org Git - packages/ccache.git/blame - ccache.spec
BR: asciidoc for docs
[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
8b92ebec 27%description
28ccache is a compiler cache. It acts as a caching pre-processor to
29C/C++ compilers, using the -E compiler switch and a hash to detect
30when a compilation can be satisfied from cache. This often results in
31a 5 to 10 times speedup in common compilations.
32
40d90c5c 33%description -l pl.UTF-8
37ea1f58
JB
34ccache to pamięć podręczna dla kompilatora - działa jako cachujący
35preprocesor dla kompilatorów C/C++, wykorzystujący opcję kompilatora
36-E oraz tablicę haszującą do wykrywania, czy do kompilacji wystarczy
37zawartość pamięci podręcznej. Daje to zazwyczaj przyspieszenie
38kompilacji 5 do 10 razy.
8b92ebec 39
40d90c5c
JR
40%description -l pt_BR.UTF-8
41ccache é um cache para compiladores. Ele funciona mantendo um cache de
42pré-processamento para compiladores C/C++ utilizando-se do parâmetro
43- -E e de um hash para detectar quando uma compilação pode ser
ba51398f 44 reaproveitada de um cache armazenado em disco. O ganho de tempo em
40d90c5c 45 compilações comuns pode chegar a uma escala de até 10 vezes em relação
ba51398f 46 ao tempo normal.
47
d8626a6e
ER
48%package wrapper
49Summary: Symlinks for c++/cc/g++/gcc
b23bd5c7 50Summary(pl.UTF-8): Dowiązania symboliczne do c++/cc/g++/gcc
d8626a6e 51Group: Development/Tools
04b1fe9f 52Requires: %{name} = %{version}-%{release}
d8626a6e
ER
53
54%description wrapper
bfcd2997
JB
55This package contains the softlinks to ccache for each compiler.
56
40d90c5c
JR
57%description wrapper -l pl.UTF-8
58Ten pakiet zawiera dowiązania symboliczne do ccache dla każdego
bfcd2997 59kompilatora.
d8626a6e 60
8b92ebec 61%prep
6a72a66c 62%setup -q
8b92ebec 63
64%build
0435ed4f 65%cmake -B build \
2e4eb2b2 66 -DUSE_CCACHE=OFF \
0435ed4f 67 -DUSE_FASTER_LINKER=OFF
8b92ebec 68
a25c6b71 69%{__make} -C build
8b92ebec 70
71%install
72rm -rf $RPM_BUILD_ROOT
7cb1815a 73install -d $RPM_BUILD_ROOT/etc/env.d
74
a25c6b71
JP
75%{__make} -C build install \
76 DESTDIR=$RPM_BUILD_ROOT
8b92ebec 77
e613e5c8 78install -d $RPM_BUILD_ROOT{%{_bindir},%{pkglibexecdir},/etc/profile.d}
1903a893
ER
79%ifarch x32
80target=x86_64-%{_target_vendor}-%{_target_os}-gnux32
81%else
82target=%{_target_cpu}-%{_target_vendor}-%{_target_os}
83%endif
84for cc in cc c++ g++ gcc $target-gcc $target-g++; do
e613e5c8 85 ln -s ../../bin/%{name} $RPM_BUILD_ROOT%{pkglibexecdir}/$cc
d8626a6e 86done
e613e5c8 87echo 'export PATH=%{pkglibexecdir}:$PATH' > \
d8626a6e
ER
88 $RPM_BUILD_ROOT/etc/profile.d/%{name}.sh
89
8b92ebec 90%clean
e6282d7e 91rm -rf $RPM_BUILD_ROOT
8b92ebec 92
93%files
94%defattr(644,root,root,755)
e613e5c8 95%doc LICENSE.* README.md doc/{AUTHORS.*,MANUAL.*,NEWS.*}
8b92ebec 96%attr(755,root,root) %{_bindir}/ccache
e613e5c8 97%{_mandir}/man1/ccache.1*
d8626a6e
ER
98
99%files wrapper
100%defattr(644,root,root,755)
e613e5c8
JB
101/etc/profile.d/%{name}.sh
102%dir %{pkglibexecdir}
103%attr(755,root,root) %{pkglibexecdir}/c++
104%attr(755,root,root) %{pkglibexecdir}/cc
105%attr(755,root,root) %{pkglibexecdir}/g++
106%attr(755,root,root) %{pkglibexecdir}/gcc
1903a893
ER
107%attr(755,root,root) %{pkglibexecdir}/*-g++
108%attr(755,root,root) %{pkglibexecdir}/*-gcc
This page took 0.087989 seconds and 4 git commands to generate.