]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - ccache/ccache.nm
kernel: Update to 5.3.7
[ipfire-3.x.git] / ccache / ccache.nm
index 8c25d7c52a51be582259daeed35e95ca99734d7f..6edc79767a7c9a51a913461bbb429800d0a30900 100644 (file)
@@ -4,11 +4,11 @@
 ###############################################################################
 
 name       = ccache
-version    = 3.1.6
+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.
 
@@ -19,7 +19,7 @@ description
        a 5 to 10 times speedup in common compilations.
 end
 
-source_dl  = http://samba.org/ftp/ccache/
+source_dl  = https://github.com/ccache/ccache/releases/download/v%{version}/
 sources    = %{thisapp}.tar.xz
 
 # Sets ccache max size up to 2 GB
@@ -27,18 +27,20 @@ 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
@@ -48,14 +50,14 @@ build
        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}