From 421f582d84ab978378dcf7322034115bdd2ffed0 Mon Sep 17 00:00:00 2001 From: glenlow Date: Thu, 26 Feb 2009 05:25:53 +0000 Subject: [PATCH] GUI now installs only in /Applications, instead of hunting down other copies of itself; added survey script to synthesize GUI contents XML which prevents PackageMaker from resetting relocatable flag --- macosx/build/Makefile | 11 +++- macosx/build/graphviz.pmdoc/01local.xml.in | 2 +- macosx/build/graphviz.pmdoc/02graphviz.xml.in | 2 +- macosx/build/graphviz.pmdoc/index.xml | 2 +- macosx/build/pmsurvey | 57 +++++++++++++++++++ 5 files changed, 69 insertions(+), 5 deletions(-) create mode 100755 macosx/build/pmsurvey diff --git a/macosx/build/Makefile b/macosx/build/Makefile index bdaf06812..2ab854bf7 100644 --- a/macosx/build/Makefile +++ b/macosx/build/Makefile @@ -3,6 +3,7 @@ MAKE=make PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker XCODEBUILD=xcodebuild +PMSURVEY=$(CURDIR)/pmsurvey # prefix @@ -17,11 +18,17 @@ DOT=dot # graphviz # -graphviz.pkg: graphviz.pmdoc usr/local/bin/$(DOT) Release/Graphviz.app postinstall +graphviz.pkg: usr/local/bin/$(DOT) graphviz.pmdoc/02graphviz-contents.xml postinstall @echo @echo PACKAGING GRAPHVIZ... @echo - "$(PACKAGEMAKER)" --doc graphviz.pmdoc --out $@ + "$(PACKAGEMAKER)" --verbose --doc graphviz.pmdoc --out $@ + +graphviz.pmdoc/02graphviz-contents.xml: Release/Graphviz.app + @echo + @echo SURVEYING GRAPHVIZ... + @echo + "$(PMSURVEY)" "$(CURDIR)/Release/Graphviz.app" >$@ usr/local/bin/$(DOT): $(GV_DIR)/cmd/dot/.libs/$(DOT) @echo diff --git a/macosx/build/graphviz.pmdoc/01local.xml.in b/macosx/build/graphviz.pmdoc/01local.xml.in index 1585e2729..eda333a0d 100644 --- a/macosx/build/graphviz.pmdoc/01local.xml.in +++ b/macosx/build/graphviz.pmdoc/01local.xml.in @@ -1 +1 @@ -com.att.graphviz.cli.pkg@VERSION@usr/local/usr/localparentscripts.postinstall.pathinstallFrom.isRelativeTypeinstallTo.pathversioninstallToidentifierpostinstall +com.att.graphviz.cli.pkg@VERSION@usr/local/usr/localparentscripts.postinstall.pathinstallFrom.isRelativeTypeinstallTo.pathversioninstallToidentifierpostinstall01local-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ diff --git a/macosx/build/graphviz.pmdoc/02graphviz.xml.in b/macosx/build/graphviz.pmdoc/02graphviz.xml.in index 4f23f4726..b10388824 100644 --- a/macosx/build/graphviz.pmdoc/02graphviz.xml.in +++ b/macosx/build/graphviz.pmdoc/02graphviz.xml.in @@ -1 +1 @@ -com.att.graphviz.gui.pkg@VERSION@Release/Graphviz.app/ApplicationsparentrelocatableversionincludeRootinstallFrom.pathidentifier02graphviz-contents.xmlisRelocatablepathMapping/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ +com.att.graphviz.gui.pkg@VERSION@Release/Graphviz.app/ApplicationsparentrelocatableversioninstallFrom.isRelativeTypeidentifier02graphviz-contents.xmlisRelocatable/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ diff --git a/macosx/build/graphviz.pmdoc/index.xml b/macosx/build/graphviz.pmdoc/index.xml index 8bc4fc722..c8d98c189 100644 --- a/macosx/build/graphviz.pmdoc/index.xml +++ b/macosx/build/graphviz.pmdoc/index.xml @@ -1 +1 @@ -Graphvizcom.attEnglish.lproj/License.rtf01local.xml02graphviz.xmlproperties.titleproperties.systemDomainproperties.anywhereDomain \ No newline at end of file +Graphvizcom.attEnglish.lproj/License.rtf01local.xml02graphviz.xmlproperties.systemDomainproperties.anywhereDomainproperties.title diff --git a/macosx/build/pmsurvey b/macosx/build/pmsurvey new file mode 100755 index 000000000..7c8f158e8 --- /dev/null +++ b/macosx/build/pmsurvey @@ -0,0 +1,57 @@ +#!/bin/bash + +# set up owner, group and permissions for system or user directories (2nd parameter) +OWNER=root +GROUP=admin +DIRMOD=16893 # drwxrwxr-x +EXEMOD=33277 # -rwxrwxr-x +LINKMOD=41469 # lrwxrwxr-x +FILEMOD=33204 # -rw-rw-r-- + +# recursive survey of directory: +# ignore cvs, svn and Finder crap +# choose file mode depending on what kind of file we got + +survey () +{ + for file in `ls -1A $1` + do + case $file in + CVS | .svn | .cvsignore | .cvspass | .DS_Store ) + ;; + * ) + if [ -d "$1/$file" ] + then + echo "" + survey "$1/$file" + echo "mode" + echo "" + elif [ -x "$1/$file" ] + then + echo "" + echo "mode" + echo "" + elif [ -L "$1/$file" ] + then + echo "" + echo "mode" + echo "" + else + echo "" + echo "mode" + echo "" + fi + ;; + esac + done +} + +# output root XML and top directory, then recursively survey the directories + +echo "" +echo "" +echo "" +survey "$1" +echo "mode" +echo "" +echo "" -- 2.40.0