###############################################################################
name = ccache
-version = 3.1.5
+version = 3.7.1
release = 1
groups = Development/Compilers
-url = http://ccache.samba.org/
+url = https://ccache.dev
license = GPLv2+
summary = C/C++ compiler cache.
a 5 to 10 times speedup in common compilations.
end
-source_dl = http://samba.org/ftp/ccache/
-sources = %{thisapp}.tar.bz2
+source_dl = https://github.com/ccache/ccache/releases/download/v%{version}/
+sources = %{thisapp}.tar.xz
# Sets ccache max size up to 2 GB
CFLAGS += -DDEFAULT_MAXSIZE=2097152
build
requires
+ autoconf
+ automake
perl
zlib-devel
end
- CCACHE_CACHE = /var/cache/ccache
-
- configure_options += \
- --mandir=/usr/share/man
+ CCACHE_CACHE = %{localstatedir}/cache/ccache
prepare_cmds
- # Disable pch test that fails
- sed -e "s/^pch_suite.*/& return 0/" -i test.sh
+ # Do not run test for pre-compiled headers
+ sed -e "/^pch$/d" -i test/run
+
+ # Remove shipped zlib
+ rm -rf zlib
end
test
install_cmds
CCACHE_PLATFORM_TARGET=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g")
- mkdir -pv %{BUILDROOT}/usr/lib/ccache
+ mkdir -pv %{BUILDROOT}%{libdir}/ccache
for i in gcc g++ cc c++; do \
- ln -svf ../../bin/ccache %{BUILDROOT}/usr/lib/ccache/${i}; \
- ln -svf ../../bin/ccache %{BUILDROOT}/usr/lib/ccache/${CCACHE_PLATFORM_TARGET}-${i}; \
+ ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${i}; \
+ ln -svf ../../bin/ccache %{BUILDROOT}%{libdir}/ccache/${CCACHE_PLATFORM_TARGET}-${i}; \
done
mkdir -pv %{BUILDROOT}/etc/profile.d
- sed -e "s|@LIBDIR@|/usr/lib|g" -e "s|@CACHEDIR@|%{CCACHE_CACHE}|g" \
+ sed -e "s|@LIBDIR@|%{libdir}|g" -e "s|@CACHEDIR@|%{CCACHE_CACHE}|g" \
< %{DIR_SOURCE}/ccache.sh > %{BUILDROOT}/etc/profile.d/ccache.sh
mkdir -pv -m770 %{BUILDROOT}/%{CCACHE_CACHE}
packages
package %{name}
+
+ package %{name}-debuginfo
+ template DEBUGINFO
end
end