Eliminate @PATCH2@.

This commit is contained in:
Ralf Corsepius
2005-04-12 06:26:03 +00:00
parent 9c3ea183f8
commit 0a80a16223
4 changed files with 5 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}@binutil
%prep %prep
%setup -c -n %{name}-%{version} %setup -c -n %{name}-%{version}
@PATCH2@ %{?PATCH0:%patch0 -p0}
test -d build || mkdir build test -d build || mkdir build
%build %build

View File

@@ -50,7 +50,6 @@ target_alias=$1
if test -n "${binutils_patch_version}"; then if test -n "${binutils_patch_version}"; then
PATCH1="Patch0: binutils-${binutils_version}-rtems-${binutils_patch_version}.diff" PATCH1="Patch0: binutils-${binutils_version}-rtems-${binutils_patch_version}.diff"
PATCH2="%patch0 -p0"
fi fi
sed -e "s%@Release\@%${binutils_rpm_release}%g" \ sed -e "s%@Release\@%${binutils_rpm_release}%g" \
@@ -64,5 +63,4 @@ sed -e "s%@Release\@%${binutils_rpm_release}%g" \
-e "s%@binutils_patch_version\@%${binutils_patch_version}%g" \ -e "s%@binutils_patch_version\@%${binutils_patch_version}%g" \
-e "s%@binutils_suffix\@%${binutils_suffix}%g" \ -e "s%@binutils_suffix\@%${binutils_suffix}%g" \
-e "s,@PATCH1\@,${PATCH1}," \ -e "s,@PATCH1\@,${PATCH1}," \
-e "s,@PATCH2\@,${PATCH2}," \
< ${specsrc} < ${specsrc}

View File

@@ -20,7 +20,7 @@ Patch1: gdb-%{gdb_version}-rtems-cg-@gdb_patch_version@.diff
Patch2: gdb-%{gdb_version}-rtems-rdbg-@gdb_patch_version@.diff Patch2: gdb-%{gdb_version}-rtems-rdbg-@gdb_patch_version@.diff
%else %else
Source0: ftp://ftp.gnu.org/pub/gnu/gdb-%{gdb_version}.tar.bz2 Source0: ftp://ftp.gnu.org/pub/gnu/gdb-%{gdb_version}.tar.bz2
Patch0: gdb-%{gdb_version}-rtems-@gdb_patch_version@.diff @PATCH1@
%endif %endif
%if "%{_vendor}" == "redhat" %if "%{_vendor}" == "redhat"
@@ -61,9 +61,9 @@ This is the GNU gdb for RTEMS targetting %{gdb_version}.
%setup -c -n %{name}-%{version} -a 0 %setup -c -n %{name}-%{version} -a 0
cd gdb-%{gdb_version} cd gdb-%{gdb_version}
%patch0 -p1 %{?PATCH0:%patch0 -p1}
# %patch1 -p1 %{?PATCH1:%patch1 -p1}
# %patch2 -p1 %{?PATCH2:%patch2 -p1}
%build %build
%if "%_sim" == "1" %if "%_sim" == "1"

View File

@@ -52,11 +52,9 @@ patchn=-1
if test -n "${gdb_patch_version}"; then if test -n "${gdb_patch_version}"; then
patchn=`expr $patchn + 1` patchn=`expr $patchn + 1`
PATCH1="Patch${patchn}: gdb-${gdb_version}-rtems-${gdb_patch_version}.diff" PATCH1="Patch${patchn}: gdb-${gdb_version}-rtems-${gdb_patch_version}.diff"
PATCH2="%patch${patchn} -p0"
fi fi
sed -e "s,@PATCH1\@,${PATCH1}," \ sed -e "s,@PATCH1\@,${PATCH1}," \
-e "s,@PATCH2\@,${PATCH2}," \
-e "s%@Release\@%${gdb_rpm_release}%g" \ -e "s%@Release\@%${gdb_rpm_release}%g" \
-e "s,@rpm_build_root\@,${rpm_build_root},g" \ -e "s,@rpm_build_root\@,${rpm_build_root},g" \
-e "s%@prefix\@%@prefix@%g" \ -e "s%@prefix\@%@prefix@%g" \