[Ocfs2-tools-commits] manish commits r615 - trunk
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Jan 27 17:54:54 CST 2005
Author: manish
Date: 2005-01-27 17:54:52 -0600 (Thu, 27 Jan 2005)
New Revision: 615
Added:
trunk/rpmarch.guess
Removed:
trunk/toolsarch.guess
Modified:
trunk/Makefile
Log:
Use new rpmarch.guess for architecture when building rpms
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2005-01-27 23:53:41 UTC (rev 614)
+++ trunk/Makefile 2005-01-27 23:54:52 UTC (rev 615)
@@ -18,7 +18,7 @@
CHKCONFIG_DEP = chkconfig
endif
-TOOLSARCH = $(shell $(TOPDIR)/toolsarch.guess $(TOPDIR))
+TOOLSARCH = $(shell $(TOPDIR)/rpmarch.guess tools $(TOPDIR))
ifeq ($(TOOLSARCH),error)
$(error could not detect architecture for tools)
@@ -55,7 +55,7 @@
configure.in \
install-sh \
mkinstalldirs \
- toolsarch.guess
+ rpmarch.guess
.PHONY: dist dist-bye dist-fresh distclean
@@ -76,7 +76,7 @@
$(RPMBUILD) -bs --define "_sourcedir $(RPM_TOPDIR)" --define "_srcrpmdir $(RPM_TOPDIR)" --define "pygtk_name $(PYGTK_NAME)" --define "pyversion $(PYVERSION)" --define "chkconfig_dep $(CHKCONFIG_DEP)" $(TOPDIR)/vendor/common/ocfs2-tools.spec
rpm: srpm
- $(RPMBUILD) --rebuild --define "pygtk_name $(PYGTK_NAME)" --define "pyversion $(PYVERSION)" --define "chkconfig_dep $(CHKCONFIG_DEP)" --target $(TOOLSARCH) "ocfs2-tools-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
+ $(RPMBUILD) --rebuild --define "pygtk_name $(PYGTK_NAME)" --define "pyversion $(PYVERSION)" --define "chkconfig_dep $(CHKCONFIG_DEP)" $(TOOLSARCH) "ocfs2-tools-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
def:
@echo $(TOOLSARCH)
Added: trunk/rpmarch.guess
===================================================================
--- trunk/rpmarch.guess 2005-01-27 23:53:41 UTC (rev 614)
+++ trunk/rpmarch.guess 2005-01-27 23:54:52 UTC (rev 615)
@@ -0,0 +1,69 @@
+#! /bin/sh
+
+mode="$1"
+srcdir="$2"
+
+RPMARCH=
+if test -f /etc/redhat-release ; then
+ QUERYFILE=/etc/redhat-release
+elif test -f /etc/SuSE-release ; then
+ QUERYFILE=/etc/SuSE-release
+elif test -f /etc/UnitedLinux-release ; then
+ QUERYFILE=/etc/UnitedLinux-release
+fi
+
+host_cpu="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`"
+if test -z "$host_cpu" -o "$host_cpu" = "noarch" ; then
+ host_alias=`$srcdir/config.guess`
+ host=`$srcdir/config.sub $host_alias`
+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+fi
+
+case "$host_cpu" in
+ x86_64|ppc|ia64|s390x)
+ TOOLSARCH=""
+ ;;
+ i386|i486|i586|i686|i786|k6|k7)
+ TOOLSARCH="i386"
+ ;;
+ ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ TOOLSARCH="ppc"
+ ;;
+ *)
+ echo "rpmarch.guess: Warning: unknown RPM CPU architecture: $host_cpu" >&2
+ TOOLSARCH=""
+ ;;
+esac
+
+# Only a few of these need to be overwritten from RPM's default
+case "$host_cpu" in
+ i586)
+ MODULEARCH="$host_cpu"
+ ;;
+ i386)
+ MODULEARCH="i686"
+ ;;
+ *)
+ MODULEARCH=""
+ ;;
+esac
+
+case "$mode" in
+ module)
+ if [ -n "$MODULEARCH" ] ; then
+ echo "--target $MODULEARCH"
+ fi
+ ;;
+ tools)
+ if [ -n "$TOOLSARCH" ] ; then
+ echo "--target $TOOLSARCH"
+ fi
+ ;;
+ *)
+ echo "rpmarch.guess: Invalid mode: $mode" >&2
+ echo "error"
+ exit 1
+ ;;
+esac
+
+exit 0
Property changes on: trunk/rpmarch.guess
___________________________________________________________________
Name: svn:executable
+ *
Deleted: trunk/toolsarch.guess
===================================================================
--- trunk/toolsarch.guess 2005-01-27 23:53:41 UTC (rev 614)
+++ trunk/toolsarch.guess 2005-01-27 23:54:52 UTC (rev 615)
@@ -1,33 +0,0 @@
-#! /bin/sh
-
-srcdir=$1
-
-if test -f /etc/redhat-release ; then
- RPMARCH="`rpm -qf /etc/redhat-release --queryformat \"%{ARCH}\"`"
-
- if test -n "$RPMARCH" -a "$RPMARCH" != "noarch" ; then
- echo $RPMARCH
- exit 0
- fi
-fi
-
-host_alias=`$srcdir/config.guess`
-host=`$srcdir/config.sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-
-case "$host_cpu" in
- x86_64|ppc|ia64|s390x)
- echo "$host_cpu"
- ;;
- i386|i486|i586|i686|i786|k6|k7)
- echo "i386"
- ;;
- ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
- echo "ppc"
- ;;
- *)
- echo "error"
- ;;
-esac
-
-exit 0
More information about the Ocfs2-tools-commits
mailing list