I noticed the dev_allocator rpm doesn't build on x86_64, the problem
isn't noticeable when building from the tar, only with rpmbuild.  The
issue seems to be that rpmbuild expands out %{_libdir} to lib64 on x86_64.

Attached is a small patch for some dev_allocator Makefiles that install
the files where rpm is expecting them.

-matt
diff -ur dev_allocator/classes/Makefile dev_allocator2/classes/Makefile
--- dev_allocator/classes/Makefile	2006-01-31 13:09:06.000000000 -0500
+++ dev_allocator2/classes/Makefile	2006-06-12 21:51:58.000000000 -0400
@@ -2,7 +2,19 @@
 ROOT ?= $(shell pwd)/../root
 export ROOT
 
-LIBDIR = $(ROOT)/usr/lib/devallocation
+# If TARGET is defined then use that as ARCH else get it from uname
+ifndef TARGET
+        ARCH = $(shell uname -i)
+else
+        ARCH = ${TARGET}
+endif
+
+ifeq ($(strip $(ARCH)), x86_64)
+	LIBDIR = $(ROOT)/usr/lib64/devallocation
+else
+	LIBDIR = $(ROOT)/usr/lib/devallocation
+endif
+
 
 LIBMAJORVERSION = 0
 LIBMINORVERSION = 2
diff -ur dev_allocator/lib/Makefile dev_allocator2/lib/Makefile
--- dev_allocator/lib/Makefile	2006-02-13 18:44:38.000000000 -0500
+++ dev_allocator2/lib/Makefile	2006-06-12 21:44:41.000000000 -0400
@@ -2,6 +2,19 @@
 ROOT ?= $(shell pwd)/../root
 export ROOT
 
+# If TARGET is defined then use that as ARCH else get it from uname
+ifndef TARGET
+	ARCH = $(shell uname -i)
+else
+	ARCH = ${TARGET}
+endif
+
+ifeq ($(strip $(ARCH)), x86_64)
+	LIBDIR = ${ROOT}/usr/lib64
+else
+	LIBDIR = ${ROOT}/usr/lib
+endif
+
 # This version number should match the one in the RPM spec file
 # This is the major version number
 LIBMAJORVER = 0
@@ -41,15 +54,14 @@
 	$(CC) $(CFLAGS) -fPIC -c -o $@ $<
 
 install: all
-	mkdir -p ${ROOT}/lib
-	mkdir -p ${ROOT}/usr/lib
+	mkdir -p ${LIBDIR}
 	mkdir -p ${ROOT}/usr/include
 	mkdir -p ${ROOT}/usr/include/selinux
 	mkdir -p ${ROOT}/etc/selinux/mls
-	cp -f $(LIBV) ${ROOT}/usr/lib
-	cp -fd $(LIBM) ${ROOT}/usr/lib
-	cd $(ROOT)/usr/lib && ln -sf $(LIBV) $(TARGET)
-	cp -f $(LIBA) ${ROOT}/usr/lib
+	cp -f $(LIBV) ${LIBDIR}
+	cp -fd $(LIBM) ${LIBDIR}
+	cd ${LIBDIR} && ln -sf $(LIBV) $(TARGET)
+	cp -f $(LIBA) ${LIBDIR}
 	cp -f $(HEADERS) $(ROOT)/usr/include/selinux/
 
 clean: 
--
redhat-lspp mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-lspp

Reply via email to