]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Merge back some spec file cleanups after investigating a mysterious
authorNathan Scott <nathans@sgi.com>
Wed, 26 Mar 2003 23:18:13 +0000 (23:18 +0000)
committerNathan Scott <nathans@sgi.com>
Wed, 26 Mar 2003 23:18:13 +0000 (23:18 +0000)
build problem for the internal SGI builds.
Merge of xfs-cmds-lbs:slinx:142673a by nathans.

  Fix Makepkgs scripts to be able to propogate make errors back to the caller.

Makepkgs
build/rpm/Makefile
build/rpm/xfsprogs.spec.in

index 8d735d815a7868a15d71fe3d9d79f7528ccdb4b8..e3f9e0caa8e6d3eaa70ef827a64e8e7db7393c34 100755 (executable)
--- a/Makepkgs
+++ b/Makepkgs
@@ -45,7 +45,7 @@ if [ $type = debian ] ; then
        if $verbose ; then
                dpkg-buildpackage -r$SUDO | tee $LOGDEB
        else
-               dpkg-buildpackage -r$SUDO > $LOGDEB
+               dpkg-buildpackage -r$SUDO > $LOGDEB || exit 1
        fi
        exit 0
 fi
@@ -55,12 +55,7 @@ echo "== clean, log is $LOGDIR/clean"
 if $verbose ; then
        $MAKE clean 2>&1 | tee $LOGDIR/clean
 else
-       $MAKE clean > $LOGDIR/clean 2>&1 
-fi
-if [ $? -ne 0 ] ; then
-       echo \"$MAKE clean\" failed, see log in $LOGDIR/clean
-       tail $LOGDIR/clean
-       exit 1
+       $MAKE clean > $LOGDIR/clean 2>&1  || exit 1
 fi
 
 echo
@@ -69,12 +64,7 @@ rm -f .census        # force configure to run here
 if $verbose ; then
        $MAKE configure 2>&1 | tee $LOGDIR/configure
 else
-       $MAKE configure > $LOGDIR/configure 2>&1 
-fi
-if [ $? -ne 0 ] ; then
-       echo \"configure\" failed, see log in $LOGDIR/configure
-       tail $LOGDIR/configure
-       exit 1
+       $MAKE configure > $LOGDIR/configure 2>&1 || exit 1
 fi
 
 echo
@@ -82,12 +72,7 @@ echo "== default, log is $LOGDIR/default"
 if $verbose ; then
        $MAKE default 2>&1 | tee $LOGDIR/default
 else
-       $MAKE default > $LOGDIR/default 2>&1 
-fi
-if [ $? -ne 0 ] ; then
-       echo \"$MAKE default\" failed, see log in $LOGDIR/default
-       tail $LOGDIR/default
-       exit 1
+       $MAKE default > $LOGDIR/default 2>&1 || exit 1
 fi
 
 echo
@@ -96,13 +81,7 @@ echo "== dist, log is $LOGDIR/dist"
 if $verbose ; then
        $MAKE -C build dist 2>&1 | tee $LOGDIR/dist
 else
-       $MAKE -C build dist > $LOGDIR/dist 2>&1
-fi
-if [ $? -ne 0 ] ; then
-       echo $MAKE dist failed, see log in $LOGDIR/dist
-       tail $LOGDIR/dist
-       exit 1
-else
+       $MAKE -C build dist > $LOGDIR/dist 2>&1 || exit 1
        grep '^Wrote:' $LOGDIR/dist | sed -e 's/\.\.\/\.\.\///'
 fi
 
index 57bc4f0dd7c007867242f0ebd5c223b02930b10b..457621581526796a0727b70c9ed30ca8ac988ab5 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of version 2 of the GNU General Public License as
@@ -35,15 +35,15 @@ TREEROOT = $(shell cd ${TOPDIR}; pwd)
 include $(TOPDIR)/include/builddefs
 
 SPECF = $(PKG_NAME).spec
-LDIRT = $(PKG_NAME)*.rpm $(SPECF) rpmmacros rpm-*.rc $(TOPDIR)/files*.rpm
+LDIRT = *.rpm $(SPECF) rpmmacros rpmfiles* rpm-*.rc
 
 LSRCFILES = macros.template $(SPECF).in rpm-2.rc.template
 
-default install install-dev :
+default install install-dev install-lib:
 
 include $(BUILDRULES)
 
