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 | c8c410c58d707616877c03eac93ab709a313c5cc (patch) | |
tree | ced059b6106b8a83c0be1419b6eb3f6e05f88f79 /build | |
parent | b69f55f289966ac355e5c374c03b01e283958cbc (diff) | |
download | attr-c8c410c58d707616877c03eac93ab709a313c5cc.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.
Diffstat (limited to 'build')
-rw-r--r-- | build/rpm/Makefile | 25 | ||||
-rw-r--r-- | build/rpm/attr.spec.in | 31 |
2 files changed, 28 insertions, 28 deletions
diff --git a/build/rpm/Makefile b/build/rpm/Makefile index 17eceb5..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,7 +35,7 @@ TREEROOT = $(shell cd ${TOPDIR}; pwd) include $(TOPDIR)/include/builddefs SPECF = $(PKG_NAME).spec -LDIRT = *.rpm $(SPECF) rpmmacros rpm-*.rc $(TOPDIR)/files*.rpm +LDIRT = *.rpm $(SPECF) rpmmacros rpmfiles* rpm-*.rc LSRCFILES = macros.template $(SPECF).in rpm-2.rc.template @@ -43,7 +43,7 @@ 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/attr.spec.in b/build/rpm/attr.spec.in index 2a035de..bd39896 100644 --- a/build/rpm/attr.spec.in +++ b/build/rpm/attr.spec.in @@ -68,30 +68,11 @@ DIST_INSTALL_DEV=`pwd`/install-dev.manifest DIST_INSTALL_LIB=`pwd`/install-lib.manifest export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV DIST_INSTALL_LIB @make@ install DIST_MANIFEST="$DIST_INSTALL" +@make@ -C build/rpm rpmfiles DIST_MANIFEST="$DIST_INSTALL" @make@ install-dev DIST_MANIFEST="$DIST_INSTALL_DEV" +@make@ -C build/rpm rpmfiles-dev DIST_MANIFEST="$DIST_INSTALL_DEV" @make@ install-lib DIST_MANIFEST="$DIST_INSTALL_LIB" -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 -files < "$DIST_INSTALL_LIB" > fileslib.rpm -set -x +@make@ -C build/rpm rpmfiles-lib DIST_MANIFEST="$DIST_INSTALL_LIB" %clean rm -rf $RPM_BUILD_ROOT @@ -100,8 +81,8 @@ rm -rf $RPM_BUILD_ROOT %postun -n libattr -p /sbin/ldconfig -%files -f files.rpm +%files -f build/rpm/rpmfiles -%files -n libattr-devel -f filesdevel.rpm +%files -n libattr-devel -f build/rpm/rpmfiles-dev -%files -n libattr -f fileslib.rpm +%files -n libattr -f build/rpm/rpmfiles-lib |