Sisyphus repositório
Última atualização: 30 janeiro 2023 | SRPMs: 18151 | Visitas: 26596091
en ru br
ALT Linux repositórios
S:1.4.27-alt1
5.0: 1.4.14-alt1
4.1: 1.4.11-alt1
4.0: 1.4.10-alt2
3.0: 1.4.6-alt1

Group :: Desenvolvimento/C
RPM: gcc-common

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Name: gcc-common
Version: 1.4.6
Release: alt1

Summary: Common directories, symlinks and selection utility for the GNU Compiler Collection
License: GPL
Group: Development/C
Packager: GCC Development Team <gcc at packages.altlinux.org>

Source0: select-gcc.in
Source1: gccbug.in
Source2: gcc_wrapper.c
Source3: classpath.security
Source4: libgcj.security
Source5: logging.properties

Patch: gccbug-alt.patch

PreReq: alternatives >= 0:0.2.0-alt0.12, coreutils
Requires: rpm >= 0:4.0.4-alt1

Conflicts: cpp2.95 < 1:2.95.3-alt2
Conflicts: cpp2.96 < 0:2.96-alt3, libgcj2.96 < 0:2.96-alt4
Conflicts: cpp3.2 < 0:3.2.1-alt1
Conflicts: cpp < 0:2.96-alt3, cpp = 0:2.96-ipl15mdk, cpp = 0:2.96-ipl16mdk
Conflicts: color-gcc < 0.3-alt2, colorgcc
Conflicts: kaffe < 1.0.6-alt2

%define _libexecdir /usr/libexec

# Compiler weights

%define weight_34 50
%define weight_33 40
%define weight_32 30
%define weight_296 20
%define weight_295 10

%package -n gcc-c++-common
Summary: Common symlinks for the GNU C++ Compiler
License: GPL
Group: Development/C++
PreReq: %name = %version-%release

%package -n gcc-g77-common
Summary: Common symlinks for the GNU Fortran 77 Compiler
License: GPL
Group: Development/Other
PreReq: %name = %version-%release

%package -n gcc-treelang-common
Summary: Common symlinks for the GNU Treelang Compiler
License: GPL
Group: Development/Other
PreReq: %name = %version-%release

%package -n gcc-java-common
Summary: Common symlinks for the GNU Java Compiler
License: GPL
Group: Development/Java
PreReq: %name = %version-%release

%package -n libgcj-common
Summary: Common files for the GNU Java runtime libraries
License: GPL
Group: Development/Java
PreReq: %name = %version-%release
Conflicts: libgcj < 0:3.3.3-alt6

%description
This package contains common symlinks, directories and selection
utility for the GNU Compiler Collection.

%description -n gcc-c++-common
This package contains common symlinks for the GNU C++ Compiler.

%description -n gcc-g77-common
This package contains common symlinks for the GNU Fortran 77 Compiler.

%description -n gcc-treelang-common
This package contains common symlinks for the GNU Treelang Compiler.

%description -n gcc-java-common
This package contains common symlinks for the GNU Java Compiler.

%description -n libgcj-common
This package contains common files for the GNU Java runtime libraries.

%prep
%setup -cT
%__install -p -m755 %SOURCE0 select-gcc
%__install -p -m755 %SOURCE1 gccbug
%__install -p -m755 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5 .

%patch -p1

%build
gcc $RPM_OPT_FLAGS -Werror -D_GNU_SOURCE '-DBINDIR="%_bindir"' \
'-DTARGET="%_target_platform"' gcc_wrapper.c -o gcc_wrapper
%__subst -p 's| at TARGET at |%_target_platform|g' select-gcc gccbug

%install
%__mkdir_p $RPM_BUILD_ROOT{/lib,%_libdir/gcc{,-lib}/%_target_platform,%_libexecdir/gcc/%_target_platform,%_libdir/security,%_bindir,%_sbindir,%_includedir/c++}
%__install -p -m755 select-gcc $RPM_BUILD_ROOT%_sbindir/
%__install -p -m755 gcc_wrapper $RPM_BUILD_ROOT%_bindir/
%__install -p -m755 gccbug $RPM_BUILD_ROOT%_bindir/%_target_platform-gccbug
%__install -p -m644 logging.properties $RPM_BUILD_ROOT%_libdir/
%__install -p -m644 {classpath,libgcj}.security $RPM_BUILD_ROOT%_libdir/security/

%__ln_s ..%_bindir/cpp $RPM_BUILD_ROOT/lib/cpp
%__ln_s gcc $RPM_BUILD_ROOT%_bindir/cc
%__ln_s g++ $RPM_BUILD_ROOT%_bindir/c++
%__ln_s g77 $RPM_BUILD_ROOT%_bindir/f77
%__ln_s %_target_platform-gcc $RPM_BUILD_ROOT%_bindir/%_target_platform-cc
%__ln_s %_target_platform-g++ $RPM_BUILD_ROOT%_bindir/%_target_platform-c++
%__ln_s %_target_platform-g77 $RPM_BUILD_ROOT%_bindir/%_target_platform-f77
%__ln_s %_target_platform-gccbug $RPM_BUILD_ROOT%_bindir/gccbug

