238319: Sun packages changes
authorchristophe.ravel.bugs%sun.com
Fri, 22 Jul 2005 15:32:39 +0000
changeset 3423 6329fead4be42a58b754330e292052b1ecd23070
parent 3422 3cf16ebfb3a5fdfda9bd255980c95ae0ca316037
child 3425 634d9890f9616343c0c24a3aedf52a5c2c9c4f28
push idunknown
push userunknown
push dateunknown
bugs238319
238319: Sun packages changes Change rpm packaging for RHEL3 i386 and x86_64.
pkg/linux/Makefile.in
--- a/pkg/linux/Makefile.in
+++ b/pkg/linux/Makefile.in
@@ -51,29 +51,35 @@ RELEASE     = 1
 TOPDIR      = /usr/src/redhat
 VERSION     = `grep PR_VERSION $(dist_includedir)/prinit.h \
                   | sed -e 's/"$$//' -e 's/.*"//' -e 's/ .*//'`
 
 SPECFILE    = $(NAME).spec
 
 include $(MOD_DEPTH)/config/autoconf.mk
 
+# Force i386 for non 64 bit build
+ifneq ($(USE_64),1)
+	RPMTARGET = "--target=i386"
+endif
+
 publish:
 	$(MAKE) clean
 	mkdir -p SOURCES SRPMS RPMS BUILD
-	(cd $(MOD_DEPTH)/../../dist/$(RELEASE_OBJDIR_NAME)/lib && tar cphf - .) \
+	(cd $(dist_libdir) && tar cphf - .) \
 	| (mkdir -p opt/sun/private/lib && cd opt/sun/private/lib && tar xvfBp -)
-	(cd $(MOD_DEPTH)/../../dist/$(RELEASE_OBJDIR_NAME)/include && tar cphf - .) \
+	(cd $(dist_includedir) && tar cphf - .) \
 	| (mkdir -p opt/sun/private/include/nspr && cd opt/sun/private/include/nspr && tar xvfBp -)
 	tar czvf SOURCES/$(NAME)-$(VERSION).tar.gz opt
 	echo "%define name $(NAME)" >$(SPECFILE)
 	echo "%define version $(VERSION)" >>$(SPECFILE)
 	echo "%define release $(RELEASE)" >>$(SPECFILE)
 	echo "%define buildroot `pwd`/$(NAME)-root" >>$(SPECFILE)
 	echo "%define _topdir `pwd`" >>$(SPECFILE)
+	echo "%define _unpackaged_files_terminate_build 0" >>$(SPECFILE)
 	cat $(srcdir)/$(NAME).spec >>$(SPECFILE)
-	rpm -ba $(SPECFILE)
+	rpmbuild $(RPMTARGET) -bb $(SPECFILE)
 
 clean:
 	rm -rf $(TOPDIR)/BUILD/$(NAME)
 	rm -rf SOURCES SRPMS RPMS BUILD
 	rm -rf RPMS SRPMS opt
 	rm -f $(NAME)-$(VERSION).tar.gz