]> git.pld-linux.org Git - packages/ccache.git/blame - ccache.spec
fix wrapper paths for x32
[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
4a4d6859 5Version: 3.6
1903a893 6Release: 2
e613e5c8 7License: GPL v3+
8b92ebec 8Group: Development/Tools
812382e9 9Source0: https://www.samba.org/ftp/ccache/%{name}-%{version}.tar.xz
4a4d6859 10# Source0-md5: 6a202aeeeea417272f3d6ed66026533b
4321e8e2 11URL: http://ccache.samba.org/
b69824c3 12BuildRequires: automake
a92c8e6f
JB
13BuildRequires: tar >= 1:1.22
14BuildRequires: xz
ba18ad01 15BuildRequires: zlib-devel >= 1.2.3
e613e5c8 16Requires: zlib >= 1.2.3
ba51398f 17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
fb6cdf11 18
e613e5c8 19%define pkglibexecdir %{_libexecdir}/%{name}
d8626a6e 20
8b92ebec 21%description
22ccache is a compiler cache. It acts as a caching pre-processor to
23C/C++ compilers, using the -E compiler switch and a hash to detect
24when a compilation can be satisfied from cache. This often results in
25a 5 to 10 times speedup in common compilations.
26
40d90c5c 27%description -l pl.UTF-8
37ea1f58
JB
28ccache to pamięć podręczna dla kompilatora - działa jako cachujący
29preprocesor dla kompilatorów C/C++, wykorzystujący opcję kompilatora
30-E oraz tablicę haszującą do wykrywania, czy do kompilacji wystarczy
31zawartość pamięci podręcznej. Daje to zazwyczaj przyspieszenie
32kompilacji 5 do 10 razy.
8b92ebec 33
40d90c5c
JR
34%description -l pt_BR.UTF-8
35ccache é um cache para compiladores. Ele funciona mantendo um cache de
36pré-processamento para compiladores C/C++ utilizando-se do parâmetro
37- -E e de um hash para detectar quando uma compilação pode ser
ba51398f 38 reaproveitada de um cache armazenado em disco. O ganho de tempo em
40d90c5c 39 compilações comuns pode chegar a uma escala de até 10 vezes em relação
ba51398f 40 ao tempo normal.
41
d8626a6e
ER
42%package wrapper
43Summary: Symlinks for c++/cc/g++/gcc
b23bd5c7 44Summary(pl.UTF-8): Dowiązania symboliczne do c++/cc/g++/gcc
d8626a6e 45Group: Development/Tools
04b1fe9f 46Requires: %{name} = %{version}-%{release}
d8626a6e
ER
47
48%description wrapper
bfcd2997
JB
49This package contains the softlinks to ccache for each compiler.
50
40d90c5c
JR
51%description wrapper -l pl.UTF-8
52Ten pakiet zawiera dowiązania symboliczne do ccache dla każdego
bfcd2997 53kompilatora.
d8626a6e 54
8b92ebec 55%prep
6a72a66c 56%setup -q
8b92ebec 57
ba18ad01 58# Make sure system zlib is used
e613e5c8 59%{__rm} -r src/zlib
ba18ad01 60
8b92ebec 61%build
b69824c3 62cp -f /usr/share/automake/config.* .
6b963ef4 63CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
84a1d8d0
AG
64%configure \
65 --without-bundled-zlib
8b92ebec 66
ee176c97
JB
67%{__make} \
68 V=1
8b92ebec 69
70%install
71rm -rf $RPM_BUILD_ROOT
7cb1815a 72install -d $RPM_BUILD_ROOT/etc/env.d
73
81dca979 74%{__make} install \
ee176c97
JB
75 DESTDIR=$RPM_BUILD_ROOT \
76 V=1
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.050312 seconds and 4 git commands to generate.