for n in cpp g++ g77 gcj gcjh gcov gij grepjar jcf-dump jv-scan protoize rmiregistry tree1 unprotoize; do
%__ln_s gcc "$RPM_BUILD_ROOT%_bindir/$n"
done

for n in jar rmic; do
%__ln_s gcc "$RPM_BUILD_ROOT%_bindir/gcj-$n"
done

%__mkdir_p $RPM_BUILD_ROOT%_sysconfdir/%name
cat >$RPM_BUILD_ROOT%_sysconfdir/%name/gcc-3.3<<EOF
<option name="weight" type="number">%weight_33</option>
EOF
cat >$RPM_BUILD_ROOT%_sysconfdir/%name/gcc-3.2<<EOF
<option name="weight" type="number">%weight_32</option>
EOF
cat >$RPM_BUILD_ROOT%_sysconfdir/%name/gcc-2.96<<EOF
<option name="weight" type="number">%weight_296</option>
EOF
cat >$RPM_BUILD_ROOT%_sysconfdir/%name/gcc-2.95<<EOF
<option name="weight" type="number">%weight_295</option>
EOF

%__mkdir_p $RPM_BUILD_ROOT%_altdir
cat >$RPM_BUILD_ROOT%_altdir/%name<<EOF
%_bindir/gcc %_bindir/gcc_wrapper 40
EOF

%post
%__rm -f /var/lib/rpm/alternatives/{g++,g77,gcj}

if [ -x /usr/sbin/update-alternatives ]; then
for n in so a; do
for f in %_libdir/gcc-lib/%_target_platform/*/libstdc++.$n; do
[ -f "$f" ] || continue
/usr/sbin/update-alternatives --remove libstdc++.$n "$f" ||:
done
done
fi

%register_alternatives %name -- gcc g++ g77 gcj

%triggerpostun -- cpp, cpp2.95 < 1:2.95.3-alt2, cpp2.96 < 0:2.96-alt3, cpp3.2 < 0:3.2.1-alt1, gcc, gcc2.95 < 1:2.95.3-alt2, gcc2.96 < 0:2.96-alt3, gcc3.2 < 0:3.2.1-alt1, gcc-c++, gcc2.95-c++ < 1:2.95.3-alt2, gcc2.96-c++ < 0:2.96-alt3, gcc3.2-c++ < 0:3.2.1-alt1, gcc-g77, gcc2.95-g77 < 1:2.95.3-alt2, gcc2.96-g77 < 0:2.96-alt3, gcc3.2-g77 < 0:3.2.1-alt1, gcc-java, libgcj, gcc2.96-java < 0:2.96-alt3, libgcc2.96 < 0:2.96-alt4, gcc3.2-java < 0:3.2.1-alt1, color-gcc < 0.3-alt2, colorgcc
%register_alternatives %name -- gcc g++ g77 gcj
for n in gccbug; do
[ -f "%_bindir/$n" -o ! -f "%_bindir/%_target_platform-$n" ] ||
%__ln_s -f "%_target_platform-$n" "%_bindir/$n"
done
for n in cpp g++ g77 gcj gcjh gcov gij grepjar jcf-dump jv-scan protoize rmiregistry tree1 unprotoize; do
[ -f "%_bindir/$n" -o ! -f "%_bindir/gcc" ] ||
%__ln_s -f gcc "%_bindir/$n"
done
for n in jar rmic; do
[ -f "%_bindir/gcj-$n" -o ! -f "%_bindir/gcc" ] ||
%__ln_s -f gcc "%_bindir/gcj-$n"
done

%preun
%unregister_alternatives %name

%files
%config %_sysconfdir/%name
%config %_altdir/%name
/lib/*
%_libdir/*
%_libexecdir/*
%_bindir/gcc_wrapper
%_bindir/cc
%_bindir/cpp
%_bindir/gccbug
%_bindir/gcov
%_bindir/protoize
%_bindir/unprotoize
%_bindir/%_target_platform-cc
%_bindir/%_target_platform-gccbug
%_sbindir/*

%files -n gcc-c++-common
%_bindir/c++
%_bindir/g++
%_bindir/%_target_platform-c++
%_includedir/c++

%files -n gcc-g77-common
%_bindir/f77
%_bindir/g77
%_bindir/%_target_platform-f77

%files -n gcc-treelang-common
%_bindir/tree1

%files -n gcc-java-common
%_bindir/gcj
%_bindir/gcjh
%_bindir/gcj-jar
%_bindir/gcj-rmic
%_bindir/gij
%_bindir/grepjar
%_bindir/jcf-dump
%_bindir/jv-scan
%_bindir/rmiregistry

%files -n libgcj-common
%_libdir/logging.properties
%_libdir/security

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009