diff options
Diffstat (limited to 'externals/grill/build')
-rw-r--r-- | externals/grill/build/darwin/makefile.dat | 184 | ||||
-rw-r--r-- | externals/grill/build/darwin/mkdmg.dat | 94 | ||||
-rw-r--r-- | externals/grill/build/darwin/pd-flext.info | 16 |
3 files changed, 294 insertions, 0 deletions
diff --git a/externals/grill/build/darwin/makefile.dat b/externals/grill/build/darwin/makefile.dat new file mode 100644 index 00000000..9ec4b345 --- /dev/null +++ b/externals/grill/build/darwin/makefile.dat @@ -0,0 +1,184 @@ +# generate MacOS X packages +# +# started by Adam Lindsay +# added by Hans-Christoph Steiner <hans@eds.org> + +CXX=g++ + +# where to find the pd src for headers +PDPATH = ../../../pd/src +FLEXTPATH = ../flext +FLEXTLIB = $(FLEXTPATH)/pd-darwin/libflext.a +PD = ../../../pd/bin/pd + +INSTALL_PREFIX = installroot +PD_ROOT = pd + +HELP = $(INSTALL_PREFIX)/$(PD_ROOT)/doc/5.reference +EXTERNALS = $(INSTALL_PREFIX)/$(PD_ROOT)/extra +ADDITIONAL = $(INSTALL_PREFIX)/$(PD_ROOT)/doc/flext + +FLEXT_VERSION = $(shell grep PROJECT_NUMBER ../../flext/flext.doxy | cut -d '"' -f2 | cut -d ' ' -f2) +PACKAGE_PREFIX = pd-flext +PACKAGE_NAME = $(PACKAGE_PREFIX)-$(FLEXT_VERSION) +PACKAGE_VERSION = ($shell date +%Y.%m.%d) + +DMG_PREFIX = $(PACKAGE_PREFIX) +DMG_NAME = $(DMG_PREFIX)-$(PD_VERSION)-$(PACKAGE_VERSION) + +WELCOME_FILE = Welcome.html + +all: +# FLEXT + make -C ../../flext -f makefile.pd-darwin PDPATH=$(PDPATH) CXX=$(CXX) +# FLEXTERNALS +# make -C ../../dyn -f makefile.pd-darwin CXX=$(CXX) \ +# INCLUDES="$(PDPATH) $(FLEXTPATH)/source/"\ +# FLEXTLIB=$(FLEXTLIB) FLEXTPATH=$(FLEXTPATH) PD=$(PD) +# make -C ../../fftease -f makefile.pd-darwin CXX=$(CXX) \ +# INCLUDES="$(PDPATH) $(FLEXTPATH)/source/"\ +# FLEXTLIB=$(FLEXTLIB) FLEXTPATH=$(FLEXTPATH) PD=$(PD) +# make -C ../../idelay -f makefile.pd-darwin CXX=$(CXX) \ +# INCLUDES="$(PDPATH) $(FLEXTPATH)/source/"\ +# FLEXTLIB=$(FLEXTLIB) FLEXTPATH=$(FLEXTPATH) PD=$(PD) + make -C ../../pool -f makefile.pd-darwin CXX=$(CXX) \ + INCLUDES="$(PDPATH) $(FLEXTPATH)/source/"\ + FLEXTLIB=$(FLEXTLIB) FLEXTPATH=$(FLEXTPATH) PD=$(PD) +# make -C ../../py -f makefile.pd-darwin CXX=$(CXX) \ +# INCLUDES="$(PDPATH) $(FLEXTPATH)/source/"\ +# FLEXTLIB=$(FLEXTLIB) FLEXTPATH=$(FLEXTPATH) PD=$(PD) +## vasp fails without the dir +# test -d ../../vasp/pd-darwin || mkdir -p ../../vasp/pd-darwin +# make -C ../../vasp -f makefile.pd-darwin CXX=$(CXX) \ +# INCLUDES="$(PDPATH) $(FLEXTPATH)/source/"\ +# FLEXTLIB=$(FLEXTLIB) FLEXTPATH=$(FLEXTPATH) PD=$(PD) +# make -C ../../vst -f makefile.pd-darwin CXX=$(CXX) \ +# INCLUDES="$(PDPATH) $(FLEXTPATH)/source/"\ +# FLEXTLIB=$(FLEXTLIB) FLEXTPATH=$(FLEXTPATH) PD=$(PD) + make -C ../../xsample -f makefile.pd-darwin CXX=$(CXX) \ + INCLUDES="$(PDPATH) $(FLEXTPATH)/source/"\ + FLEXTLIB=$(FLEXTLIB) FLEXTPATH=$(FLEXTPATH) PD=$(PD) + +clean: + make -C ../../flext -f makefile.pd-darwin clean + make -C ../../dyn -f makefile.pd-darwin clean + make -C ../../fftease -f makefile.pd-darwin clean + make -C ../../idelay -f makefile.pd-darwin clean + make -C ../../pool -f makefile.pd-darwin clean + make -C ../../py -f makefile.pd-darwin clean + make -C ../../vasp -f makefile.pd-darwin clean + make -C ../../vst -f makefile.pd-darwin clean + make -C ../../xsample -f makefile.pd-darwin clean + +darwin_pkg_clean: + -sudo rm -Rf $(INSTALL_PREFIX) $(PACKAGE_PREFIX)*.pkg/ + -sudo rm -Rf "$(DMG_NAME)" + -rm -f $(PACKAGE_PREFIX)-*.info 1 License.???* Welcome.???* *.dmg + +darwin_pkg_welcome: + -rm $(WELCOME_FILE) + echo "<HTML><BODY>" > $(WELCOME_FILE) + echo "<H2>FLEXT $(FLEXT_VERSION)-$(PACKAGE_VERSION)</H2>" >> $(WELCOME_FILE) + echo "<P>For more information, go to: http://www.parasitaere-kapazitaeten.net/~thomas/ext/flext/</P>" >> $(WELCOME_FILE) + echo "<H3>Included Versions</H3>" >> $(WELCOME_FILE) + echo "<P>The various versions of the included packages:</P>" >> $(WELCOME_FILE) + echo "<UL>" >> $(WELCOME_FILE) + echo "<LI>flext: $(FLEXT_VERSION) " >> $(WELCOME_FILE) + echo "</UL>" >> $(WELCOME_FILE) + echo "(this package was built on `date`) <BR>" >> $(WELCOME_FILE) + echo "</BODY></HTML>" >> $(WELCOME_FILE) + +darwin_pkg_license: + # generate HTML version of License + echo "<HTML><BODY><FONT SIZE="-1">" > License.html + cat ../../flext/gpl.txt | sed -e 's/^$$/\<P\>/g' >> License.html + echo "</FONT></BODY></HTML>" >> License.html + +# install into MSP's default: /usr/local/lib + +darwin_pkg: all darwin_pkg_clean darwin_pkg_license +# set up installroot dir + test -d $(HELP) || mkdir -p $(HELP) + test -d $(EXTERNALS) || mkdir -p $(EXTERNALS) + test -d $(ADDITIONAL) || mkdir -p $(ADDITIONAL) + test -d $(INSTALL_PREFIX)$(PD_ROOT)/flext \ + || mkdir -p $(INSTALL_PREFIX)$(PD_ROOT)/flext +# FLEXT + test -d $(HELP)/../tutorials || mkdir -p $(HELP)/../tutorials + cp -r ../../flext/tutorial $(HELP)/../tutorials/flext + mkdir $(ADDITIONAL)/flext + install -m444 ../../flext/gpl.txt ../../flext/readme.txt ../../flext/license.txt \ + $(ADDITIONAL)/flext +# FLEXTERNALS +# dyn +# install -m444 ../../dyn/pd-darwin/*.pd_darwin $(EXTERNALS) + install -m444 ../../dyn/pd/*.pd $(HELP) + mkdir $(ADDITIONAL)/dyn + install -m444 ../../dyn/gpl.txt ../../dyn/readme.txt \ + ../../dyn/license.txt $(ADDITIONAL)/dyn +# fftease +# install -m444 ../../fftease/pd-darwin/*.pd_darwin $(EXTERNALS) + install -m444 ../../fftease/pd/*.pd $(HELP) + mkdir $(ADDITIONAL)/fftease + install -m444 ../../fftease/gpl.txt ../../fftease/readme.txt \ + ../../fftease/license.txt $(ADDITIONAL)/fftease + cp -r ../../fftease/media $(ADDITIONAL)/fftease +# idelay +# install -m444 ../../dyn/pd-darwin/*.pd_darwin $(EXTERNALS) + install -m444 ../../idelay/pd/*.pd $(HELP) + mkdir $(ADDITIONAL)/idelay + install -m444 ../../idelay/gpl.txt ../../idelay/license.txt $(ADDITIONAL)/idelay +# pool + install -m444 ../../pool/pd-darwin/*.pd_darwin $(EXTERNALS) + install -m444 ../../pool/pool.pd $(HELP) + mkdir $(ADDITIONAL)/pool + install -m444 ../../pool/gpl.txt ../../pool/readme.txt ../../pool/license.txt \ + $(ADDITIONAL)/pool +# py/pyext +# install -m444 ../../py/pd-darwin/*.pd_darwin $(EXTERNALS) + mkdir -p $(ADDITIONAL)/py/examples + mkdir -p $(ADDITIONAL)/py/scripts + install -m444 ../../py/pd/*.pd $(ADDITIONAL)/py/examples + install -m444 ../../py/scripts/*.py $(ADDITIONAL)/py/scripts + install -m444 ../../py/gpl.txt ../../py/readme.txt ../../py/license.txt \ + $(ADDITIONAL)/py +# mkdir -p $(INSTALL_PREFIX)/Library/Frameworks +# cp -R /Library/Frameworks/Python.framework $(INSTALL_PREFIX)/Library/Frameworks +# vasp +# fails without the dir +# test -d ../../vasp/pd-darwin || mkdir -p ../../vasp/pd-darwin +# install -m444 ../../vasp/pd-darwin/*.pd_darwin $(EXTERNALS) + install -m444 ../../vasp/pd-help/*.pd $(HELP) + mkdir $(ADDITIONAL)/vasp + install -m444 ../../vasp/gpl.txt ../../vasp/readme.txt ../../vasp/license.txt \ + ../../vasp/changes.txt ../../vasp/todo.txt $(ADDITIONAL)/vasp + cp -r ../../vasp/pd-ex $(ADDITIONAL)/vasp +# vst +# install -m444 ../../vst/pd-darwin/*.pd_darwin $(EXTERNALS) + install -m444 ../../vst/pd/*.pd $(HELP) + mkdir $(ADDITIONAL)/vst + install -m444 ../../vst/gpl.txt ../../vst/readme.txt \ + ../../vst/license.txt $(ADDITIONAL)/vst +# xsample + install -m444 ../../xsample/pd-darwin/*.pd_darwin $(EXTERNALS) + install -m444 ../../xsample/pd/*.pd $(HELP) + mkdir $(ADDITIONAL)/xsample + install -m444 ../../xsample/gpl.txt ../../xsample/readme.txt \ + ../../xsample/license.txt $(ADDITIONAL)/xsample +# + cp -f pd-flext.info $(PACKAGE_NAME).info +# delete cruft + -find installroot -name .DS_Store -delete + -rm -f 1 +# set proper permissions + sudo chown -R root:staff $(INSTALL_PREFIX) + package $(INSTALL_PREFIX) $(PACKAGE_NAME).info -d . -ignoreDSStore +# install pkg docs + install -m644 License.html $(PACKAGE_NAME).pkg/Contents/Resources + cd Resources && \ + install -m755 postinstall postupgrade ../$(PACKAGE_NAME).pkg/Contents/Resources + sudo chown -R root:staff $(PACKAGE_NAME).pkg/Contents/Resources + +dmg: darwin_pkg + mv installroot "$(DMG_NAME)" + /bin/sh mkdmg "$(DMG_NAME)" diff --git a/externals/grill/build/darwin/mkdmg.dat b/externals/grill/build/darwin/mkdmg.dat new file mode 100644 index 00000000..c11d1987 --- /dev/null +++ b/externals/grill/build/darwin/mkdmg.dat @@ -0,0 +1,94 @@ +#!/bin/sh +# +# from: http://www.macosxhints.com/article.php?story=20020311215452999 +# +# +# Creates a disk image (dmg) on Mac OS X from the command line +# from a folder. + +FOLDER="$1" +if [ -z "$FOLDER" ]; then +echo +echo "usage: $0 <folder>" +echo +exit 1 +fi + +if [ ! -d "$FOLDER" ]; then +echo $FOLDER does not exist +exit 2 +fi + +SIZE=`/usr/bin/du -s "$FOLDER" | awk '{ print $1 }'` +# allow space for partition map and directory structure +SIZE=`echo 1024 + $SIZE \* 1.1 / 1 | bc` +NAME=`basename "$FOLDER"` +FILE=$NAME.dmg +TMP=${TMP:-/tmp} + +if [ $SIZE -lt 9216 ]; then +SIZE=9216 +fi + +if [ -e "$FILE" ] ; then +echo $FILE already exists! +exit 3 +fi + +TMPFILE=$TMP/$$.dmg + +echo Creating $TMPFILE from $FOLDER, $SIZE sectors... +hdiutil create $TMPFILE -sectors $SIZE -ov +if [ $? -ne 0 ] ; then +rm -f $TMPFILE +exit 4 +fi +echo + +DEVICES=`hdid -nomount $TMPFILE` +DEVMASTER=`echo $DEVICES| awk '{ print $1 }'` +DEVHFS=`echo $DEVICES| awk '{ print $5 }'` +echo Creating HFS partition $NAME on $TMPFILE at $DEVHFS +newfs_hfs -v "$NAME" $DEVHFS +if [ $? -ne 0 ] ; then +rm -f $TMPFILE +exit 5 +fi +hdiutil eject $DEVMASTER +if [ $? -ne 0 ] ; then +rm -f $TMPFILE +exit 6 +fi +DEVICES=`hdid $TMPFILE` +if [ $? -ne 0 ] ; then +rm -f $TMPFILE +exit 7 +fi + +DEVMASTER=`echo $DEVICES| awk '{ print $1 }'` +DEVHFS=`echo $DEVICES| awk '{ print $5 }'` +echo Copying $FOLDER to /Volumes/$NAME on $DEVMASTER +sudo ditto -rsrcFork "$FOLDER" "/Volumes/$NAME" +if [ $? -ne 0 ]; then +hdiutil eject $DEVMASTER +rm -f $TMPFILE +exit 8 +fi + +hdiutil eject $DEVMASTER +if [ $? -ne 0 ]; then +#rm -f $TMPFILE +exit 9 +fi + +echo "Compressing $NAME to $FILE" +#hdiutil convert $TMPFILE -format UDZO -o "$FILE" +hdiutil convert $TMPFILE -format UDZO -imagekey zlib-level=9 -o "$FILE" +if [ $? -ne 0 ]; then +rm -f "$FILE" $TMPFILE +exit 10 +fi + +rm -f $TMPFILE + +# end diff --git a/externals/grill/build/darwin/pd-flext.info b/externals/grill/build/darwin/pd-flext.info new file mode 100644 index 00000000..3a63fa31 --- /dev/null +++ b/externals/grill/build/darwin/pd-flext.info @@ -0,0 +1,16 @@ +Title FLEXT for Pd +Version MSP standard paths +Description Thomas Grill's C++ layer for writing Pd externals +DefaultLocation /usr/local/lib +DeleteWarning + +### Package Flags + +NeedsAuthorization YES +Required NO +Relocatable YES +RequiresReboot NO +UseUserMask YES +OverwritePermissions NO +InstallFat NO +RootVolumeOnly NO |