2006-02-05 Ralf Corsepius <ralf.corsepius@rtems.org>

* binutils/binutils.add: Dynamically create brp-*.
	Misc. update.
This commit is contained in:
Ralf Corsepius
2006-02-05 06:52:25 +00:00
parent 6952f3d948
commit 7c1303a064
2 changed files with 35 additions and 20 deletions

View File

@@ -1,5 +1,9 @@
2005-12-29 Ralf Corsepius <ralf.corsepius@rtems.org> 2006-02-05 Ralf Corsepius <ralf.corsepius@rtems.org>
* binutils/binutils.add: Dynamically create brp-*.
Misc. update.
2005-12-29 Ralf Corsepius <ralf.corsepius@rtems.org>
* gdb/gdb.add, rtems/rtems.add, rtemsdoc/rtemsdoc.add: * gdb/gdb.add, rtems/rtems.add, rtemsdoc/rtemsdoc.add:
Add BuildRoot. Add BuildRoot.

View File

@@ -21,11 +21,6 @@ BuildRequires: flex
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
@@ -48,13 +43,30 @@ Source99: brp-rtems-compress.in
%prep %prep
%setup -c -T -n %{name}-%{version} -a0 %setup -c -T -n %{name}-%{version} -a0
sed 's,@BRPSTRIPPATH@,.%_bindir .%_prefix/%binutils_target/bin,' \ %if "%{_prefix}" != "/usr"
%SOURCE98 > brp-rtems-strip # Extract %%__os_install_post into os_install_post~
chmod +x brp-rtems-strip cat << \EOF >> os_install_post~
%__os_install_post
EOF
sed 's,@BRPCOMPRESSPATH@,.%_mandir/man* .%_infodir,' \ # Generate customized brp-*scripts
%SOURCE99 > brp-rtems-compress cat os_install_post~ | while read a x y; do
chmod +x brp-rtems-compress case $a in
%if "%{_prefix}" != "/usr"
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,./%{_prefix},' < $a > $b
chmod a+x $b
;;
%endif
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%endif
cd binutils-%{version} cd binutils-%{version}
%{?PATCH0:%patch0 -p1} %{?PATCH0:%patch0 -p1}
@@ -100,10 +112,10 @@ cd ..
install-info install-info
%endif %endif
# A bug in binutils: binutils does not install share/locale %if "%{_prefix}" == "/usr"
# however it uses it # Conflict with a native binutils' infos
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale rm -rf $RPM_BUILD_ROOT%{_infodir}
%else
%if "%{binutils_version}" < "2.9.5" %if "%{binutils_version}" < "2.9.5"
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info* rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
%endif %endif
@@ -111,9 +123,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
%if "%{_prefix}" == "/usr" # binutils does not install share/locale, however it uses it
# Conflict with a native binutils' infos mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
rm -rf $RPM_BUILD_ROOT%{_infodir}
%endif %endif
# We don't ship host files # We don't ship host files