rpms/ntl/devel multilib_template.h,NONE,1.1 ntl.spec,1.9,1.10

Rex Dieter (rdieter) fedora-extras-commits at redhat.com
Thu Apr 3 14:34:47 UTC 2008


Author: rdieter

Update of /cvs/pkgs/rpms/ntl/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1158

Modified Files:
	ntl.spec 
Added Files:
	multilib_template.h 
Log Message:
* Thu Apr 03 2008 Rex Dieter <rdieter at fedoraproject.org> 5.4.2-2
- multiarch conflicts (#342711)



--- NEW FILE multilib_template.h ---
/* This file is here to prevent a file conflict on multiarch systems.  A
 * conflict will occur because apr.h has arch-specific definitions.
 *
 * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */

#if defined(__x86_64__)
#include "@@INCLUDE@@-x86_64.h"
#elif defined(__i386__)
#include "@@INCLUDE@@-i386.h"
#elif defined(__powerpc64__)
#include "@@INCLUDE@@-ppc64.h"
#elif defined(__powerpc__)
#include "@@INCLUDE@@-ppc.h"
#elif defined(__s390x__)
#include "@@INCLUDE@@-s390x.h"
#elif defined(__s390__)
#include "@@INCLUDE@@-s390.h"
#elif defined(__sparc64__)
#include "@@INCLUDE@@-sparc64.h"
#elif defined(__sparc__)
#include "@@INCLUDE@@-sparc.h"
#else
#error "This @@PACKAGENAME@@ package does not work your architecture?"
#endif


Index: ntl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ntl/devel/ntl.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ntl.spec	13 Mar 2008 02:18:13 -0000	1.9
+++ ntl.spec	3 Apr 2008 14:34:04 -0000	1.10
@@ -1,15 +1,19 @@
 
+%define multilib_arches i386 x86_64 ppc ppc64 s390 s390x sparc sparc64
+
 Summary: High-performance algorithms for vectors, matrices, and polynomials 
 Name:    ntl 
 Version: 5.4.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv2+
 URL:     http://shoup.net/ntl/ 
-Source:	 http://shoup.net/ntl/ntl-%{version}.tar.gz
+Source0: http://shoup.net/ntl/ntl-%{version}.tar.gz
 Group:   System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+Source1: multilib_template.h
+
 BuildRequires: gmp-devel
 
 # includes no debuginfo'able bits, disable
@@ -85,20 +89,33 @@
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 make -C src install \
-  PREFIX=$RPM_BUILD_ROOT%{_prefix} \
-  DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
-  INCLUDEDIR=$RPM_BUILD_ROOT%{_includedir} \
-  LIBDIR=$RPM_BUILD_ROOT%{_libdir} 
+  PREFIX=%{buildroot}%{_prefix} \
+  DOCDIR=%{buildroot}%{_docdir} \
+  INCLUDEDIR=%{buildroot}%{_includedir} \
+  LIBDIR=%{buildroot}%{_libdir} 
 
 # Unpackaged files
-rm -rf $RPM_BUILD_ROOT%{_docdir}/NTL
+rm -rf %{buildroot}%{_docdir}/NTL
+
+%ifarch %{multilib_arches}
+# hack to allow parallel installation of multilib factory-devel
+for header in NTL/config NTL/gmp_aux NTL/mach_desc  ; do
+mv  %{buildroot}%{_includedir}/${header}.h \
+    %{buildroot}%{_includedir}/${header}-%{_arch}.h
+install -p -m644 %{SOURCE1} %{buildroot}%{_includedir}/${header}.h
+sed -i \
+  -e "s|@@INCLUDE@@|${header}|" \
+  -e "s|@@PACKAGENAME@@|%{name}-devel|" \
+  %{buildroot}%{_includedir}/${header}.h
+done
+%endif
 
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 
 %files devel 
@@ -110,6 +127,9 @@
 
 
 %changelog
+* Thu Apr 03 2008 Rex Dieter <rdieter at fedoraproject.org> 5.4.2-2
+- multiarch conflicts (#342711)
+
 * Tue Mar 11 2008 Rex Dieter <rdieter at fedoraproject.org> 5.4.2-1
 - ntl-5.4.2
 




More information about the fedora-extras-commits mailing list