[cross-gcc] Macroise name prefix
David Howells
dhowells at fedoraproject.org
Mon Aug 12 15:01:53 UTC 2013
commit 34ff4076bb337fe739781fea59b663c09adf186f
Author: David Howells <dhowells at redhat.com>
Date: Wed Jun 5 17:06:07 2013 +0100
Macroise name prefix
Macroise the RPM and program name prefixes to make it more similar to the RHEL
cross-compiler specfile.
cross-gcc.spec | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
---
diff --git a/cross-gcc.spec b/cross-gcc.spec
index 8fc9264..4826aea 100644
--- a/cross-gcc.spec
+++ b/cross-gcc.spec
@@ -1,3 +1,5 @@
+%define cross cross
+%define rpmprefix %{nil}
%define build_all 1
%define build_alpha %{build_all}
@@ -59,7 +61,7 @@
%global gcc_release 2.aa.%{DATE}svn
Summary: Cross C compiler
-Name: cross-gcc
+Name: %{cross}-gcc
Version: %{gcc_version}
Release: %{gcc_release}%{?dist}.2
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -99,7 +101,7 @@ Patch102: cross-gcc-sh-libgcc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: binutils >= 2.20.51.0.2-12
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
-BuildRequires: cross-binutils-common >= 2.23
+BuildRequires: %{cross}-binutils-common >= 2.23
# Make sure pthread.h doesn't contain __thread tokens
# Make sure glibc supports stack protector
@@ -117,12 +119,12 @@ Provides: bundled(libiberty)
%description
Cross-build GNU C compiler collection.
-%package -n cross-gcc-common
+%package -n %{cross}-gcc-common
Summary: Cross-build GNU C compiler documentation and translation files
Group: Development/Languages
BuildArch: noarch
-%description -n cross-gcc-common
+%description -n %{cross}-gcc-common
Documentation, manual pages and translation files for cross-build GNU C
compiler.
@@ -133,13 +135,13 @@ number of packages.
%define do_package() \
%if %2 \
-%package -n gcc-%1 \
+%package -n %{rpmprefix}gcc-%1 \
Summary: Cross-build binary utilities for %1 \
Group: Development/Tools \
-Requires: cross-gcc-common == %{version}-%{release} \
-BuildRequires: binutils-%1 >= 2.23 \
-Requires: binutils-%1 >= 2.23 \
-%description -n gcc-%1 \
+Requires: %{cross}-gcc-common == %{version}-%{release} \
+BuildRequires: %{rpmprefix}binutils-%1 >= 2.23 \
+Requires: %{rpmprefix}binutils-%1 >= 2.23 \
+%description -n %{rpmprefix}gcc-%1 \
Cross-build GNU C compiler. \
\
Only building kernels is currently supported. Support for cross-building \
@@ -488,7 +490,7 @@ cd stuff
--infodir=%{_infodir} \
--build=%{_target_platform} \
--host=%{_target_platform} \
- --program-prefix=cross- \
+ --program-prefix=%{cross}- \
--enable-languages=c --without-headers \
--enable-sjlj-exceptions --with-system-libunwind \
--disable-nls --disable-threads --disable-shared \
@@ -550,10 +552,10 @@ find %{buildroot}%{_datadir} -name gcc.mo |
while read x
do
y=`dirname $x`
- mv $x $y/cross-gcc.mo
+ mv $x $y/%{cross}-gcc.mo
done
-%find_lang cross-gcc
+%find_lang %{cross}-gcc
gzip %{buildroot}%{_mandir}/man1/*.1
rm %{buildroot}%{_mandir}/man7/*.7
@@ -562,9 +564,9 @@ rmdir %{buildroot}%{_mandir}/man7
# All the installed manual pages and translation files for each program are the
# same, so symlink them to the common package
cd %{buildroot}%{_mandir}/man1
-for i in cross-cpp.1.gz cross-gcc.1.gz cross-gcov.1.gz
+for i in %{cross}-cpp.1.gz %{cross}-gcc.1.gz %{cross}-gcov.1.gz
do
- j=${i#cross-}
+ j=${i#%{cross}-}
for k in *-$j
do
@@ -638,14 +640,14 @@ rm -rf %{buildroot}
# Filesets
#
###############################################################################
-%files -n cross-gcc-common -f cross-gcc.lang
+%files -n %{cross}-gcc-common -f %{cross}-gcc.lang
%doc %{srcdir}/COPYING*
%doc %{srcdir}/README
-%{_mandir}/man1/cross-*
+%{_mandir}/man1/%{cross}-*
%define do_files() \
%if %2 \
-%files -n gcc-%1 -f files.%1 \
+%files -n %{rpmprefix}gcc-%1 -f files.%1 \
%endif
%do_files alpha-linux-gnu %{build_alpha}
@@ -687,6 +689,7 @@ rm -rf %{buildroot}
* Wed Jun 5 2013 David Howells <dhowells at redhat.com> - 4.7.2-2.aa.20121114svn.2
- Use CONFIG_FLAGS and ditch COPT to avoid confusion.
- Backport cleanups from the RHEL-6.4 cross-compiler.
+- Backport some macroisation from the RHEL-6.4 cross-compiler.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.7.2-2.aa.20121114svn.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list