[packages/crossnacl-newlib] - pl, use arch*dir macros

qboosh qboosh at pld-linux.org
Sun Jul 29 18:54:39 CEST 2018


commit 7d91d6efddedfaf0b253610b1ea9385d232f091f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jul 29 18:56:40 2018 +0200

    - pl, use arch*dir macros

 crossnacl-newlib.spec | 68 +++++++++++++++++++++++++++++++++++----------------
 1 file changed, 47 insertions(+), 21 deletions(-)
---
diff --git a/crossnacl-newlib.spec b/crossnacl-newlib.spec
index 0d9747f..85238ed 100644
--- a/crossnacl-newlib.spec
+++ b/crossnacl-newlib.spec
@@ -1,6 +1,7 @@
-%define		rel		1
+%define		rel	1
 %define		gitver	07af971
-Summary:	C library intended for use on embedded systems
+Summary:	C library intended for use on embedded systems - NaCl version
+Summary(pl.UTF-8):	Biblioteka C przeznaczona dla systemów wbudowanych - wersja dla NaCl
 Name:		crossnacl-newlib
 Version:	2.0.0
 Release:	0.git%{gitver}.%{rel}
@@ -24,6 +25,11 @@ ExclusiveArch:	%{ix86} %{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		target		x86_64-nacl
+%define		archprefix	%{_prefix}/%{target}
+%define		archincludedir	%{archprefix}/include
+%define		archlibdir	%{archprefix}/lib
+%define		archlib32dir	%{archprefix}/lib32
+%define		archlib64dir	%{archprefix}/lib64
 
 %description
 Newlib is a C library intended for use on embedded systems. It is a
@@ -32,6 +38,13 @@ licenses that make them easily usable on embedded products.
 
 This is the NaCl fork.
 
+%description -l pl.UTF-8
+Newlib to biblioteka C przeznaczona dla systemów wbudowanych. Jest
+połączeniem kilku części biblioteki, wszystkich na wolnych licencjach
+pozwalających na łatwe użycie w produktach wbudowanych.
+
+Ten pakiet zawiera odgałęzienie dla platformy NaCl.
+
 %prep
 %setup -q -n nacl-newlib-%{version}-git%{?gitver}
 tar -xvf %{SOURCE1} -C newlib/libc/sys/nacl --strip-components=1
@@ -42,23 +55,24 @@ cp -p %{SOURCE2} .
 %build
 export NEWLIB_CFLAGS="-O2 -D_I386MACH_ALLOW_HW_INTERRUPTS -DSIGNAL_PROVIDED -mtls-use-call"
 %configure \
+	CFLAGS="-O2" \
+	CFLAGS_FOR_TARGET="$NEWLIB_CFLAGS" \
+	CXXFLAGS_FOR_TARGET="$NEWLIB_CFLAGS" \
+	MAKEINFO=/bin/false \
+	libc_cv_initfinit_array=yes \
 	--disable-libgloss \
 	--enable-newlib-iconv \
 	--enable-newlib-io-long-long \
 	--enable-newlib-io-long-double \
 	--enable-newlib-io-c99-formats \
 	--enable-newlib-mb \
-	libc_cv_initfinit_array=yes \
-	CFLAGS="-O2" \
-	CFLAGS_FOR_TARGET="$NEWLIB_CFLAGS" \
-	CXXFLAGS_FOR_TARGET="$NEWLIB_CFLAGS" \
-	MAKEINFO=/bin/false \
 	--target=%{target}
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
@@ -66,22 +80,23 @@ rm -rf $RPM_BUILD_ROOT
 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
 
 # The default pthread.h doesn't work right?
-%{__rm} $RPM_BUILD_ROOT%{_prefix}/%{target}/include/pthread.h
-cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_prefix}/%{target}/include
+%{__rm} $RPM_BUILD_ROOT%{archincludedir}/pthread.h
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{archincludedir}
 
 # We have to hack up libc.a to get things working.
 # 32bit
-mv $RPM_BUILD_ROOT%{_prefix}/%{target}/lib/32/libc.a $RPM_BUILD_ROOT%{_prefix}/%{target}/lib/32/libcrt_common.a
-sed "s/@OBJFORMAT@/elf32-nacl/" newlib-libc-script > $RPM_BUILD_ROOT%{_prefix}/%{target}/lib/32/libc.a
+%{__mv} $RPM_BUILD_ROOT%{archlibdir}/32/libc.a $RPM_BUILD_ROOT%{archlibdir}/32/libcrt_common.a
+sed "s/@OBJFORMAT@/elf32-nacl/" newlib-libc-script > $RPM_BUILD_ROOT%{archlibdir}/32/libc.a
 
 # 64bit (default)
-mv $RPM_BUILD_ROOT%{_prefix}/%{target}/lib/libc.a $RPM_BUILD_ROOT%{_prefix}/%{target}/lib/libcrt_common.a
-sed "s/@OBJFORMAT@/elf64-nacl/" newlib-libc-script > $RPM_BUILD_ROOT%{_prefix}/%{target}/lib/libc.a
+%{__mv} $RPM_BUILD_ROOT%{archlibdir}/libc.a $RPM_BUILD_ROOT%{archlibdir}/libcrt_common.a
+sed "s/@OBJFORMAT@/elf64-nacl/" newlib-libc-script > $RPM_BUILD_ROOT%{archlibdir}/libc.a
 
 # move to match -m32 -lm search path gcc uses: /usr/x86_64-nacl/lib32/libm.a
-install -d $RPM_BUILD_ROOT%{_prefix}/%{target}/lib32
-mv $RPM_BUILD_ROOT%{_prefix}/%{target}/{lib/32/*,lib32}
-rmdir $RPM_BUILD_ROOT%{_prefix}/%{target}/lib/32
+install -d $RPM_BUILD_ROOT%{archlib32dir}
+%{__mv} $RPM_BUILD_ROOT%{archlibdir}/32/* $RPM_BUILD_ROOT%{archlib32dir}
+rmdir $RPM_BUILD_ROOT%{archlibdir}/32
+# move -m64 objects to %{archlib64dir}?
 
 # fix copies to be hardlinks (maybe should symlink in the future)
 findup -m $RPM_BUILD_ROOT
@@ -92,8 +107,19 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %{_datadir}/iconv_data
-%{_prefix}/%{target}/include
-%{_prefix}/%{target}/lib
-%dir %{_prefix}/%{target}/lib32
-%{_prefix}/%{target}/lib32/lib*.a
-%{_prefix}/%{target}/lib32/crt*.o
+%dir %{archincludedir}
+%{archincludedir}/*.h
+%{archincludedir}/bits
+%{archincludedir}/machine
+%{archincludedir}/sys
+%dir %{archlibdir}
+%{archlibdir}/libc.a
+%{archlibdir}/libcrt_common.a
+%{archlibdir}/libg.a
+%{archlibdir}/libm.a
+%{archlibdir}/crt0.o
+%{archlib32dir}/libc.a
+%{archlib32dir}/libcrt_common.a
+%{archlib32dir}/libg.a
+%{archlib32dir}/libm.a
+%{archlib32dir}/crt0.o
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossnacl-newlib.git/commitdiff/7d91d6efddedfaf0b253610b1ea9385d232f091f



More information about the pld-cvs-commit mailing list