2007-01-16 00:06:38 +01:00
|
|
|
#
|
2011-02-27 13:40:18 +01:00
|
|
|
# spec file for package ccache
|
2007-01-16 00:06:38 +01:00
|
|
|
#
|
2024-01-18 13:34:03 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2007-01-16 00:06:38 +01:00
|
|
|
#
|
2009-06-17 19:17:34 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-05-02 10:37:18 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:06:38 +01:00
|
|
|
#
|
|
|
|
|
2012-08-11 17:25:03 +02:00
|
|
|
|
2024-01-19 11:25:25 +01:00
|
|
|
# Build with hiredis by default only on TW
|
|
|
|
%if %{?suse_version} > 1600
|
2023-10-30 10:41:44 +01:00
|
|
|
%bcond_without hiredis
|
2024-01-19 11:25:25 +01:00
|
|
|
%else
|
|
|
|
%bcond_with hiredis
|
|
|
|
%endif
|
2009-06-17 19:17:34 +02:00
|
|
|
Name: ccache
|
2024-02-27 12:24:27 +01:00
|
|
|
Version: 4.9.1
|
2012-01-09 08:32:42 +01:00
|
|
|
Release: 0
|
2011-02-24 20:41:55 +01:00
|
|
|
Summary: A Fast C/C++ Compiler Cache
|
2018-03-15 12:16:17 +01:00
|
|
|
License: GPL-3.0-or-later
|
2019-05-02 10:04:49 +02:00
|
|
|
URL: https://ccache.dev/
|
2021-05-12 23:44:55 +02:00
|
|
|
Source0: https://github.com/ccache/ccache/releases/download/v%{version}/ccache-%{version}.tar.xz
|
|
|
|
Source1: https://github.com/ccache/ccache/releases/download/v%{version}/ccache-%{version}.tar.xz.asc
|
2015-02-26 11:54:03 +01:00
|
|
|
Source2: %{name}.keyring
|
2020-11-04 09:12:50 +01:00
|
|
|
BuildRequires: cmake
|
2024-01-19 11:25:25 +01:00
|
|
|
%if %{?suse_version} > 1600
|
|
|
|
BuildRequires: gcc
|
2020-11-04 09:12:50 +01:00
|
|
|
BuildRequires: gcc-c++
|
2024-01-19 11:25:25 +01:00
|
|
|
# SLE requires gcc11 for std::filesystem
|
|
|
|
%else
|
|
|
|
BuildRequires: gcc11
|
|
|
|
BuildRequires: gcc11-c++
|
|
|
|
%endif
|
2023-10-30 10:41:44 +01:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: pkgconfig(libzstd) >= 1.1.2
|
2021-08-25 15:28:16 +02:00
|
|
|
BuildRequires: rubygem(asciidoctor)
|
2016-07-08 20:09:42 +02:00
|
|
|
Provides: distcc:%{_bindir}/ccache
|
2023-10-30 10:41:44 +01:00
|
|
|
%ifnarch %{ix86} %{arm}
|
|
|
|
%endif
|
|
|
|
%if %{with hiredis}
|
|
|
|
BuildRequires: pkgconfig(hiredis) >= 0.13.3
|
|
|
|
%endif
|
2011-02-24 20:41:55 +01:00
|
|
|
|
2007-01-16 00:06:38 +01:00
|
|
|
%description
|
2016-09-11 10:01:53 +02:00
|
|
|
ccache is a compiler cache. It speeds up recompilation by caching the
|
|
|
|
result of previous compilations and detecting when the same compilation is
|
|
|
|
being done again. Supported languages are C, C++, Objective-C and
|
|
|
|
Objective-C++.
|
2007-01-16 00:06:38 +01:00
|
|
|
|
|
|
|
%prep
|
2021-12-20 12:26:22 +01:00
|
|
|
%autosetup -p1
|
2007-01-16 00:06:38 +01:00
|
|
|
|
|
|
|
%build
|
2024-01-19 11:25:25 +01:00
|
|
|
%if %{?suse_version} < 1600
|
|
|
|
export CC=gcc-11 CXX=g++-11
|
|
|
|
%endif
|
2021-08-25 15:09:08 +02:00
|
|
|
%cmake \
|
2023-10-30 10:41:44 +01:00
|
|
|
%if !%{with hiredis}
|
|
|
|
-DREDIS_STORAGE_BACKEND=OFF \
|
|
|
|
%endif
|
|
|
|
%{nil}
|
2020-11-04 09:12:50 +01:00
|
|
|
%cmake_build
|
|
|
|
%make_build doc
|
2007-01-16 00:06:38 +01:00
|
|
|
|
|
|
|
%install
|
2020-11-04 09:12:50 +01:00
|
|
|
%cmake_install
|
|
|
|
|
2015-05-26 10:09:52 +02:00
|
|
|
# create the compat symlinks into /usr/libdir/ccache
|
|
|
|
mkdir -p %{buildroot}/%{_libdir}/%{name}
|
|
|
|
cd %{buildroot}/%{_libdir}/%{name}
|
|
|
|
ln -sf ../../bin/%{name} gcc
|
|
|
|
ln -sf ../../bin/%{name} g++
|
2016-09-11 10:01:53 +02:00
|
|
|
ln -sf ../../bin/%{name} gcc-objc
|
2016-09-11 09:53:03 +02:00
|
|
|
ln -sf ../../bin/%{name} gfortran
|
2016-08-26 16:23:03 +02:00
|
|
|
# do the same for clang
|
|
|
|
ln -sf ../../bin/%{name} clang
|
|
|
|
ln -sf ../../bin/%{name} clang++
|
|
|
|
# and regular cc
|
|
|
|
ln -sf ../../bin/%{name} cc
|
|
|
|
ln -sf ../../bin/%{name} c++
|
2020-06-07 12:07:29 +02:00
|
|
|
# and for nvidia cuda
|
|
|
|
ln -sf ../../bin/%{name} nvcc
|
2015-05-26 10:09:52 +02:00
|
|
|
|
2021-04-06 10:38:46 +02:00
|
|
|
%check
|
2022-11-18 11:16:38 +01:00
|
|
|
# running the test with multiple threads will make tests fail
|
2023-10-30 10:41:44 +01:00
|
|
|
%{__ctest} --output-on-failure --force-new-ctest-process -j1
|
2018-07-11 10:41:55 +02:00
|
|
|
|
2007-01-16 00:06:38 +01:00
|
|
|
%files
|
2018-03-15 12:16:17 +01:00
|
|
|
%license LICENSE.* GPL-3.0.txt
|
2018-04-17 15:49:43 +02:00
|
|
|
%doc doc/AUTHORS.* doc/MANUAL.* doc/NEWS.* README.*
|
2015-02-26 11:54:03 +01:00
|
|
|
%{_bindir}/%{name}
|
2015-05-26 10:09:52 +02:00
|
|
|
%{_libdir}/%{name}
|
2018-03-15 12:16:17 +01:00
|
|
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
2007-01-16 00:06:38 +01:00
|
|
|
|
2009-06-17 19:17:34 +02:00
|
|
|
%changelog
|