diff options
author | Nathan Scott <nathans@sgi.com> | 2003-03-26 23:18:13 +0000 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2003-03-26 23:18:13 +0000 |
commit | 831cf51b4c3131e7405ccc6bb94ff73d24320ff5 (patch) | |
tree | c9f027609c50898828bd4d7287b6047a14268b8c | |
parent | dc8a883a1b4876e4f15ef063bb688d254446a44c (diff) | |
download | dmapi-dev-831cf51b4c3131e7405ccc6bb94ff73d24320ff5.tar.gz |
Merge back some spec file cleanups after investigating a mysterious
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.
-rwxr-xr-x | Makepkgs | 31 | ||||
-rw-r--r-- | build/rpm/Makefile | 27 | ||||
-rw-r--r-- | build/rpm/dmapi.spec.in | 28 |
3 files changed, 33 insertions, 53 deletions
@@ -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 diff --git a/build/rpm/Makefile b/build/rpm/Makefile index 57bc4f0..4576215 100644 --- a/build/rpm/Makefile +++ b/build/rpm/Makefile @@ -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' \ diff --git a/build/rpm/dmapi.spec.in b/build/rpm/dmapi.spec.in index 624b21e..6bc41db 100644 --- a/build/rpm/dmapi.spec.in +++ b/build/rpm/dmapi.spec.in @@ -2,6 +2,7 @@ Summary: Data Management API runtime environment. Name: @pkg_name@ Version: @pkg_version@ Release: @pkg_release@ +Distribution: @pkg_distribution@ Packager: Silicon Graphics, Inc. <http://www.sgi.com/> BuildRoot: @build_root@ Prereq: /sbin/ldconfig @@ -49,28 +50,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 @@ -79,6 +61,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 |