forked from Imagelibrary/rtems
Reflect using brp-rtems*.
This commit is contained in:
@@ -17,6 +17,11 @@ Version: %{binutils_version}
|
|||||||
Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}@binutils_suffix@
|
Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}@binutils_suffix@
|
||||||
@PATCH1@
|
@PATCH1@
|
||||||
|
|
||||||
|
Source98: brp-rtems-strip.in
|
||||||
|
Source99: brp-rtems-compress.in
|
||||||
|
|
||||||
|
%define __os_install_post ./brp-rtems-compress && ./brp-rtems-strip
|
||||||
|
|
||||||
#
|
#
|
||||||
# The original sources are not included in the source RPM.
|
# The original sources are not included in the source RPM.
|
||||||
# If we included them, then the source RPMs for each target
|
# If we included them, then the source RPMs for each target
|
||||||
@@ -39,6 +44,14 @@ Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}@binutil
|
|||||||
%prep
|
%prep
|
||||||
%setup -c -T -n %{name}-%{version} -a0
|
%setup -c -T -n %{name}-%{version} -a0
|
||||||
|
|
||||||
|
sed 's,@BRPSTRIPPATH@,.%_bindir .%_prefix/%binutils_target/bin,' \
|
||||||
|
%SOURCE98 > brp-rtems-strip
|
||||||
|
chmod +x brp-rtems-strip
|
||||||
|
|
||||||
|
sed 's,@BRPCOMPRESSPATH@,.%_mandir/man* .%_infodir,' \
|
||||||
|
%SOURCE99 > brp-rtems-compress
|
||||||
|
chmod +x brp-rtems-compress
|
||||||
|
|
||||||
cd binutils-%{version}
|
cd binutils-%{version}
|
||||||
%{?PATCH0:%patch0 -p1}
|
%{?PATCH0:%patch0 -p1}
|
||||||
cd ..
|
cd ..
|
||||||
@@ -47,13 +60,7 @@ cd ..
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
cd build
|
cd build
|
||||||
%if "%{binutils_version}" <= "2.16.1"
|
CFLAGS="$RPM_OPT_FLAGS" \
|
||||||
# ar leaks memory - Disable fortify to prevent it from killing ar
|
|
||||||
OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/\-Wp,\-D_FORTIFY_SOURCE=[^ ]*//')
|
|
||||||
%else
|
|
||||||
OPT_FLAGS="$RPM_OPT_FLAGS"
|
|
||||||
%endif
|
|
||||||
CFLAGS="$OPT_FLAGS" \
|
|
||||||
../binutils-%{binutils_version}/configure \
|
../binutils-%{binutils_version}/configure \
|
||||||
--build=%_build --host=%_host \
|
--build=%_build --host=%_host \
|
||||||
--target=%{binutils_target} \
|
--target=%{binutils_target} \
|
||||||
@@ -95,17 +102,8 @@ cd ..
|
|||||||
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||||
touch $RPM_BUILD_ROOT%{_infodir}/dir
|
touch $RPM_BUILD_ROOT%{_infodir}/dir
|
||||||
|
|
||||||
# gzip info files
|
|
||||||
ls $RPM_BUILD_ROOT%{_infodir}/*.info \
|
|
||||||
$RPM_BUILD_ROOT%{_infodir}/*.info-? \
|
|
||||||
$RPM_BUILD_ROOT%{_infodir}/*.info-?? 2>/dev/null \
|
|
||||||
| while read a; do \
|
|
||||||
gzip -9qf $a 2>/dev/null; \
|
|
||||||
done
|
|
||||||
|
|
||||||
# gzip man pages
|
|
||||||
gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/*.? 2>/dev/null
|
|
||||||
|
|
||||||
# We don't ship host files
|
# We don't ship host files
|
||||||
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
|
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|||||||
@@ -18,9 +18,15 @@ Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}@gcc
|
|||||||
Source1: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_version}@newlib_suffix@
|
Source1: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_version}@newlib_suffix@
|
||||||
@PATCH0@
|
@PATCH0@
|
||||||
@PATCH1@
|
@PATCH1@
|
||||||
|
Source98: brp-rtems-strip.in
|
||||||
|
Source99: brp-rtems-compress.in
|
||||||
|
|
||||||
|
%define __os_install_post ./brp-rtems-compress && ./brp-rtems-strip
|
||||||
|
|
||||||
BuildRequires: texinfo >= 4.2
|
BuildRequires: texinfo >= 4.2
|
||||||
BuildRequires: %{rpmprefix}%{gcc_target}-binutils
|
BuildRequires: %{rpmprefix}%{gcc_target}-binutils
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The original sources are not included in the source RPM.
|
# The original sources are not included in the source RPM.
|
||||||
# If we included them, then the source RPMs for each target
|
# If we included them, then the source RPMs for each target
|
||||||
@@ -150,6 +156,14 @@ cd newlib-%{newlib_version}
|
|||||||
%{?PATCH1:%patch1 -p1}
|
%{?PATCH1:%patch1 -p1}
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
sed 's,@BRPSTRIPPATH@,.%_bindir .%_prefix/%gcc_target/bin,' \
|
||||||
|
%SOURCE98 > brp-rtems-strip
|
||||||
|
chmod +x brp-rtems-strip
|
||||||
|
|
||||||
|
sed 's,@BRPCOMPRESSPATH@,.%_mandir/man* .%_infodir,' \
|
||||||
|
%SOURCE99 > brp-rtems-compress
|
||||||
|
chmod +x brp-rtems-compress
|
||||||
|
|
||||||
cd gcc-%{gcc_version}
|
cd gcc-%{gcc_version}
|
||||||
sed -e 's/\(version_string.* = \"[^\"]*\)/\1 (RTEMS gcc-%{gcc_version}-@gcc_patch_version@\/newlib-%{newlib_version}-@newlib_patch_version@-@Release@)/' \
|
sed -e 's/\(version_string.* = \"[^\"]*\)/\1 (RTEMS gcc-%{gcc_version}-@gcc_patch_version@\/newlib-%{newlib_version}-@newlib_patch_version@-@Release@)/' \
|
||||||
gcc/version.c > gcc/version.c~
|
gcc/version.c > gcc/version.c~
|
||||||
@@ -282,17 +296,6 @@ cd ..
|
|||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# gzip info files
|
|
||||||
ls $RPM_BUILD_ROOT%{_infodir}/*.info \
|
|
||||||
$RPM_BUILD_ROOT%{_infodir}/*.info-? \
|
|
||||||
$RPM_BUILD_ROOT%{_infodir}/*.info-?? \
|
|
||||||
| while read a; do \
|
|
||||||
gzip -9qf $a 2>/dev/null; \
|
|
||||||
done
|
|
||||||
|
|
||||||
# gzip man pages
|
|
||||||
gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/*.? 2>/dev/null
|
|
||||||
|
|
||||||
rm -f dirs ;
|
rm -f dirs ;
|
||||||
echo "%defattr(-,root,root)" >> dirs
|
echo "%defattr(-,root,root)" >> dirs
|
||||||
echo "%dir %{_prefix}/lib" >> dirs ;
|
echo "%dir %{_prefix}/lib" >> dirs ;
|
||||||
@@ -368,3 +371,4 @@ cd ..
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|||||||
Reference in New Issue
Block a user