packages: crossnacl-gcc/crossnacl-gcc.spec - rework permissions, macros, un...

glen glen at pld-linux.org
Fri Jul 6 15:43:47 CEST 2012


Author: glen                         Date: Fri Jul  6 13:43:47 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rework permissions, macros, unify with other pld crossarch packages

---- Files affected:
packages/crossnacl-gcc:
   crossnacl-gcc.spec (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: packages/crossnacl-gcc/crossnacl-gcc.spec
diff -u packages/crossnacl-gcc/crossnacl-gcc.spec:1.3 packages/crossnacl-gcc/crossnacl-gcc.spec:1.4
--- packages/crossnacl-gcc/crossnacl-gcc.spec:1.3	Fri Jul  6 13:59:07 2012
+++ packages/crossnacl-gcc/crossnacl-gcc.spec	Fri Jul  6 15:43:42 2012
@@ -7,7 +7,7 @@
 Summary:	Various compilers (C, C++) for nacl
 Name:		crossnacl-gcc
 Version:	4.4.3
-Release:	1.git%{gitver}
+Release:	2.git%{gitver}
 # Generated from git
 # git clone http://git.chromium.org/native_client/nacl-gcc.git
 # (Checkout ID taken from chromium-15.0.874.106/native_client/tools/REVISIONS)
@@ -34,7 +34,13 @@
 ExclusiveArch:	%{ix86} %{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		gcc_target_platform	x86_64-nacl
+%define		target		x86_64-nacl
+%define		arch		%{_prefix}/%{target}
+%define		gcc_ver		%{version}
+%define		gcclib		%{_libdir}/gcc/%{target}/%{gcc_ver}
+%define		gccnlib		%{_prefix}/lib/gcc/%{target}/%{gcc_ver}
+
+%define		filterout_cpp	-D_FORTIFY_SOURCE=[0-9]+
 
 %description
 The gcc package contains the GNU Compiler Collection version 4.4.3.
@@ -59,16 +65,17 @@
 %setup -q -n nacl-gcc-%{version}-git%{?gitver}
 
 %build
-rm -rf obj-%{gcc_target_platform}
-mkdir obj-%{gcc_target_platform}
-cd obj-%{gcc_target_platform}
-CC=gcc
-OPT_FLAGS=`echo %{rpmcflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
-OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
+rm -rf obj-%{target}
+install -d obj-%{target}
+cd obj-%{target}
+
+OPT_FLAGS="%{rpmcflags}"
+OPT_FLAGS=$(echo "$OPT_FLAGS" | sed -e 's/-m64//g;s/-m32//g;s/-m31//g')
 %ifarch %{ix86}
-OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'`
+OPT_FLAGS=$(echo "$OPT_FLAGS" | sed -e 's/-march=i.86//g')
 %endif
-OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e 's/[[:blank:]]\+/ /g'`
+OPT_FLAGS=$(echo "$OPT_FLAGS" | sed -e 's/[[:blank:]]\+/ /g')
+
 case "$OPT_FLAGS" in
 *-fasynchronous-unwind-tables*)
 	%{__sed} -i -e 's/-fno-exceptions /-fno-exceptions -fno-asynchronous-unwind-tables/' \
@@ -83,7 +90,9 @@
 	--infodir=%{_infodir} \
 	--libexecdir=%{_libdir} \
 	--enable-checking=release \
-	--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
+	--with-system-zlib \
+	--enable-__cxa_atexit \
+	--disable-libunwind-exceptions \
 	--enable-gnu-unique-object \
 	--disable-decimal-float \
 	--disable-libgomp \
@@ -92,9 +101,9 @@
 	--disable-libstdcxx-pch \
 	--disable-shared \
 	--with-ppl --with-cloog \
-	CC="$CC" \
+	CC="%{__cc}" \
 	CFLAGS="$OPT_FLAGS $GCC_DEFINES" \
-	CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" \
+	CXXFLAGS="$(echo $OPT_FLAGS | sed 's/ -Wall / /g')" \
 	XCFLAGS="$OPT_FLAGS" \
 %if %{with bootstrap}
 	--disable-threads \
@@ -110,7 +119,7 @@
 	--enable-tls \
 	--with-newlib \
 %endif
-	--target=%{gcc_target_platform} \
+	--target=%{target} \
 	--with-host-libstdcxx="-lpwl -lstdc++ -lm" \
 	--disable-ppl-version-check \
 	--disable-libgcj
@@ -125,7 +134,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-cd obj-%{gcc_target_platform}
+cd obj-%{target}
 %{__make} \
 %if %{with bootstrap}
 	install-gcc install-target-libgcc \
@@ -134,11 +143,17 @@
 %endif
 	DESTDIR=$RPM_BUILD_ROOT
 
+# move fixed includes to proper place
+mv $RPM_BUILD_ROOT%{gccnlib}/include-fixed/*.h $RPM_BUILD_ROOT%{gccnlib}/include
+
+%{__rm} -r $RPM_BUILD_ROOT%{gccnlib}/include-fixed
+%{__rm} -r $RPM_BUILD_ROOT%{gccnlib}/install-tools
+
 # Delete supplemental files that would conflict with the core toolchain
 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
-%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man7/
+%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man7
 # I suspect that the core toolchain locale files will work with this reasonably well.
-%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}
 
 # Don't dupe the system libiberty.a
 #%{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a
@@ -149,26 +164,43 @@
 %files
 %defattr(644,root,root,755)
 %doc gcc/README* gcc/COPYING*
-%attr(755,root,root) %{_bindir}/%{gcc_target_platform}-cpp
-%attr(755,root,root) %{_bindir}/%{gcc_target_platform}-gcc
-%attr(755,root,root) %{_bindir}/%{gcc_target_platform}-gcc-%{version}
-%attr(755,root,root) %{_bindir}/%{gcc_target_platform}-gccbug
-%attr(755,root,root) %{_bindir}/%{gcc_target_platform}-gcov
+%attr(755,root,root) %{_bindir}/%{target}-cpp
+%attr(755,root,root) %{_bindir}/%{target}-gcc
+%attr(755,root,root) %{_bindir}/%{target}-gcc-%{gcc_ver}
+%attr(755,root,root) %{_bindir}/%{target}-gccbug
+%attr(755,root,root) %{_bindir}/%{target}-gcov
+
 %dir %{_prefix}/lib/gcc
-%{_prefix}/lib/gcc/%{gcc_target_platform}/
-%{_libexecdir}/gcc/%{gcc_target_platform}/
-%{_mandir}/man1/%{gcc_target_platform}-cpp.*
-%{_mandir}/man1/%{gcc_target_platform}-gcc.*
-%{_mandir}/man1/%{gcc_target_platform}-gcov.*
+%dir %{_prefix}/lib/gcc/%{target}
+%dir %{gccnlib}
+%{gccnlib}/*.a
+%{gccnlib}/*.o
+%{gccnlib}/include
+
+%dir %{gccnlib}/32
+%{gccnlib}/32/*.[oa]
+
+%dir %{_libexecdir}
+%dir %{_libexecdir}/gcc
+%dir %{gcclib}
+%attr(755,root,root) %{gcclib}/cc1
+%attr(755,root,root) %{gcclib}/collect2
+
+%dir %{gcclib}/install-tools
+%attr(755,root,root) %{gcclib}/install-tools/*
+
+%{_mandir}/man1/%{target}-cpp.*
+%{_mandir}/man1/%{target}-gcc.*
+%{_mandir}/man1/%{target}-gcov.*
 
 %if %{without bootstrap}
 %files c++
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/%{gcc_target_platform}-c++
-%attr(755,root,root) %{_bindir}/%{gcc_target_platform}-g++
-%{_prefix}/%{gcc_target_platform}/include/c++
-%{_prefix}/%{gcc_target_platform}/lib*/
-%{_mandir}/man1/%{gcc_target_platform}-g++.*
+%attr(755,root,root) %{_bindir}/%{target}-c++
+%attr(755,root,root) %{_bindir}/%{target}-g++
+%{_prefix}/%{target}/include/c++
+%{_prefix}/%{target}/lib*/
+%{_mandir}/man1/%{target}-g++.*
 %endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -177,6 +209,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2012/07/06 13:43:42  glen
+- rework permissions, macros, unify with other pld crossarch packages
+
 Revision 1.3  2012/07/06 11:59:07  glen
 - c++ to subpackage
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/crossnacl-gcc/crossnacl-gcc.spec?r1=1.3&r2=1.4



More information about the pld-cvs-commit mailing list