LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cross-substitute.spec of Package cross-substitute (Project Ports:ARM:Base:build:cross)

#
# spec file for package binutils (Version 2.19.51)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#





###################
#BuildRequires:  libgcc44 gcc44-c++ gcc44-locale
#%#(rpm -q --provides libgcc44 | grep -v libgcc44 | while read i ; do echo "Provides:  $i" ; done)
#%#(rpm -q --provides gcc44-c++ | grep -v gcc44-c++ | while read i ; do echo "Provides:  $i" ; done)
#%#(rpm -q --provides gcc44-locale | grep -v gcc44-locale | while read i ; do echo "Provides:  $i" ; done)

%define libgcc_s 1

Name:           cross-substitute
Version:        0.0.4
Release:        1
ExclusiveArch:  %arm
License:        GNU Free Documentation License, Version 1.1 (GFDL 1.1); GNU Free Documentation License, Version 1.2 (GFDL 1.2); GPL v2 or later; GPL v3 or later; LGPL v2.0 or later; LGPL v2.1 or later; LGPL v3 or later
Group:          Development/Tools/Building
AutoReqProv:    off
Summary:        Cross substitute package
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
BuildRequires:  rpm perl perl-base gcc44 gcc44-c++ cpp44 -perl-x86bin -perl-base-x86bin 
Requires:       %{name}-gcc44
#Requires:       %{name}-perl
#Requires:       %{name}-perl-base

%description
Dependency-dummy for arm

%package gcc44
Summary:        The GNU C Compiler
BuildRequires:  gcc44 gcc44-c++ cpp44
BuildRequires:  -cross-%{_target_cpu}-gcc44-obs-i586
Group:          Development/Languages/C and C++
AutoReqProv:    off
# prov
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' cpp44 | sed -e 's/=.$//' | while read i; do echo "Provides: $i" ; done)}
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' gcc44 | sed -e 's/=.$//' | while read i; do echo "Provides: $i" ; done)}
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' gcc44-c++ | sed -e 's/=.$//' | while read i; do echo "Provides: $i" ; done)}
# req
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} \n]' cpp44 | grep -v gcc44 | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} \n]' gcc44 | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} \n]' gcc44-c++| grep -v gcc44 | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}

Obsoletes:      cpp44
Obsoletes:      gcc44
Obsoletes:      gcc44-c++
Requires:       libgcc%{libgcc_s}
Requires:       libstdc++44-devel
Requires:       libstdc++44
Requires:       libgomp1
Requires:       cross-%{_target_cpu}-gcc44-obs-i586

%description gcc44
This package contains the GNU Compiler Collection.


%package perl
Summary:        perl substitute

BuildRequires:  perl
Requires:       perl
Requires:       perl-x86bin
Obsoletes:      perl
Obsoletes:      cross-substitute-perl-x86bin-obsolete
Group:          Development/Languages/C and C++
AutoReqProv:    off
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' perl | sed -e 's/=.$//' | while read i; do echo "Provides: $i" ; done)}
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} = %{REQUIREVERSION}\n]' perl | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}

%description perl
This package contains the substitute for perl

%package perl-x86bin-obsolete
Summary:        perl-x86 resubstitute
Requires:       glibc
Obsoletes:      perl-x86bin
Group:          Development/Languages/C and C++
AutoReqProv:    off

%description perl-x86bin-obsolete
This package contains the substitute for perl

%package perl-base
Summary:        perl-base substitute
BuildRequires:  perl-base
Requires:       perl-base
Requires:       perl-base-x86bin
Obsoletes:      perl-base
Obsoletes:      cross-substitute-perl-base-x86bin-obsolete
Group:          Development/Languages/C and C++
AutoReqProv:    off
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' perl-base | sed -e 's/=.$//' | while read i; do echo "Provides: $i" ; done)}
%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} = %{REQUIREVERSION}\n]' perl-base | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}

%description perl-base
This package contains the substitute for perl-base

%package perl-base-x86bin-obsolete
Summary:        perl-x86 resubstitute
Requires:       glibc
Obsoletes:      perl-base-x86bin
Group:          Development/Languages/C and C++
AutoReqProv:    off

%description perl-base-x86bin-obsolete
This package contains the substitute for perl-base


%prep

%build

%install
mkdir -p %buildroot/usr/share/cross-substitute/
#gcc
echo "%{version}" > %buildroot/usr/share/cross-substitute/gcc44
echo "%{version}" > %buildroot/usr/share/cross-substitute/gcc44-pullin
# provides
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' gcc44 | sed -e 's/=.$//' | while read i; do echo "Provides:  $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/gcc44-prov
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' gcc44-c++| sed -e 's/=.$//' | while read i; do echo "Provides:  $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/gcc44-prov
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' cpp44| sed -e 's/=.$//' | while read i; do echo "Provides:  $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/gcc44-prov
# requires
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} \n]' cpp44 | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/gcc44-req
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} \n]' gcc44 | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/gcc44-req
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} \n]' gcc44-c++| sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/gcc44-req

#perl
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' perl | sed -e 's/=.$//' | while read i; do echo "Provides: $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/perl-prov
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} = %{REQUIREVERSION}\n]' perl | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/perl-req

#perl-base
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{PROVIDES} = %{PROVIDEVERSION}\n]' perl-base | sed -e 's/=.$//' | while read i; do echo "Provides: $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/perl-base-prov
echo "%{expand:%( export IFS=$'\n' ; rpm -q --qf '[%{REQUIRES} = %{REQUIREVERSION}\n]' perl-base | sed -e 's/=.$//' | while read i; do echo "Requires: $i" ; done)}" | tee -a %buildroot/usr/share/cross-substitute/perl-base-req

#perl-x86-obsolete
echo "%{version}" > %buildroot/usr/share/cross-substitute/perl-x86-obsolete

#perl-base-x86-obsolete
echo "%{version}" > %buildroot/usr/share/cross-substitute/perl-base-x86-obsolete

#general
echo "%{version}" > %buildroot/usr/share/cross-substitute/base
chmod a+rx %buildroot/usr/share/cross-substitute/base


%clean
rm -rf $RPM_BUILD_ROOT

%post


%files
%defattr(-,root,root)
/usr/share/cross-substitute
/usr/share/cross-substitute/base

%files gcc44
%defattr(-,root,root)
/usr/share/cross-substitute/gcc44
/usr/share/cross-substitute/gcc44-req
/usr/share/cross-substitute/gcc44-prov

%files perl
%defattr(-,root,root)
/usr/share/cross-substitute/perl-req
/usr/share/cross-substitute/perl-prov


%files perl-x86bin-obsolete
%defattr(-,root,root)
/usr/share/cross-substitute/perl-x86-obsolete

%files perl-base
%defattr(-,root,root)
/usr/share/cross-substitute/perl-base-req
/usr/share/cross-substitute/perl-base-prov

%files perl-base-x86bin-obsolete
%defattr(-,root,root)
/usr/share/cross-substitute/perl-base-x86-obsolete