Move ccache-swig to sub-package

This commit is contained in:
Jitka Plesnikova 2016-01-15 12:34:37 +01:00
parent 2d55f6f8c5
commit 5e100425f4
3 changed files with 38 additions and 7 deletions

4
ccache-swig.csh Normal file
View File

@ -0,0 +1,4 @@
# Use ccache-swig by default. Users who don't want that can setenv the
# CCACHE_DISABLE environment variable in their personal profile.
alias swig 'ccache-swig swig'

4
ccache-swig.sh Normal file
View File

@ -0,0 +1,4 @@
# Use ccache-swig by default. Users who don't want that can set the
# CCACHE_DISABLE environment variable in their personal profile.
alias swig='ccache-swig swig'

View File

@ -33,12 +33,14 @@
Summary: Connects C/C++/Objective C to some high-level programming languages
Name: swig
Version: 3.0.7
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv3+ and BSD
URL: http://swig.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz
# Define the part of man page sections
Source1: description.h2m
Source2: ccache-swig.sh
Source3: ccache-swig.csh
# Ruby patches will be part of SWIG 3.0.8
Patch1: swig307-Fix-Ruby-trackings-code-to-use-C-hash.patch
@ -48,6 +50,7 @@ Patch4: swig-ccache-conflict-fix.patch
BuildRequires: perl, python2-devel, pcre-devel
BuildRequires: autoconf, automake, gawk, dos2unix
BuildRequires: gcc-c++
BuildRequires: help2man
BuildRequires: perl-devel
BuildRequires: perl(base)
@ -95,6 +98,19 @@ Eiffel and Guile. SWIG is normally used to create high-level
interpreted programming environments, systems integration, and as a
tool for building user interfaces
%package -n ccache-swig
Summary: Fast compiler cache
License: GPLv2+
Group: Development/Tools
Requires: ccache
Requires: swig
Conflicts: swig < 3.0.7-5
%description -n ccache-swig
ccache-swig is a compiler cache. It speeds up re-compilation of C/C++/SWIG
code by caching previous compiles and detecting when the same compile is
being done again. ccache-swig is ccache plus support for SWIG.
%package doc
Summary: Documentation files for SWIG
License: BSD
@ -191,23 +207,30 @@ help2man -N --section 1 ./h2m_helper --include %{SOURCE1} -o %{name}.1
mkdir -p %{buildroot}%{_mandir}/man1/
install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/
# Enable ccache-swig by default, if ccache is installed.
mkdir -p %{buildroot}%{_libdir}/ccache
ln -fs ../../bin/ccache-swig %{buildroot}%{_libdir}/ccache/swig
# Enable ccache-swig by default
mkdir -p %{buildroot}%{_sysconfdir}/profile.d/
install -dm 755 %{buildroot}%{_sysconfdir}/profile.d
install -pm 644 %{SOURCE2} %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d
%files
%{_bindir}/*
%{_bindir}/swig
%{_datadir}/swig
%{_libdir}/ccache
%{_mandir}/man1/ccache-swig.1*
%{_mandir}/man1/swig.1*
%doc ANNOUNCE CHANGES CHANGES.current LICENSE LICENSE-GPL
%doc LICENSE-UNIVERSITIES COPYRIGHT README TODO
%files -n ccache-swig
%{_bindir}/ccache-swig
%config(noreplace) %{_sysconfdir}/profile.d/ccache-swig.*sh
%{_mandir}/man1/ccache-swig.1*
%files doc
%doc Doc Examples LICENSE LICENSE-GPL LICENSE-UNIVERSITIES COPYRIGHT
%changelog
* Fri Jan 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 3.0.7-5
- Move ccache-swig to sub-package
* Wed Oct 21 2015 David Sommerseth <davids@redhat.com> - 3.0.7-4
- Ignore locally installed ccache when running CCache unit tests
- Resolves: bz#1274031