LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File change_spec_obs of Package orig-gcc44 (Project Ports:ARM:Base:build:cross)

#!/bin/bash

#rm -f cross*.spec cross*final.changes


if [ $# -lt 1 ]; then
	outfile=gcc.spec
else
	case $1 in
	[0-9]*)
	  base_ver=$1
	  outfile=gcc$1.spec
	;;
	*)
	  exit 1
	;;
	esac
fi
base_ver=44



	sed -e 's%@base_ver@%'$base_ver'%g' \
	    gcc.spec.in \
	| sed -n -e '{
/^# PACKAGE-BEGIN/h
/^# PACKAGE-BEGIN/,/^# PACKAGE-END/H
/^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p
/^# PACKAGE-END/{g
s/@variant@//g
p
g
s/@variant@/-32bit/g
p
g
s/@variant@/-64bit/g
p
}
}' > $outfile
if false; then
	echo '%define building_libjava 1' > libgcj$base_ver.spec
	echo '%define run_tests 1' >> libgcj$base_ver.spec
	sed -e '/^# LIBJAVA-DELETE-BEGIN/,/^# LIBJAVA-DELETE-END/d;s/-n libgcj@base_ver@$//g;s/^Name:[[:space:]]*gcc/Name: libgcj/g' \
	    gcc.spec.in \
	| sed -e 's%@base_ver@%'$base_ver'%g' \
	| sed -n -e '{
/^# PACKAGE-BEGIN/h
/^# PACKAGE-BEGIN/,/^# PACKAGE-END/H
/^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p
/^# PACKAGE-END/{g
s/@variant@//g
p
g
s/@variant@/-32bit/g
p
g
s/@variant@/-64bit/g
p
}
}' >> libgcj$base_ver.spec
fi

  test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes libgcj$base_ver.changes

export outfile
# cross bootstrap
# arm mips sh4 i586
  for arch in armv5tel armv7l ; do
    cross_arch=$arch name_suffix="" sh cross-obs.spec.in > cross-$arch-gcc$base_ver-obs.spec
    test -f gcc*.changes && ln -f gcc*.changes cross-$arch-gcc$base_ver-obs.changes
  done


exit 0