Accepting request 143414 from devel:gcc

- Rework gcc-info.
  * Install symlinks to the versioned info files and adjust
    install_info calls.  [bnc#756182]
  * Provide uninstall hook that removes the alias entries.

- remove gcc-ada subpackage for those architectures that
  don't have a gccXX-ada package

OBS-URL: https://build.opensuse.org/request/show/143414
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gcc?expand=0&rev=41
This commit is contained in:
Stephan Kulow 2012-11-29 08:23:57 +00:00 committed by Git OBS Bridge
commit cdacc4248a
2 changed files with 56 additions and 14 deletions

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Wed Nov 28 14:03:29 UTC 2012 - rguenther@suse.com
- Rework gcc-info.
* Install symlinks to the versioned info files and adjust
install_info calls. [bnc#756182]
* Provide uninstall hook that removes the alias entries.
-------------------------------------------------------------------
Thu Oct 4 18:21:01 UTC 2012 - dmueller@suse.com
- remove gcc-ada subpackage for those architectures that
don't have a gccXX-ada package
-------------------------------------------------------------------
Wed Apr 18 11:26:15 UTC 2012 - rguenther@suse.com

View File

@ -25,6 +25,15 @@ Name: gcc
%ifarch x86_64 s390x ppc64
%define separate_bi32 1
%endif
# Ada currently fails to build on a few platforms, enable it only
# on those that work
# Note that AdaCore only supports %ix86, x86_64 and ia64
%ifarch %ix86 x86_64 ppc s390 ia64
%define build_ada 1
%else
# alpha ppc64 s390x hppa arm
%define build_ada 0
%endif
Url: http://gcc.gnu.org/
%define gcc_version 47
%define gcc_suffix 4.7
@ -97,21 +106,28 @@ Summary: The system GNU Compiler documentation
License: GFDL-1.2
Group: Development/Languages/C and C++
PreReq: %{install_info_prereq}
Requires: gcc%{gcc_version}-info
PreReq: gcc%{gcc_version}-info
%description -n gcc-info
The system GNU Compiler documentation.
# There is intentionally no postun with install_info_delete as there
# is no way to just remove the aliased entries. The content owners
# install_info_delete will also remove the aliases though.
# install-info does not pick up descriptions from the content.
# install / update the entries
%post -n gcc-info
%install_info --info-dir=%{_infodir} --name=cpp --description=\\"The GNU C preprocessor.\\" %{_infodir}/cpp-%{gcc_suffix}.info.gz
%install_info --info-dir=%{_infodir} --name=gcc --description=\\"The GNU Compiler Collection.\\" %{_infodir}/gcc-%{gcc_suffix}.info.gz
%install_info --info-dir=%{_infodir} --name=g++ --description=\\"The GNU C++ compiler.\\" %{_infodir}/g++-%{gcc_suffix}.info.gz
%install_info --info-dir=%{_infodir} --name=gcj --description=\\"Ahead-of-time compiler for the Java language\\" %{_infodir}/gcj-%{gcc_suffix}.info.gz
%install_info --info-dir=%{_infodir} --name=gfortran --description=\\"The GNU Fortran compiler.\\" %{_infodir}/gfortran-%{gcc_suffix}.info.gz
%install_info --info-dir=%{_infodir} --name=cpp --description='The GNU C preprocessor.' %{_infodir}/cpp.info.gz
%install_info --info-dir=%{_infodir} --name=gcc --description='The GNU Compiler Collection.' %{_infodir}/gcc.info.gz
%install_info --info-dir=%{_infodir} --name=g++ --description='The GNU C++ compiler.' %{_infodir}/g++.info.gz
%install_info --info-dir=%{_infodir} --name=gcj --description='Ahead-of-time compiler for the Java language' %{_infodir}/gcj.info.gz
%install_info --info-dir=%{_infodir} --name=gfortran --description='The GNU Fortran compiler.' %{_infodir}/gfortran.info.gz
# if we uninstall, clean the entries
%preun -n gcc-info
if [ "$1" -eq "0" ] ; then
%install_info --delete --info-dir=%{_infodir} --name=cpp %{_infodir}/cpp.info.gz
%install_info --delete --info-dir=%{_infodir} --name=gcc %{_infodir}/gcc.info.gz
%install_info --delete --info-dir=%{_infodir} --name=g++ %{_infodir}/g++.info.gz
%install_info --delete --info-dir=%{_infodir} --name=gcj %{_infodir}/gcj.info.gz
%install_info --delete --info-dir=%{_infodir} --name=gfortran %{_infodir}/gfortran.info.gz
fi
%package -n gcc-c++
Summary: The system GNU C++ Compiler
@ -302,7 +318,7 @@ Requires: gcc-objc = %{version}
The system GNU Objective C++ Compiler.
%if %{build_ada}
%package -n gcc-ada
Summary: The system GNU Ada Compiler
License: GPL-3.0+
@ -312,7 +328,7 @@ Requires: gcc%{gcc_version}-ada
%description -n gcc-ada
The system GNU Ada Compiler.
%endif
%package -n gcc-z9
Summary: The system GNU C Compiler
@ -333,6 +349,7 @@ echo "This is a dummy package to provide a dependency on the system compiler." >
mkdir -p $RPM_BUILD_ROOT/lib
mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT%{_infodir}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/doc/packages/gcc-objc/
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/doc/packages/gcc-obj-c++/
# Link all the binaries
@ -354,8 +371,10 @@ for program in \
gij64 \
%endif
gfortran \
%if %{build_ada}
gnat gnatbind gnatbl gnatchop gnatclean gnatfind gnatkr \
gnatlink gnatls gnatmake gnatname gnatprep gnatxref gprmake \
%endif
; do
ln -sf $program-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/$program
done
@ -373,6 +392,10 @@ for man1 in \
; do
ln -sf $man1-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/$man1.1.gz
done
# Link info pages
for info in cpp gcc g++ gcj gfortran ; do
ln -sf $info-%{gcc_suffix}.info.gz $RPM_BUILD_ROOT%{_infodir}/$info.info.gz
done
# Provide the traditional /lib/cpp that only handles C
cp $RPM_SOURCE_DIR/cpp $RPM_BUILD_ROOT/lib/
chmod 755 $RPM_BUILD_ROOT/lib/cpp
@ -479,9 +502,13 @@ EOF
%files -n gcc-info
%defattr(-,root,root)
# empty - only for the dependency
%doc README
%{_infodir}/cpp.info.gz
%{_infodir}/gcc.info.gz
%{_infodir}/g++.info.gz
%{_infodir}/gcj.info.gz
%{_infodir}/gfortran.info.gz
%if %{build_ada}
%files -n gcc-ada
%defattr(-,root,root)
%{_prefix}/bin/gnat
@ -498,6 +525,7 @@ EOF
%{_prefix}/bin/gnatprep
%{_prefix}/bin/gnatxref
%{_prefix}/bin/gprmake
%endif
%files -n libstdc++-devel
%defattr(-,root,root)