diff -ruN tog-pegasus-2.9.1-5.el6.src.rpm-rpmbuild/SOURCES/pegasus_arch_alternatives tog-pegasus-2.9.1-5.el6.0.src.rpm-rpmbuild/SOURCES/pegasus_arch_alternatives
--- tog-pegasus-2.9.1-5.el6.src.rpm-rpmbuild/SOURCES/pegasus_arch_alternatives	2010-07-15 13:29:38.000000000 +0100
+++ tog-pegasus-2.9.1-5.el6.0.src.rpm-rpmbuild/SOURCES/pegasus_arch_alternatives	2011-11-01 13:50:55.000000000 +0000
@@ -46,7 +46,7 @@
 	# nothing to be done - shipped without binary suffix
 	exit 0;
 	;;
-    i386 | ppc | s390 | sparc )
+    i386 | ppc | s390 | sparc | armv5tel )
 	# shipped with -32 suffix, but no alternatives possible - move:
     	for f in $LINK ${SLAVES[@]} $DEVEL_LINK $TEST_LINK; 
 	do
diff -ruN tog-pegasus-2.9.1-5.el6.src.rpm-rpmbuild/SOURCES/pegasus-arm.patch tog-pegasus-2.9.1-5.el6.0.src.rpm-rpmbuild/SOURCES/pegasus-arm.patch
--- tog-pegasus-2.9.1-5.el6.src.rpm-rpmbuild/SOURCES/pegasus-arm.patch	1970-01-01 01:00:00.000000000 +0100
+++ tog-pegasus-2.9.1-5.el6.0.src.rpm-rpmbuild/SOURCES/pegasus-arm.patch	2011-11-07 00:38:05.000000000 +0000
@@ -0,0 +1,46 @@
+--- pegasus.bak/mak/SDKMakefile	2011-11-06 23:57:50.589530000 +0000
++++ pegasus/mak/SDKMakefile	2011-11-07 00:05:35.115627000 +0000
+@@ -73,7 +73,8 @@
+       LINUX_PPC_GNU \
+       LINUX_X86_64_GNU \
+       LINUX_ZSERIES64_GNU \
+-      LINUX_ZSERIES_GNU
++      LINUX_ZSERIES_GNU \
++      LINUX_XSCALE_GNU
+ endif
+ 
+ ifdef PACKAGED_PLATFORM_FILES
+diff -ruN pegasus.bak/src/SDK/samples/mak/platform_LINUX_XSCALE_GNU.mak pegasus/src/SDK/samples/mak/platform_LINUX_XSCALE_GNU.mak
+--- pegasus.bak/src/SDK/samples/mak/platform_LINUX_XSCALE_GNU.mak	1970-01-01 01:00:00.000000000 +0100
++++ pegasus/src/SDK/samples/mak/platform_LINUX_XSCALE_GNU.mak	2011-11-07 00:37:17.517609000 +0000
+@@ -0,0 +1,30 @@
++#//%LICENSE////////////////////////////////////////////////////////////////
++#//
++#// Licensed to The Open Group (TOG) under one or more contributor license
++#// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
++#// this work for additional information regarding copyright ownership.
++#// Each contributor licenses this file to you under the OpenPegasus Open
++#// Source License; you may not use this file except in compliance with the
++#// License.
++#//
++#// Permission is hereby granted, free of charge, to any person obtaining a
++#// copy of this software and associated documentation files (the "Software"),
++#// to deal in the Software without restriction, including without limitation
++#// the rights to use, copy, modify, merge, publish, distribute, sublicense,
++#// and/or sell copies of the Software, and to permit persons to whom the
++#// Software is furnished to do so, subject to the following conditions:
++#//
++#// The above copyright notice and this permission notice shall be included
++#// in all copies or substantial portions of the Software.
++#//
++#// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++#// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++#// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++#// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++#// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++#// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++#// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#//
++#//////////////////////////////////////////////////////////////////////////
++
++include $(ROOT)/mak/platform_LINUX_GNU.mak
diff -ruN tog-pegasus-2.9.1-5.el6.src.rpm-rpmbuild/SPECS/tog-pegasus.spec tog-pegasus-2.9.1-5.el6.0.src.rpm-rpmbuild/SPECS/tog-pegasus.spec
--- tog-pegasus-2.9.1-5.el6.src.rpm-rpmbuild/SPECS/tog-pegasus.spec	2010-07-15 13:31:02.000000000 +0100
+++ tog-pegasus-2.9.1-5.el6.0.src.rpm-rpmbuild/SPECS/tog-pegasus.spec	2011-11-07 00:08:01.000000000 +0000
@@ -32,7 +32,7 @@
 
 %define multilib        0
 %define bsx             ''
-%ifarch %{ix86} x86_64 ppc ppc64 s390 s390x sparcv9 sparc64
+%ifarch %{ix86} x86_64 ppc ppc64 s390 s390x sparcv9 sparc64 %{arm}
 %define multilib        1
 %define bsx             -32
 %ifarch x86_64 ppc64 s390x sparc64
@@ -41,7 +41,7 @@
 %endif
 
 Version: 		2.9.1
-Release: 		5%{?dist}
+Release: 		5%{?dist}.0
 Epoch:   		2
 #
 Summary:   		OpenPegasus WBEM Services for Linux
@@ -102,6 +102,8 @@
 Patch16:		pegasus-2.9.1-getpagesize.patch
 # 17: Fixes memory leak (backported from upstream accepted patch)
 Patch17:		pegasus-2.9.1-memleak.patch
+# 10001: Fixes devel package header inclusion for ARM
+Patch10001:		pegasus-arm.patch
 #
 Conflicts: 		openwbem
 Provides: 		tog-pegasus-cimserver
@@ -173,6 +175,7 @@
 %patch0 -p1 -b .initscript
 %patch16 -p1 -b .getpagesize
 %patch17 -p1 -b .memleak
+%patch10001 -p1 -b .arm
 find . -name 'CVS' -exec /bin/rm -rf '{}' ';' >/dev/null 2>&1 ||:;
 
 %build
@@ -211,7 +214,11 @@
               %ifarch sparc64
                 export PEGASUS_PLATFORM=LINUX_SPARC64_GNU
               %else
-                export PEGASUS_PLATFORM=LINUX_IX86_GNU
+                %ifarch %{arm}
+                  export PEGASUS_PLATFORM=LINUX_XSCALE_GNU
+                %else
+                  export PEGASUS_PLATFORM=LINUX_IX86_GNU
+                %endif
               %endif
             %endif
           %endif
@@ -274,7 +281,11 @@
               %ifarch sparc64
                 export PEGASUS_PLATFORM=LINUX_SPARC64_GNU
               %else
-                export PEGASUS_PLATFORM=LINUX_IX86_GNU
+                %ifarch %{arm}
+                  export PEGASUS_PLATFORM=LINUX_XSCALE_GNU
+                %else
+                  export PEGASUS_PLATFORM=LINUX_IX86_GNU
+                %endif
               %endif
             %endif
           %endif
@@ -485,6 +496,9 @@
 
 
 %changelog
+* Wed Sep 14 2011 Gordan Bobic <gordan@bobich.net> - 2:2.9.1-5.0
+- Fix ARM build issues
+
 * Thu Jul 15 2010 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.9.1-5
 - Add cimsub to the pegasus_arch_alternatives script
 