-# generate a binary rpm file
+# Generate a binary rpm file
 dist : default $(SPECF) rpm-$(RPM_VERSION).rc
        $(RPMBUILD) -ba --rcfile ./rpm-$(RPM_VERSION).rc $(SPECF)
 
@@ -60,6 +60,25 @@ rpm-2.rc: rpm-2.rc.template
        @sed -e 's|%topdir%|$(TOPDIR)|g' < $< > $@
 endif
 
+# Generate the rpm specfile format file list from the install-sh manifest
+rpmfiles rpmfiles-dev rpmfiles-lib:
+       sort -u $$DIST_MANIFEST | $(AWK) > $@ '\
+$$1 == "d" { printf ("%%%%dir %%%%attr(%s,%s,%s) %s\n", $$2, $$3, $$4, $$5); } \
+$$1 == "f" { if (match ($$6, "$(PKG_MAN_DIR)") || \
+                match ($$6, "$(PKG_DOC_DIR)")) \
+                printf ("%%%%doc "); \
+            if (match ($$6, "$(PKG_MAN_DIR)")) \
+                printf ("%%%%attr(%s,%s,%s) %s*\n", $$2, $$3, $$4, $$6); \
+            else \
+                printf ("%%%%attr(%s,%s,%s) %s\n", $$2, $$3, $$4, $$6); } \
+$$1 == "l" { if (match ($$3, "$(PKG_MAN_DIR)") || \
+                match ($$3, "$(PKG_DOC_DIR)")) \
+                printf ("%%%%doc "); \
+            if (match ($$3, "$(PKG_MAN_DIR)")) \
+                printf ("%%%%attr(0777,root,root) %s*\n", $$3); \
+            else \
+                printf ("%%%%attr(0777,root,root) %s\n", $$3); }'
+
 .PHONY: $(SPECF)
 ${SPECF} : ${SPECF}.in
        sed -e's|@pkg_name@|$(PKG_NAME)|g' \
index 2ff351ac00a476063261f0f3243a317ae5da5260..842321afaf6fb93d657f46f568a4305474afcd59 100644 (file)
@@ -2,6 +2,7 @@ Summary: Utilities for managing the XFS filesystem.
 Name: @pkg_name@
 Version: @pkg_version@
 Release: @pkg_release@
+Distribution: @pkg_distribution@
 Packager: Silicon Graphics, Inc. <http://www.sgi.com/>
 BuildRoot: @build_root@ 
 Provides: xfs-cmds
@@ -61,28 +62,9 @@ DIST_INSTALL=`pwd`/install.manifest
 DIST_INSTALL_DEV=`pwd`/install-dev.manifest
 export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
 @make@ install DIST_MANIFEST="$DIST_INSTALL"
+@make@ -C build/rpm rpmfiles DIST_MANIFEST="$DIST_INSTALL"
 @make@ install-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
-files()
-{
-       sort | uniq | awk ' 
-$1 == "d" { printf ("%%%%dir %%%%attr(%s,%s,%s) %s\n", $2, $3, $4, $5); } 
-$1 == "f" { if (match ($6, "@pkg_man_dir@") || match ($6, "@pkg_doc_dir@"))
-               printf ("%%%%doc ");
-           if (match ($6, "@pkg_man_dir@"))
-               printf ("%%%%attr(%s,%s,%s) %s*\n", $2, $3, $4, $6);
-           else
-               printf ("%%%%attr(%s,%s,%s) %s\n", $2, $3, $4, $6); }
-$1 == "l" { if (match ($3, "@pkg_man_dir@") || match ($3, "@pkg_doc_dir@"))
-               printf ("%%%%doc ");
-           if (match ($3, "@pkg_man_dir@"))
-               printf ("%attr(0777,root,root) %s*\n", $3);
-           else
-               printf ("%attr(0777,root,root) %s\n", $3); }'
-}
-set +x
-files < "$DIST_INSTALL" > files.rpm
-files < "$DIST_INSTALL_DEV" > filesdevel.rpm
-set -x
+@make@ -C build/rpm rpmfiles-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -91,6 +73,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %postun -p /sbin/ldconfig
 
-%files -f files.rpm
+%files -f build/rpm/rpmfiles
 
-%files devel -f filesdevel.rpm
+%files devel -f build/rpm/rpmfiles-dev