Move ccache-swig to sub-package

This commit is contained in:
Jitka Plesnikova 2016-01-15 09:09:22 +01:00
parent 06752d82de
commit 69cee1a617
3 changed files with 37 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: 7%{?dist}
Release: 8%{?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
@ -96,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-8
%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
@ -192,25 +207,32 @@ 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*
%license LICENSE LICENSE-GPL LICENSE-UNIVERSITIES
%doc ANNOUNCE CHANGES CHANGES.current
%doc 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
%license LICENSE LICENSE-GPL LICENSE-UNIVERSITIES
%doc Doc Examples COPYRIGHT
%changelog
* Thu Jan 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 3.0.7-8
- Move ccache-swig to sub-package
* Wed Oct 21 2015 David Sommerseth <davids@redhat.com> - 3.0.7-7
- Ignore locally installed ccache when running CCache unit tests
- Resolves: bz#1274031