]> git.pld-linux.org Git - packages/ccache.git/blobdiff - ccache.spec
use ccache for building ccache only if instructed explicitly
[packages/ccache.git] / ccache.spec
index d3219b320aed1b9e372c97ee7b7323b05f5576fa..1971ce28b6b565944648f923d6a38fe32035dbed 100644 (file)
@@ -1,19 +1,24 @@
 Summary:       Compiler cache
-Summary(pl.UTF-8):     Przyspieszacz kompilowania
+Summary(pl.UTF-8):     Pamięć podręczna dla kompilatora
 Summary(pt_BR.UTF-8):  Cache para compiladores C/C++
 Name:          ccache
-Version:       3.1.6
-Release:       1
-License:       GPL v3
+Version:       4.2.1
+Release:       2
+License:       GPL v3+
 Group:         Development/Tools
-Source0:       http://samba.org/ftp/ccache/%{name}-%{version}.tar.bz2
-# Source0-md5: 343dc9b642e1d2af1e6bd8e474dde92e
-Patch0:                %{name}-nohash_size_mtime.patch
-URL:           http://ccache.samba.org/
-BuildRequires: automake
+Source0:       https://github.com/ccache/ccache/releases/download/v%{version}/%{name}-%{version}.tar.xz
+# Source0-md5: 0f95a4b491a4dcd904c8235ee7c660cd
+URL:           https://ccache.dev/
+BuildRequires: cmake >= 3.4.3
+BuildRequires: libstdc++-devel >= 6:4.8.1
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+BuildRequires: zstd-devel >= 1.1.2
+Requires:      zstd >= 1.1.2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _libdir         %{_prefix}/%{_lib}/%{name}
+%define                pkglibexecdir   %{_libexecdir}/%{name}
 
 %description
 ccache is a compiler cache. It acts as a caching pre-processor to
@@ -22,10 +27,11 @@ when a compilation can be satisfied from cache. This often results in
 a 5 to 10 times speedup in common compilations.
 
 %description -l pl.UTF-8
-ccache działa jako cachujący preprocesor dla kompilatorów C/C++. Przy
-użyciu opcji kompilatora -E oraz tablicy haszującej do wykrywania, czy
-do kompilacji wystarczy zawartość cache. Daje to zazwyczaj
-przyspieszenie kompilacji 5 do 10 razy.
+ccache to pamięć podręczna dla kompilatora - działa jako cachujący
+preprocesor dla kompilatorów C/C++, wykorzystujący opcję kompilatora
+-E oraz tablicę haszującą do wykrywania, czy do kompilacji wystarczy
+zawartość pamięci podręcznej. Daje to zazwyczaj przyspieszenie
+kompilacji 5 do 10 razy.
 
 %description -l pt_BR.UTF-8
 ccache é um cache para compiladores. Ele funciona mantendo um cache de
@@ -50,35 +56,31 @@ kompilatora.
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
-cp -f /usr/share/automake/config.* .
-%configure
+%cmake -B build \
+       -DUSE_CCACHE=OFF \
+       -DUSE_FASTER_LINKER=OFF
 
-%{__make}
+%{__make} -C build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 install -d $RPM_BUILD_ROOT/etc/env.d
 
-%{__make} install \
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-for X in CCACHE_DIR CCACHE_TEMPDIR CCACHE_LOGFILE CCACHE_PATH CCACHE_CC CCACHE_PREFIX \
-       CCACHE_DISABLE CCACHE_READONLY CCACHE_CPP2 CCACHE_NOSTATS CCACHE_NLEVELS \
-       CCACHE_HARDLINK CCACHE_RECACHE CCACHE_UMASK CCACHE_HASHDIR CCACHE_UNIFY \
-       CCACHE_EXTENSION CCACHE_NOHASH_SIZE_MTIME
-do
-       echo "#${X}=\"\"" > $RPM_BUILD_ROOT/etc/env.d/${X}
-done
-
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},/etc/profile.d}
-for cc in cc c++ g++ gcc %{_target_cpu}-pld-linux-gcc %{_target_cpu}-pld-linux-g++; do
-       ln -s ../../bin/%{name} $RPM_BUILD_ROOT%{_libdir}/$cc
+install -d $RPM_BUILD_ROOT{%{_bindir},%{pkglibexecdir},/etc/profile.d}
+%ifarch x32
+target=x86_64-%{_target_vendor}-%{_target_os}-gnux32
+%else
+target=%{_target_cpu}-%{_target_vendor}-%{_target_os}
+%endif
+for cc in cc c++ g++ gcc $target-gcc $target-g++; do
+       ln -s ../../bin/%{name} $RPM_BUILD_ROOT%{pkglibexecdir}/$cc
 done
-echo 'export PATH=%{_libdir}:$PATH' > \
+echo 'export PATH=%{pkglibexecdir}:$PATH' > \
        $RPM_BUILD_ROOT/etc/profile.d/%{name}.sh
 
 %clean
@@ -86,13 +88,17 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS.txt MANUAL.txt NEWS.txt README.txt
+%doc LICENSE.* README.md doc/{AUTHORS.*,MANUAL.*,NEWS.*}
 %attr(755,root,root) %{_bindir}/ccache
-%{_mandir}/man1/ccache*
-%config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/*
+%{_mandir}/man1/ccache.1*
 
 %files wrapper
 %defattr(644,root,root,755)
-%attr(755,root,root) /etc/profile.d/%{name}.sh
-%dir %{_libdir}
-%attr(755,root,root) %{_libdir}/*
+/etc/profile.d/%{name}.sh
+%dir %{pkglibexecdir}
+%attr(755,root,root) %{pkglibexecdir}/c++
+%attr(755,root,root) %{pkglibexecdir}/cc
+%attr(755,root,root) %{pkglibexecdir}/g++
+%attr(755,root,root) %{pkglibexecdir}/gcc
+%attr(755,root,root) %{pkglibexecdir}/*-g++
+%attr(755,root,root) %{pkglibexecdir}/*-gcc
This page took 0.145597 seconds and 4 git commands to generate.