File fixsizeforbigendian.diff of Package rpm

--- ./build/pack.c.orig	2014-10-06 13:05:52.801204141 +0000
+++ ./build/pack.c	2014-10-06 13:06:19.815077722 +0000
@@ -290,6 +290,8 @@ static rpmRC generateSignature(char *SHA
     rpmRC rc = RPMRC_OK;
     char *reservedSpace;
     int spaceSize = 0;
+    uint32_t size32 = (uint32_t)size;
+    uint32_t payloadSize32 = (uint32_t)payloadSize;
 
     /* Prepare signature */
     sig = rpmNewSignature();
@@ -322,14 +324,14 @@ static rpmRC generateSignature(char *SHA
     td.tag = payloadtag;
     td.count = 1;
     td.type = typetag;
-    td.data = &payloadSize;
+    td.data = typetag == RPM_INT32_TYPE ? &payloadSize32 : &payloadSize;
     headerPut(sig, &td, HEADERPUT_DEFAULT);
 
     rpmtdReset(&td);
     td.tag = sizetag;
     td.count = 1;
     td.type = typetag;
-    td.data = &size;
+    td.data = typetag == RPM_INT32_TYPE ? &size32 : &size;
     headerPut(sig, &td, HEADERPUT_DEFAULT);
 
     spaceSize = rpmExpandNumeric("%{__gpg_reserved_space}");